mbox series

[v2,0/2] Introduce bdev_zone_is_seq()

Message ID 20241107064300.227731-1-dlemoal@kernel.org (mailing list archive)
Headers show
Series Introduce bdev_zone_is_seq() | expand

Message

Damien Le Moal Nov. 7, 2024, 6:42 a.m. UTC
Allow file systems to safely access a block device gendisk bitmap of
conventional zones to determine a zone type by:
1) Patch 1 - changing the gendisk conv_zones_bitmap to be RCU protected
2) Patch 2 - Introducing the helper function bdev_zone_is_seq()

This is in preparation for use in btrfs to remove the btrfs-managed
bitmap of conventional zones and in zoned support for xfs.

Changes from v1:
 - Use rcu_dereference() in disk_zone_is_conv() (patch 1) and rebase
   patch 2, as suggested by Christoph.

Damien Le Moal (2):
  block: RCU protect disk->conv_zones_bitmap
  block: Add a public bdev_zone_is_seq() helper

 block/blk-zoned.c      | 42 ++++++++++++++++++++++++------------------
 include/linux/blkdev.h | 29 ++++++++++++++++++++++++++++-
 2 files changed, 52 insertions(+), 19 deletions(-)

Comments

Johannes Thumshirn Nov. 7, 2024, 8:48 a.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
for the series
Jens Axboe Nov. 7, 2024, 10:36 p.m. UTC | #2
On Thu, 07 Nov 2024 15:42:58 +0900, Damien Le Moal wrote:
> Allow file systems to safely access a block device gendisk bitmap of
> conventional zones to determine a zone type by:
> 1) Patch 1 - changing the gendisk conv_zones_bitmap to be RCU protected
> 2) Patch 2 - Introducing the helper function bdev_zone_is_seq()
> 
> This is in preparation for use in btrfs to remove the btrfs-managed
> bitmap of conventional zones and in zoned support for xfs.
> 
> [...]

Applied, thanks!

[1/2] block: RCU protect disk->conv_zones_bitmap
      commit: d7cb6d7414ea1b33536fa6d11805cb8dceec1f97
[2/2] block: Add a public bdev_zone_is_seq() helper
      commit: f3d9bf05140dd242cdc33c431489a853f2bc1b67

Best regards,