ext4: remove the I_VERSION mount flag and use the super_block flag instead
authorTheodore Ts'o <tytso@mit.edu>
Fri, 2 Mar 2012 17:23:11 +0000 (12:23 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 2 Mar 2012 17:23:11 +0000 (12:23 -0500)
There's no point to have two bits that are set in parallel; so use the
MS_I_VERSION flag that is needed by the VFS anyway, and that way we
free up a bit in sbi->s_mount_opts.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/super.c

index 4076746d721df6fc27b51268637a90996e7a2948..df93dc19651434ba86a16109af6649a03a010545 100644 (file)
@@ -942,7 +942,6 @@ struct ext4_inode_info {
 #define EXT4_MOUNT_DIOREAD_NOLOCK      0x400000 /* Enable support for dio read nolocking */
 #define EXT4_MOUNT_JOURNAL_CHECKSUM    0x800000 /* Journal checksums */
 #define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT        0x1000000 /* Journal Async Commit */
-#define EXT4_MOUNT_I_VERSION            0x2000000 /* i_version support */
 #define EXT4_MOUNT_MBLK_IO_SUBMIT      0x4000000 /* multi-block io submits */
 #define EXT4_MOUNT_DELALLOC            0x8000000 /* Delalloc support */
 #define EXT4_MOUNT_DATA_ERR_ABORT      0x10000000 /* Abort on file data write */
index aafc626d64ac3c0cce8aa7f9b75c68213866fdee..38dc5f3e9dd37e20bf2aee00e8f36ea4f1159cda 100644 (file)
@@ -4322,7 +4322,7 @@ int ext4_mark_iloc_dirty(handle_t *handle,
 {
        int err = 0;
 
-       if (test_opt(inode->i_sb, I_VERSION))
+       if (IS_I_VERSION(inode))
                inode_inc_iversion(inode);
 
        /* the do_update_inode consumes one bh->b_count */
index 7dbad76f92e8d62aeb481075368a3a7ad8cc995f..6b27bc6eba403b5605ba83cd626624d676313915 100644 (file)
@@ -1125,7 +1125,7 @@ static int ext4_show_options(struct seq_file *seq, struct dentry *root)
                seq_puts(seq, ",journal_async_commit");
        else if (test_opt(sb, JOURNAL_CHECKSUM))
                seq_puts(seq, ",journal_checksum");
-       if (test_opt(sb, I_VERSION))
+       if (sb->s_flags & MS_I_VERSION)
                seq_puts(seq, ",i_version");
        if (!test_opt(sb, DELALLOC) &&
            !(def_mount_opts & EXT4_DEFM_NODELALLOC))
@@ -1793,7 +1793,6 @@ set_qf_format:
                                 "Ignoring deprecated bh option");
                        break;
                case Opt_i_version:
-                       set_opt(sb, I_VERSION);
                        sb->s_flags |= MS_I_VERSION;
                        break;
                case Opt_nodelalloc: