]> git.decadent.org.uk Git - nfs-utils.git/blob - support/include/sys/fs/ext2fs.h
text-based mount.nfs: Add functions to handle background mounting
[nfs-utils.git] / support / include / sys / fs / ext2fs.h
1 #ifndef _SYS_FS_EXT2FS_H
2 #define _SYS_FS_EXT2FS_H
3
4 /*
5  * ioctl commands
6  */
7 #define EXT2_IOC_GETFLAGS               _IOR('f', 1, long)
8 #define EXT2_IOC_SETFLAGS               _IOW('f', 2, long)
9 #define EXT2_IOC_GETVERSION             _IOR('v', 1, long)
10 #define EXT2_IOC_SETVERSION             _IOW('v', 2, long)
11
12 /*
13  * File system states
14  */
15 #define EXT2_VALID_FS                   0x0001  /* Unmounted cleanly */
16 #define EXT2_ERROR_FS                   0x0002  /* Errors detected */
17
18 /*
19  * Mount flags
20  */
21 #define EXT2_MOUNT_CHECK_NORMAL         0x0001  /* Do some more checks */
22 #define EXT2_MOUNT_CHECK_STRICT         0x0002  /* Do again more checks */
23 #define EXT2_MOUNT_CHECK                (EXT2_MOUNT_CHECK_NORMAL | \
24                                          EXT2_MOUNT_CHECK_STRICT)
25 #define EXT2_MOUNT_GRPID                0x0004  /* Create files with directory's group */
26 #define EXT2_MOUNT_DEBUG                0x0008  /* Some debugging messages */
27 #define EXT2_MOUNT_ERRORS_CONT          0x0010  /* Continue on errors */
28 #define EXT2_MOUNT_ERRORS_RO            0x0020  /* Remount fs ro on errors */
29 #define EXT2_MOUNT_ERRORS_PANIC         0x0040  /* Panic on errors */
30 #define EXT2_MOUNT_MINIX_DF             0x0080  /* Mimics the Minix statfs */
31
32 #define clear_opt(o, opt)               o &= ~EXT2_MOUNT_##opt
33 #define set_opt(o, opt)                 o |= EXT2_MOUNT_##opt
34 #define test_opt(sb, opt)               ((sb)->u.ext2_sb.s_mount_opt & \
35                                          EXT2_MOUNT_##opt)
36 /*
37  * Maximal mount counts between two filesystem checks
38  */
39 #define EXT2_DFL_MAX_MNT_COUNT          20      /* Allow 20 mounts */
40 #define EXT2_DFL_CHECKINTERVAL          0       /* Don't use interval check */
41
42 #endif  /* _SYS_FS_EXT2FS_H */