[PATCH 2/3] ext4: omit init_itable=n in procfs when disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't show init_itable=n in /proc/fs/ext4/<dev>/options when filesystem
is mounted with noinit_itable.

Signed-off-by: Tyson Nottingham <tgnottingham@xxxxxxxxx>
---

Before:

$ sudo mount -o loop=$(losetup -f) image.ext4 mnt
$ mount | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
init_itable=10

$ sudo mount -o loop=$(losetup -f),noinit_itable image.ext4 mnt
$ mount | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,noinit_itable,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
noinit_itable
init_itable=10

^ Superfluous init_itable=10.


After:

$ sudo mount -o loop=$(losetup -f) image.ext4 mnt
$ mount -l | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
init_itable=10

$ sudo mount -o loop=$(losetup -f),noinit_itable image.ext4 mnt
$ mount -l | grep image
/home/tgnottingham/image.ext4 on /home/tgnottingham/mnt type ext4 (rw,relatime,noinit_itable,data=ordered)
$ grep init /proc/fs/ext4/loop0/options
noinit_itable

---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6b07fa2..7437ed0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2081,7 +2081,7 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
 		SEQ_OPTS_PRINT("inode_readahead_blks=%u",
 			       sbi->s_inode_readahead_blks);
 
-	if (nodefs || (test_opt(sb, INIT_INODE_TABLE) &&
+	if (test_opt(sb, INIT_INODE_TABLE) && (nodefs ||
 		       (sbi->s_li_wait_mult != EXT4_DEF_LI_WAIT_MULT)))
 		SEQ_OPTS_PRINT("init_itable=%u", sbi->s_li_wait_mult);
 	if (nodefs || sbi->s_max_dir_size_kb)
-- 
2.7.4




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux