xref: /haiku/headers/os/kernel/fs_info.h (revision 10567eeb6e5e09919ed169cd92cd66c03c91f4db)
1aa7d137cSAxel Dörfler /* fs_info.h
2aa7d137cSAxel Dörfler **
3*10567eebSAxel Dörfler ** functions/definitions for general file system information.
4*10567eebSAxel Dörfler ** Distributed under the terms of the OpenBeOS License.
5aa7d137cSAxel Dörfler */
6aa7d137cSAxel Dörfler 
7aa7d137cSAxel Dörfler #ifndef _FS_INFO_H
8aa7d137cSAxel Dörfler #define	_FS_INFO_H
9aa7d137cSAxel Dörfler 
10aa7d137cSAxel Dörfler #include <OS.h>
11aa7d137cSAxel Dörfler 
12aa7d137cSAxel Dörfler 
13aa7d137cSAxel Dörfler /* fs_info.flags */
14aa7d137cSAxel Dörfler #define	B_FS_IS_READONLY		0x00000001
15aa7d137cSAxel Dörfler #define	B_FS_IS_REMOVABLE		0x00000002
16aa7d137cSAxel Dörfler #define	B_FS_IS_PERSISTENT		0x00000004
17aa7d137cSAxel Dörfler #define	B_FS_IS_SHARED			0x00000008
18aa7d137cSAxel Dörfler #define	B_FS_HAS_MIME			0x00010000
19aa7d137cSAxel Dörfler #define	B_FS_HAS_ATTR			0x00020000
20aa7d137cSAxel Dörfler #define	B_FS_HAS_QUERY			0x00040000
212204c4d3SAxel Dörfler // those additions are preliminary and may be removed
222204c4d3SAxel Dörfler #define B_FS_HAS_SELF_HEALING_LINKS		0x00080000
232204c4d3SAxel Dörfler #define B_FS_HAS_ALIASES				0x00100000
242204c4d3SAxel Dörfler #define B_FS_SUPPORTS_NODE_MONITORING	0x00200000
25aa7d137cSAxel Dörfler 
26*10567eebSAxel Dörfler typedef struct fs_info {
27*10567eebSAxel Dörfler 	dev_t	dev;								/* volume dev_t */
28aa7d137cSAxel Dörfler 	ino_t	root;								/* root ino_t */
29*10567eebSAxel Dörfler 	uint32	flags;								/* flags (see above) */
30aa7d137cSAxel Dörfler 	off_t	block_size;							/* fundamental block size */
31*10567eebSAxel Dörfler 	off_t	io_size;							/* optimal i/o size */
32aa7d137cSAxel Dörfler 	off_t	total_blocks;						/* total number of blocks */
33aa7d137cSAxel Dörfler 	off_t	free_blocks;						/* number of free blocks */
34aa7d137cSAxel Dörfler 	off_t	total_nodes;						/* total number of nodes */
35aa7d137cSAxel Dörfler 	off_t	free_nodes;							/* number of free nodes */
36aa7d137cSAxel Dörfler 	char	device_name[128];					/* device holding fs */
37aa7d137cSAxel Dörfler 	char	volume_name[B_FILE_NAME_LENGTH];	/* volume name */
38aa7d137cSAxel Dörfler 	char	fsh_name[B_OS_NAME_LENGTH];			/* name of fs handler */
39*10567eebSAxel Dörfler } fs_info;
40aa7d137cSAxel Dörfler 
41*10567eebSAxel Dörfler 
42*10567eebSAxel Dörfler #ifdef  __cplusplus
43*10567eebSAxel Dörfler extern "C" {
44*10567eebSAxel Dörfler #endif
45aa7d137cSAxel Dörfler 
46aa7d137cSAxel Dörfler extern dev_t	dev_for_path(const char *path);
47aa7d137cSAxel Dörfler extern dev_t	next_dev(int32 *pos);
48aa7d137cSAxel Dörfler extern int		fs_stat_dev(dev_t dev, fs_info *info);
49aa7d137cSAxel Dörfler 
50aa7d137cSAxel Dörfler #ifdef  __cplusplus
51aa7d137cSAxel Dörfler }
52aa7d137cSAxel Dörfler #endif
53aa7d137cSAxel Dörfler 
54aa7d137cSAxel Dörfler #endif	/* _FS_INFO_H */
55