aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-01 23:09:22 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 23:09:22 -0500
commite718eeb4fe397f8add9f789e1fc3b47da4e7275f (patch)
treeac7732a22588c5dd42ba30449dd36ca0e07e7180 /fs/xfs
parent6b3f6b5b87f03d1649340d6b3a572206653a2a2b (diff)
[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.h14
-rw-r--r--fs/xfs/xfs_mount.h48
-rw-r--r--fs/xfs/xfs_vfsops.c13
3 files changed, 42 insertions, 33 deletions
diff --git a/fs/xfs/xfs_clnt.h b/fs/xfs/xfs_clnt.h
index 1fbe2bf1f3e..328a528b926 100644
--- a/fs/xfs/xfs_clnt.h
+++ b/fs/xfs/xfs_clnt.h
@@ -41,6 +41,7 @@
41 */ 41 */
42struct xfs_mount_args { 42struct xfs_mount_args {
43 int flags; /* flags -> see XFSMNT_... macros below */ 43 int flags; /* flags -> see XFSMNT_... macros below */
44 int flags2; /* flags -> see XFSMNT2_... macros below */
44 int logbufs; /* Number of log buffers, -1 to default */ 45 int logbufs; /* Number of log buffers, -1 to default */
45 int logbufsize; /* Size of log buffers, -1 to default */ 46 int logbufsize; /* Size of log buffers, -1 to default */
46 char fsname[MAXNAMELEN+1]; /* data device name */ 47 char fsname[MAXNAMELEN+1]; /* data device name */
@@ -54,7 +55,7 @@ struct xfs_mount_args {
54}; 55};
55 56
56/* 57/*
57 * XFS mount option flags 58 * XFS mount option flags -- args->flags1
58 */ 59 */
59#define XFSMNT_COMPAT_ATTR 0x00000001 /* do not use ATTR2 format */ 60#define XFSMNT_COMPAT_ATTR 0x00000001 /* do not use ATTR2 format */
60#define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount 61#define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount
@@ -77,7 +78,7 @@ struct xfs_mount_args {
77#define XFSMNT_SHARED 0x00001000 /* shared XFS mount */ 78#define XFSMNT_SHARED 0x00001000 /* shared XFS mount */
78#define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */ 79#define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */
79#define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */ 80#define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */
80 /* (osyncisdsync is now default) */ 81 /* (osyncisdsync is default) */
81#define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32 82#define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32
82 * bits of address space */ 83 * bits of address space */
83#define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */ 84#define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */
@@ -92,7 +93,12 @@ struct xfs_mount_args {
92#define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */ 93#define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */
93#define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename 94#define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename
94 * symlink,mkdir,rmdir,mknod */ 95 * symlink,mkdir,rmdir,mknod */
95#define XFSMNT_COMPAT_IOSIZE 0x80000000 /* don't report large preferred 96#define XFSMNT_FLAGS2 0x80000000 /* more flags set in flags2 */
96 * I/O size in stat() */ 97
98/*
99 * XFS mount option flags -- args->flags2
100 */
101#define XFSMNT2_COMPAT_IOSIZE 0x00000001 /* don't report large preferred
102 * I/O size in stat(2) */
97 103
98#endif /* __XFS_CLNT_H__ */ 104#endif /* __XFS_CLNT_H__ */
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 04f8e37cb26..f724a2beead 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -333,7 +333,7 @@ typedef struct xfs_mount {
333 sema_t m_growlock; /* growfs mutex */ 333 sema_t m_growlock; /* growfs mutex */
334 int m_fixedfsid[2]; /* unchanged for life of FS */ 334 int m_fixedfsid[2]; /* unchanged for life of FS */
335 uint m_dmevmask; /* DMI events for this FS */ 335 uint m_dmevmask; /* DMI events for this FS */
336 uint m_flags; /* global mount flags */ 336 __uint64_t m_flags; /* global mount flags */
337 uint m_attroffset; /* inode attribute offset */ 337 uint m_attroffset; /* inode attribute offset */
338 uint m_dir_node_ents; /* #entries in a dir danode */ 338 uint m_dir_node_ents; /* #entries in a dir danode */
339 uint m_attr_node_ents; /* #entries in attr danode */ 339 uint m_attr_node_ents; /* #entries in attr danode */
@@ -378,39 +378,39 @@ typedef struct xfs_mount {
378/* 378/*
379 * Flags for m_flags. 379 * Flags for m_flags.
380 */ 380 */
381#define XFS_MOUNT_WSYNC 0x00000001 /* for nfs - all metadata ops 381#define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops
382 must be synchronous except 382 must be synchronous except
383 for space allocations */ 383 for space allocations */
384#define XFS_MOUNT_INO64 0x00000002 384#define XFS_MOUNT_INO64 (1ULL << 1)
385 /* 0x00000004 -- currently unused */ 385 /* (1ULL << 2) -- currently unused */
386 /* 0x00000008 -- currently unused */ 386 /* (1ULL << 3) -- currently unused */
387#define XFS_MOUNT_FS_SHUTDOWN 0x00000010 /* atomic stop of all filesystem 387#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem
388 operations, typically for 388 operations, typically for
389 disk errors in metadata */ 389 disk errors in metadata */
390#define XFS_MOUNT_NOATIME 0x00000020 /* don't modify inode access 390#define XFS_MOUNT_NOATIME (1ULL << 5) /* don't modify inode access
391 times on reads */ 391 times on reads */
392#define XFS_MOUNT_RETERR 0x00000040 /* return alignment errors to 392#define XFS_MOUNT_RETERR (1ULL << 6) /* return alignment errors to
393 user */ 393 user */
394#define XFS_MOUNT_NOALIGN 0x00000080 /* turn off stripe alignment 394#define XFS_MOUNT_NOALIGN (1ULL << 7) /* turn off stripe alignment
395 allocations */ 395 allocations */
396#define XFS_MOUNT_COMPAT_ATTR 0x00000100 /* do not use attr2 format */ 396#define XFS_MOUNT_COMPAT_ATTR (1ULL << 8) /* do not use attr2 format */
397 /* 0x00000200 -- currently unused */ 397 /* (1ULL << 9) -- currently unused */
398#define XFS_MOUNT_NORECOVERY 0x00000400 /* no recovery - dirty fs */ 398#define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */
399#define XFS_MOUNT_SHARED 0x00000800 /* shared mount */ 399#define XFS_MOUNT_SHARED (1ULL << 11) /* shared mount */
400#define XFS_MOUNT_DFLT_IOSIZE 0x00001000 /* set default i/o size */ 400#define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */
401#define XFS_MOUNT_OSYNCISOSYNC 0x00002000 /* o_sync is REALLY o_sync */ 401#define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13) /* o_sync is REALLY o_sync */
402 /* osyncisdsync is now default*/ 402 /* osyncisdsync is now default*/
403#define XFS_MOUNT_32BITINODES 0x00004000 /* do not create inodes above 403#define XFS_MOUNT_32BITINODES (1ULL << 14) /* do not create inodes above
404 * 32 bits in size */ 404 * 32 bits in size */
405#define XFS_MOUNT_32BITINOOPT 0x00008000 /* saved mount option state */ 405#define XFS_MOUNT_32BITINOOPT (1ULL << 15) /* saved mount option state */
406#define XFS_MOUNT_NOUUID 0x00010000 /* ignore uuid during mount */ 406#define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */
407#define XFS_MOUNT_BARRIER 0x00020000 407#define XFS_MOUNT_BARRIER (1ULL << 17)
408#define XFS_MOUNT_IDELETE 0x00040000 /* delete empty inode clusters*/ 408#define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/
409#define XFS_MOUNT_SWALLOC 0x00080000 /* turn on stripe width 409#define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width
410 * allocation */ 410 * allocation */
411#define XFS_MOUNT_IHASHSIZE 0x00100000 /* inode hash table size */ 411#define XFS_MOUNT_IHASHSIZE (1ULL << 20) /* inode hash table size */
412#define XFS_MOUNT_DIRSYNC 0x00200000 /* synchronous directory ops */ 412#define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */
413#define XFS_MOUNT_COMPAT_IOSIZE 0x00400000 /* don't report large preferred 413#define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred
414 * I/O size in stat() */ 414 * I/O size in stat() */
415 415
416 416
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 96f7cdebe1b..f4f8805e25b 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -291,11 +291,12 @@ xfs_start_flags(
291 mp->m_flags |= XFS_MOUNT_IDELETE; 291 mp->m_flags |= XFS_MOUNT_IDELETE;
292 if (ap->flags & XFSMNT_DIRSYNC) 292 if (ap->flags & XFSMNT_DIRSYNC)
293 mp->m_flags |= XFS_MOUNT_DIRSYNC; 293 mp->m_flags |= XFS_MOUNT_DIRSYNC;
294 if (ap->flags & XFSMNT_COMPAT_IOSIZE)
295 mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
296 if (ap->flags & XFSMNT_COMPAT_ATTR) 294 if (ap->flags & XFSMNT_COMPAT_ATTR)
297 mp->m_flags |= XFS_MOUNT_COMPAT_ATTR; 295 mp->m_flags |= XFS_MOUNT_COMPAT_ATTR;
298 296
297 if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE)
298 mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
299
299 /* 300 /*
300 * no recovery flag requires a read-only mount 301 * no recovery flag requires a read-only mount
301 */ 302 */
@@ -1679,7 +1680,7 @@ xfs_parseargs(
1679 int dsunit, dswidth, vol_dsunit, vol_dswidth; 1680 int dsunit, dswidth, vol_dsunit, vol_dswidth;
1680 int iosize; 1681 int iosize;
1681 1682
1682 args->flags |= XFSMNT_COMPAT_IOSIZE; 1683 args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
1683 args->flags |= XFSMNT_COMPAT_ATTR; 1684 args->flags |= XFSMNT_COMPAT_ATTR;
1684 1685
1685#if 0 /* XXX: off by default, until some remaining issues ironed out */ 1686#if 0 /* XXX: off by default, until some remaining issues ironed out */
@@ -1811,9 +1812,9 @@ xfs_parseargs(
1811 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { 1812 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
1812 args->flags |= XFSMNT_IDELETE; 1813 args->flags |= XFSMNT_IDELETE;
1813 } else if (!strcmp(this_char, MNTOPT_LARGEIO)) { 1814 } else if (!strcmp(this_char, MNTOPT_LARGEIO)) {
1814 args->flags &= ~XFSMNT_COMPAT_IOSIZE; 1815 args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE;
1815 } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) { 1816 } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) {
1816 args->flags |= XFSMNT_COMPAT_IOSIZE; 1817 args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
1817 } else if (!strcmp(this_char, MNTOPT_ATTR2)) { 1818 } else if (!strcmp(this_char, MNTOPT_ATTR2)) {
1818 args->flags &= ~XFSMNT_COMPAT_ATTR; 1819 args->flags &= ~XFSMNT_COMPAT_ATTR;
1819 } else if (!strcmp(this_char, MNTOPT_NOATTR2)) { 1820 } else if (!strcmp(this_char, MNTOPT_NOATTR2)) {
@@ -1867,6 +1868,8 @@ printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n");
1867 args->sunit = args->swidth = 0; 1868 args->sunit = args->swidth = 0;
1868 } 1869 }
1869 1870
1871 if (args->flags2)
1872 args->flags |= XFSMNT_FLAGS2;
1870 return 0; 1873 return 0;
1871} 1874}
1872 1875