mbox series

[v2,0/3] btrfs: reduce repeated calls to btrfs_need_stripe_tree_update()

Message ID 20241216-btrfs_need_stripe_tree_update-cleanups-v2-0-42b6d0274da7@kernel.org (mailing list archive)
Headers show
Series btrfs: reduce repeated calls to btrfs_need_stripe_tree_update() | expand

Message

Johannes Thumshirn Dec. 16, 2024, 8:10 a.m. UTC
When working on RST backed RAID56 I was looking for a way to plumb the "use
RST or not" decision into the bio submission code and this way found that
we can cache the return of btrfs_need_raid_stripe_tree_update() in the
btrfs_io_context (and btrfs_io_stripe) so there's no need to do multiple
lookups for the same I/O.

Signed-off-by: Johannes Thumshirn <johannes.thjumshirn@wdc.com>
---
Changes in v2:
- remove pointless comments
- place 'use_rst' after 'max_errors' in struct btrfs_io_context
- fix typo
- don't break lines if they're < 85 chars
- Link to v1: https://lore.kernel.org/r/20241212-btrfs_need_stripe_tree_update-cleanups-v1-0-d842b6d8d02b@kernel.org

---
Johannes Thumshirn (3):
      btrfs: cache stripe tree usage in io_geometry
      btrfs: cache RAID stripe tree decision in btrfs_io_context
      btrfs: pass btrfs_io_geometry to is_single_device_io

 fs/btrfs/bio.c     |  3 +--
 fs/btrfs/volumes.c | 15 ++++++++-------
 fs/btrfs/volumes.h |  1 +
 3 files changed, 10 insertions(+), 9 deletions(-)
---
base-commit: 043ad78b53f999f39fbc0044fd8f69d25d300f4e
change-id: 20241212-btrfs_need_stripe_tree_update-cleanups-166f5e7e894c

Best regards,