summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2021-02-04 11:22:13 +0100
committerDavid Sterba <dsterba@suse.com>2021-02-09 02:46:07 +0100
commitde17addce7a20db311c020fa91497a7341782d2d (patch)
treeea7bbc2a3b7c164293ff122ac77406a76e2effdb /fs/btrfs/volumes.c
parentbtrfs: zoned: implement cloning for zoned device-replace (diff)
downloadlinux-de17addce7a20db311c020fa91497a7341782d2d.tar.xz
linux-de17addce7a20db311c020fa91497a7341782d2d.zip
btrfs: zoned: implement copying for zoned device-replace
This is 3/4 patch to implement device-replace on zoned filesystems. This commit implements copying. To do this, it tracks the write pointer during the device replace process. As device-replace's copy process is smart enough to only copy used extents on the source device, we have to fill the gap to honor the sequential write requirement in the target device. The device-replace process on zoned filesystems must copy or clone all the extents in the source device exactly once. So, we need to ensure allocations started just before the dev-replace process to have their corresponding extent information in the B-trees. finish_extent_writes_for_zoned() implements that functionality, which basically is the removed code in the commit 042528f8d840 ("Btrfs: fix block group remaining RO forever after error during device replace"). Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 52ec6721ada2..1312b17a6b49 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5978,7 +5978,7 @@ static bool is_block_group_to_copy(struct btrfs_fs_info *fs_info, u64 logical)
struct btrfs_block_group *cache;
bool ret;
- /* Non-ZONED mode does not use "to_copy" flag */
+ /* Non zoned filesystem does not use "to_copy" flag */
if (!btrfs_is_zoned(fs_info))
return false;