diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-09-03 20:03:40 -0700 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-13 16:57:08 -0700 |
commit | 12462f1d9f0b96389497438dc2730c6f7410be82 (patch) | |
tree | d96dec791dd45cc8901dc6a894bdbe96ad7e7c67 /fs/ocfs2/super.c | |
parent | 1187c968852e3c668f3b9376083851f81f6eee22 (diff) | |
download | linux-12462f1d9f0b96389497438dc2730c6f7410be82.tar.gz linux-12462f1d9f0b96389497438dc2730c6f7410be82.tar.bz2 linux-12462f1d9f0b96389497438dc2730c6f7410be82.zip |
ocfs2: Add the 'inode64' mount option.
Now that ocfs2 limits inode numbers to 32bits, add a mount option to
disable the limit. This parallels XFS. 64bit systems can handle the
larger inode numbers.
[ Added description of inode64 mount option in ocfs2.txt. --Mark ]
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index c85e525950a9..1a51c8c53bef 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -157,6 +157,7 @@ enum { Opt_stack, Opt_user_xattr, Opt_nouser_xattr, + Opt_inode64, Opt_err, }; @@ -178,6 +179,7 @@ static const match_table_t tokens = { {Opt_stack, "cluster_stack=%s"}, {Opt_user_xattr, "user_xattr"}, {Opt_nouser_xattr, "nouser_xattr"}, + {Opt_inode64, "inode64"}, {Opt_err, NULL} }; @@ -411,6 +413,15 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) goto out; } + /* Probably don't want this on remount; it might + * mess with other nodes */ + if (!(osb->s_mount_opt & OCFS2_MOUNT_INODE64) && + (parsed_options.mount_opt & OCFS2_MOUNT_INODE64)) { + ret = -EINVAL; + mlog(ML_ERROR, "Cannot enable inode64 on remount\n"); + goto out; + } + /* We're going to/from readonly mode. */ if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { /* Lock here so the check of HARD_RO and the potential @@ -930,6 +941,9 @@ static int ocfs2_parse_options(struct super_block *sb, OCFS2_STACK_LABEL_LEN); mopt->cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0'; break; + case Opt_inode64: + mopt->mount_opt |= OCFS2_MOUNT_INODE64; + break; default: mlog(ML_ERROR, "Unrecognized mount option \"%s\" " @@ -994,6 +1008,9 @@ static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt) seq_printf(s, ",cluster_stack=%.*s", OCFS2_STACK_LABEL_LEN, osb->osb_cluster_stack); + if (opts & OCFS2_MOUNT_INODE64) + seq_printf(s, ",inode64"); + return 0; } |