diff mbox series

[v6,22/28] btrfs: disallow inode_cache in HMZONED mode

Message ID 20191213040915.3502922-23-naohiro.aota@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs: zoned block device support | expand

Commit Message

Naohiro Aota Dec. 13, 2019, 4:09 a.m. UTC
inode_cache use pre-allocation to write its cache data. However,
pre-allocation is completely disabled in HMZONED 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.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 fs/btrfs/hmzoned.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Josef Bacik Dec. 17, 2019, 7:56 p.m. UTC | #1
On 12/12/19 11:09 PM, Naohiro Aota wrote:
> inode_cache use pre-allocation to write its cache data. However,
> pre-allocation is completely disabled in HMZONED 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.
> 
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>

Same comment as the mixed_bg's comment

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef
diff mbox series

Patch

diff --git a/fs/btrfs/hmzoned.c b/fs/btrfs/hmzoned.c
index c779232bb003..465db8e6de94 100644
--- a/fs/btrfs/hmzoned.c
+++ b/fs/btrfs/hmzoned.c
@@ -342,6 +342,12 @@  int btrfs_check_mountopts_hmzoned(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 HMZONED mode");
+		return -EOPNOTSUPP;
+	}
+
 	return 0;
 }