Skip to content

Commit f84353c

Browse files
naotakdave
authored andcommitted
btrfs: zoned: zone finish data relocation BG with last IO
For data block groups, we zone finish a zone (or, just deactivate it) when seeing the last IO in btrfs_finish_ordered_io(). That is only called for IOs using ZONE_APPEND, but we use a regular WRITE command for data relocation IOs. Detect it and call btrfs_zone_finish_endio() properly. Fixes: be1a1d7 ("btrfs: zoned: finish fully written block group") CC: [email protected] # 6.1+ Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Naohiro Aota <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 0cad8f1 commit f84353c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/btrfs/inode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,6 +3108,9 @@ int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
31083108
btrfs_rewrite_logical_zoned(ordered_extent);
31093109
btrfs_zone_finish_endio(fs_info, ordered_extent->disk_bytenr,
31103110
ordered_extent->disk_num_bytes);
3111+
} else if (btrfs_is_data_reloc_root(inode->root)) {
3112+
btrfs_zone_finish_endio(fs_info, ordered_extent->disk_bytenr,
3113+
ordered_extent->disk_num_bytes);
31113114
}
31123115

31133116
if (test_bit(BTRFS_ORDERED_TRUNCATED, &ordered_extent->flags)) {

0 commit comments

Comments
 (0)