mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
btrfs: cache RAID stripe tree decision in btrfs_io_context
Cache the decision if a particular I/O needs to update RAID stripe tree entries in struct btrfs_io_context. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f31fcf0b29
commit
dd88750692
@ -725,8 +725,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
|
||||
bio->bi_opf |= REQ_OP_ZONE_APPEND;
|
||||
}
|
||||
|
||||
if (is_data_bbio(bbio) && bioc &&
|
||||
btrfs_need_stripe_tree_update(bioc->fs_info, bioc->map_type)) {
|
||||
if (is_data_bbio(bbio) && bioc && bioc->use_rst) {
|
||||
/*
|
||||
* No locking for the list update, as we only add to
|
||||
* the list in the I/O submission path, and list
|
||||
|
@ -6663,6 +6663,7 @@ int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
|
||||
goto out;
|
||||
}
|
||||
bioc->map_type = map->type;
|
||||
bioc->use_rst = io_geom.use_rst;
|
||||
|
||||
/*
|
||||
* For RAID56 full map, we need to make sure the stripes[] follows the
|
||||
|
@ -485,6 +485,7 @@ struct btrfs_io_context {
|
||||
struct bio *orig_bio;
|
||||
atomic_t error;
|
||||
u16 max_errors;
|
||||
bool use_rst;
|
||||
|
||||
u64 logical;
|
||||
u64 size;
|
||||
|
Loading…
Reference in New Issue
Block a user