inode_cache use pre-allocation to write its cache data. However, pre-allocation is completely disabled in ZONED mode. We can technically enable inode_cache in the same way as relocation. However, inode_cache is rarely used and the man page discourage using it. So, let's just disable it for now. Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx> --- fs/btrfs/zoned.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 8cd43d2d5611..e47698d313a5 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -297,5 +297,11 @@ int btrfs_check_mountopts_zoned(struct btrfs_fs_info *info) return -EOPNOTSUPP; } + if (btrfs_test_pending(info, SET_INODE_MAP_CACHE)) { + btrfs_err(info, + "cannot enable inode map caching with ZONED mode"); + return -EOPNOTSUPP; + } + return 0; } -- 2.27.0