On 5/7/25 9:46 AM, Jaegeuk Kim wrote: > I meant: > > # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /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; } _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel