diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2020-11-10 20:26:11 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-09 19:16:04 +0100 |
commit | d206e9c9c576a0de2e6d1fdf17551e2a548955c0 (patch) | |
tree | 44c4cd209a2c8e3ee5dcef681a30345b847f1cf4 /fs/btrfs/zoned.c | |
parent | 5d1ab66c56fed152acbbac1933b16d33ebd47d7f (diff) | |
download | lwn-d206e9c9c576a0de2e6d1fdf17551e2a548955c0.tar.gz lwn-d206e9c9c576a0de2e6d1fdf17551e2a548955c0.zip |
btrfs: disallow NODATACOW in ZONED mode
NODATACOW implies overwriting the file data on a device, which is
impossible in sequential required zones. Disable NODATACOW globally with
mount option and per-file NODATACOW attribute by masking FS_NOCOW_FL.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/zoned.c')
-rw-r--r-- | fs/btrfs/zoned.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 3bc6a5e3a61c..6ef97996e185 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -274,5 +274,10 @@ int btrfs_check_mountopts_zoned(struct btrfs_fs_info *info) return -EINVAL; } + if (btrfs_test_opt(info, NODATACOW)) { + btrfs_err(info, "zoned: NODATACOW not supported"); + return -EINVAL; + } + return 0; } |