diff mbox series

[RFC,07/17] btrfs: disable device replace in HMZONED mode

Message ID 20180809180450.5091-8-naota@elisp.net (mailing list archive)
State New, archived
Headers show
Series btrfs zoned block device support | expand

Commit Message

Naohiro Aota Aug. 9, 2018, 6:04 p.m. UTC
To enable device replacing feature in HMZONED mode, we should avoid write
replicating from replace source device to replace target device so that we
do not write to a location after the position of a zone's device write
pointer. In addition, scrub process should be modified to dispatch the
write I/Os sequentially and to fill holes between the extents. Finally,
write pointers of the zones should be synchronized to match with RAID
siblings in a RAID case.

It needs more works to solve all these issues. So disable the device
replace feature in HMZONED mode for now.

Signed-off-by: Naohiro Aota <naota@elisp.net>
---
 fs/btrfs/dev-replace.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 839a35008fd8..cde61fb217db 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -416,6 +416,9 @@  int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
 	struct btrfs_device *tgt_device = NULL;
 	struct btrfs_device *src_device = NULL;
 
+	if (btrfs_fs_incompat(fs_info, HMZONED))
+		return -EOPNOTSUPP;
+
 	ret = btrfs_find_device_by_devspec(fs_info, srcdevid,
 					    srcdev_name, &src_device);
 	if (ret)