diff options
| author | Johannes Thumshirn <[email protected]> | 2024-07-31 22:43:05 +0200 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2024-09-10 16:51:17 +0200 |
| commit | f4d39cf1cebfb83f76ffdd632958248aff364e33 (patch) | |
| tree | 45ee62667e704825903515e1e399c7bf0f270ed1 | |
| parent | d6106f0dc502c8ec375d6612418f7aa0e3e7d2b7 (diff) | |
btrfs: set search_commit_root on stripe io in case of relocation
Set rst_search_commit_root in the btrfs_io_stripe we're passing to
btrfs_map_block() in case we're doing data relocation.
Reviewed-by: Josef Bacik <[email protected]>
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
Signed-off-by: David Sterba <[email protected]>
| -rw-r--r-- | fs/btrfs/bio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 36d0e52faeec..f6cb58d7f16a 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -678,7 +678,10 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) blk_status_t ret; int error; - smap.rst_search_commit_root = !bbio->inode; + if (!bbio->inode || btrfs_is_data_reloc_root(inode->root)) + smap.rst_search_commit_root = true; + else + smap.rst_search_commit_root = false; btrfs_bio_counter_inc_blocked(fs_info); error = btrfs_map_block(fs_info, btrfs_op(bio), logical, &map_length, |