diff mbox series

[v8,10/41] btrfs: disallow inode_cache in ZONED mode

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

Commit Message

Naohiro Aota Oct. 1, 2020, 6:36 p.m. UTC
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@toxicpanda.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 fs/btrfs/zoned.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

David Sterba Oct. 13, 2020, 3:41 p.m. UTC | #1
On Fri, Oct 02, 2020 at 03:36:17AM +0900, Naohiro Aota wrote:
> 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.

Don't worry about the inode_cache mount option, it's been deprecated
as of commit b547a88ea5776a8092f7 and will be removed in 5.11.
Naohiro Aota Oct. 22, 2020, 6:48 a.m. UTC | #2
On Tue, Oct 13, 2020 at 05:41:17PM +0200, David Sterba wrote:
>On Fri, Oct 02, 2020 at 03:36:17AM +0900, Naohiro Aota wrote:
>> 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.
>
>Don't worry about the inode_cache mount option, it's been deprecated
>as of commit b547a88ea5776a8092f7 and will be removed in 5.11.

Thanks. I'll drop this one in the next version.
diff mbox series

Patch

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;
 }