Re: [PATCH V3 0/7] f2fs: new mount API conversion

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

 



On 5/7/25 9:46 AM, Jaegeuk Kim wrote:

> I meant:
> 
> # mkfs/mkfs.f2fs -c /dev/vdc@xxxxxxxx /dev/vdb
> # mount /dev/vdb mnt
> 
> It's supposed to be successful, since extent_cache is enabled by default.

I'm sorry, clearly I was too sleepy last night. This fixes it for me.

We have to test the mask to see if the option was explisitly set (either
extent_cache or noextent_cache) at mount time.

If it was not specified at all, it will be set by the default f'n and
remain in the sbi, and it will pass this consistency check.

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index d89b9ede221e..e178796ce9a7 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1412,7 +1414,8 @@ static int f2fs_check_opt_consistency(struct fs_context *fc,
 	}
 
 	if (f2fs_sb_has_device_alias(sbi) &&
-			!ctx_test_opt(ctx, F2FS_MOUNT_READ_EXTENT_CACHE)) {
+			(ctx->opt_mask & F2FS_MOUNT_READ_EXTENT_CACHE) &&
+			 !ctx_test_opt(ctx, F2FS_MOUNT_READ_EXTENT_CACHE)) {
 		f2fs_err(sbi, "device aliasing requires extent cache");
 		return -EINVAL;
 	}





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux