diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2021-08-19 14:19:24 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:08:00 +0200 |
commit | 7ae9bd18032e8164da776647a7dd2a4e3b1ecea8 (patch) | |
tree | 9eda80397c40bd908a0f56d66323a14fe871ab00 /fs/btrfs/relocation.c | |
parent | btrfs: zoned: finish fully written block group (diff) | |
download | linux-7ae9bd18032e8164da776647a7dd2a4e3b1ecea8.tar.xz linux-7ae9bd18032e8164da776647a7dd2a4e3b1ecea8.zip |
btrfs: zoned: finish relocating block group
We will no longer write to a relocating block group. So, we can finish it
now.
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 914d403b4415..63d2b22cf438 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -25,6 +25,7 @@ #include "backref.h" #include "misc.h" #include "subpage.h" +#include "zoned.h" /* * Relocation overview @@ -4063,6 +4064,9 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) rc->block_group->start, rc->block_group->length); + ret = btrfs_zone_finish(rc->block_group); + WARN_ON(ret && ret != -EAGAIN); + while (1) { int finishes_stage; |