]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: support dev-replace in zoned filesystems
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 4 Feb 2021 10:22:14 +0000 (19:22 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 9 Feb 2021 01:46:07 +0000 (02:46 +0100)
commit64cd1f2a72b707373da2587e5c634b210ea42f1d
tree7221d3695a1dc4408bfeca6040bda95c68186295
parentae2b44280440d288e8e84edb41b45e0c49f49f4a
btrfs: zoned: support dev-replace in zoned filesystems

This is 4/4 patch to implement device-replace on zoned filesystems.

Even after the copying is done, the write pointers of the source device
and the destination device may not be synchronized. For example, when
the last allocated extent is freed before device-replace process, the
extent is not copied, leaving a hole there.

Synchronize the write pointers by writing zeroes to the destination
device.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c
fs/btrfs/zoned.c
fs/btrfs/zoned.h