diff options
author | Nathan Scott <nathans@sgi.com> | 2005-11-02 15:09:22 +1100 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-11-02 15:09:22 +1100 |
commit | e718eeb4fe397f8add9f789e1fc3b47da4e7275f (patch) | |
tree | ac7732a22588c5dd42ba30449dd36ca0e07e7180 /fs/xfs | |
parent | 6b3f6b5b87f03d1649340d6b3a572206653a2a2b (diff) | |
download | linux-e718eeb4fe397f8add9f789e1fc3b47da4e7275f.tar.gz linux-e718eeb4fe397f8add9f789e1fc3b47da4e7275f.tar.bz2 linux-e718eeb4fe397f8add9f789e1fc3b47da4e7275f.zip |
[XFS] Rework the final mount options flag bit to make room for more.
SGI-PV: 943866
SGI-Modid: xfs-linux:xfs-kern:24030a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_clnt.h | 14 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 48 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 13 |
3 files changed, 42 insertions, 33 deletions
diff --git a/fs/xfs/xfs_clnt.h b/fs/xfs/xfs_clnt.h index 1fbe2bf1f3ec..328a528b926d 100644 --- a/fs/xfs/xfs_clnt.h +++ b/fs/xfs/xfs_clnt.h @@ -41,6 +41,7 @@ */ struct xfs_mount_args { int flags; /* flags -> see XFSMNT_... macros below */ + int flags2; /* flags -> see XFSMNT2_... macros below */ int logbufs; /* Number of log buffers, -1 to default */ int logbufsize; /* Size of log buffers, -1 to default */ char fsname[MAXNAMELEN+1]; /* data device name */ @@ -54,7 +55,7 @@ struct xfs_mount_args { }; /* - * XFS mount option flags + * XFS mount option flags -- args->flags1 */ #define XFSMNT_COMPAT_ATTR 0x00000001 /* do not use ATTR2 format */ #define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount @@ -77,7 +78,7 @@ struct xfs_mount_args { #define XFSMNT_SHARED 0x00001000 /* shared XFS mount */ #define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */ #define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */ - /* (osyncisdsync is now default) */ + /* (osyncisdsync is default) */ #define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32 * bits of address space */ #define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */ @@ -92,7 +93,12 @@ struct xfs_mount_args { #define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */ #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename * symlink,mkdir,rmdir,mknod */ -#define XFSMNT_COMPAT_IOSIZE 0x80000000 /* don't report large preferred - * I/O size in stat() */ +#define XFSMNT_FLAGS2 0x80000000 /* more flags set in flags2 */ + +/* + * XFS mount option flags -- args->flags2 + */ +#define XFSMNT2_COMPAT_IOSIZE 0x00000001 /* don't report large preferred + * I/O size in stat(2) */ #endif /* __XFS_CLNT_H__ */ diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 04f8e37cb264..f724a2beead9 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -333,7 +333,7 @@ typedef struct xfs_mount { sema_t m_growlock; /* growfs mutex */ int m_fixedfsid[2]; /* unchanged for life of FS */ uint m_dmevmask; /* DMI events for this FS */ - uint m_flags; /* global mount flags */ + __uint64_t m_flags; /* global mount flags */ uint m_attroffset; /* inode attribute offset */ uint m_dir_node_ents; /* #entries in a dir danode */ uint m_attr_node_ents; /* #entries in attr danode */ @@ -378,39 +378,39 @@ typedef struct xfs_mount { /* * Flags for m_flags. */ -#define XFS_MOUNT_WSYNC 0x00000001 /* for nfs - all metadata ops +#define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops must be synchronous except for space allocations */ -#define XFS_MOUNT_INO64 0x00000002 - /* 0x00000004 -- currently unused */ - /* 0x00000008 -- currently unused */ -#define XFS_MOUNT_FS_SHUTDOWN 0x00000010 /* atomic stop of all filesystem +#define XFS_MOUNT_INO64 (1ULL << 1) + /* (1ULL << 2) -- currently unused */ + /* (1ULL << 3) -- currently unused */ +#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem operations, typically for disk errors in metadata */ -#define XFS_MOUNT_NOATIME 0x00000020 /* don't modify inode access +#define XFS_MOUNT_NOATIME (1ULL << 5) /* don't modify inode access times on reads */ -#define XFS_MOUNT_RETERR 0x00000040 /* return alignment errors to +#define XFS_MOUNT_RETERR (1ULL << 6) /* return alignment errors to user */ -#define XFS_MOUNT_NOALIGN 0x00000080 /* turn off stripe alignment +#define XFS_MOUNT_NOALIGN (1ULL << 7) /* turn off stripe alignment allocations */ -#define XFS_MOUNT_COMPAT_ATTR 0x00000100 /* do not use attr2 format */ - /* 0x00000200 -- currently unused */ -#define XFS_MOUNT_NORECOVERY 0x00000400 /* no recovery - dirty fs */ -#define XFS_MOUNT_SHARED 0x00000800 /* shared mount */ -#define XFS_MOUNT_DFLT_IOSIZE 0x00001000 /* set default i/o size */ -#define XFS_MOUNT_OSYNCISOSYNC 0x00002000 /* o_sync is REALLY o_sync */ +#define XFS_MOUNT_COMPAT_ATTR (1ULL << 8) /* do not use attr2 format */ + /* (1ULL << 9) -- currently unused */ +#define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */ +#define XFS_MOUNT_SHARED (1ULL << 11) /* shared mount */ +#define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */ +#define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13) /* o_sync is REALLY o_sync */ /* osyncisdsync is now default*/ -#define XFS_MOUNT_32BITINODES 0x00004000 /* do not create inodes above +#define XFS_MOUNT_32BITINODES (1ULL << 14) /* do not create inodes above * 32 bits in size */ -#define XFS_MOUNT_32BITINOOPT 0x00008000 /* saved mount option state */ -#define XFS_MOUNT_NOUUID 0x00010000 /* ignore uuid during mount */ -#define XFS_MOUNT_BARRIER 0x00020000 -#define XFS_MOUNT_IDELETE 0x00040000 /* delete empty inode clusters*/ -#define XFS_MOUNT_SWALLOC 0x00080000 /* turn on stripe width +#define XFS_MOUNT_32BITINOOPT (1ULL << 15) /* saved mount option state */ +#define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */ +#define XFS_MOUNT_BARRIER (1ULL << 17) +#define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/ +#define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width * allocation */ -#define XFS_MOUNT_IHASHSIZE 0x00100000 /* inode hash table size */ -#define XFS_MOUNT_DIRSYNC 0x00200000 /* synchronous directory ops */ -#define XFS_MOUNT_COMPAT_IOSIZE 0x00400000 /* don't report large preferred +#define XFS_MOUNT_IHASHSIZE (1ULL << 20) /* inode hash table size */ +#define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */ +#define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred * I/O size in stat() */ diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 96f7cdebe1b1..f4f8805e25ba 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -291,11 +291,12 @@ xfs_start_flags( mp->m_flags |= XFS_MOUNT_IDELETE; if (ap->flags & XFSMNT_DIRSYNC) mp->m_flags |= XFS_MOUNT_DIRSYNC; - if (ap->flags & XFSMNT_COMPAT_IOSIZE) - mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE; if (ap->flags & XFSMNT_COMPAT_ATTR) mp->m_flags |= XFS_MOUNT_COMPAT_ATTR; + if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE) + mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE; + /* * no recovery flag requires a read-only mount */ @@ -1679,7 +1680,7 @@ xfs_parseargs( int dsunit, dswidth, vol_dsunit, vol_dswidth; int iosize; - args->flags |= XFSMNT_COMPAT_IOSIZE; + args->flags2 |= XFSMNT2_COMPAT_IOSIZE; args->flags |= XFSMNT_COMPAT_ATTR; #if 0 /* XXX: off by default, until some remaining issues ironed out */ @@ -1811,9 +1812,9 @@ xfs_parseargs( } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { args->flags |= XFSMNT_IDELETE; } else if (!strcmp(this_char, MNTOPT_LARGEIO)) { - args->flags &= ~XFSMNT_COMPAT_IOSIZE; + args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE; } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) { - args->flags |= XFSMNT_COMPAT_IOSIZE; + args->flags2 |= XFSMNT2_COMPAT_IOSIZE; } else if (!strcmp(this_char, MNTOPT_ATTR2)) { args->flags &= ~XFSMNT_COMPAT_ATTR; } else if (!strcmp(this_char, MNTOPT_NOATTR2)) { @@ -1867,6 +1868,8 @@ printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n"); args->sunit = args->swidth = 0; } + if (args->flags2) + args->flags |= XFSMNT_FLAGS2; return 0; } |