Improve checks in blk_revalidate_disk_zones()
Status from this message: Applied to 6.5/scsi-staging, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 7 repliesApplied
- v25 patches 7 repliesSuperseded
- v15 patches 1 replySuperseded
Changes in v3 from the cover letter
- Rebased on current Linus tree to fix a conflict with scsi changes in patch 1.
- Added Reviewed-by tags.
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | scsi: sd_zbc: Set zone limits before revalidating zonesdrivers/ | +5 | 1 reply | |
| 2/5 | nvme: zns: Set zone limits before revalidating zonesdrivers/ | +4 | 1 reply | |
| 3/5 | block: nullblk: Set zone limits before revalidating zonesdrivers/ | +5 | 1 reply | |
| 4/5 | block: virtio_blk: Set zone limits before revalidating zonesdrivers/ | +15 | 1 reply | |
| 5/5 | block: improve checks in blk_revalidate_disk_zones()block/ | +50 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Bart Van Assche | Dmitry Fomichev | Johannes Thumshirn |
|---|---|---|---|
| 1/5 | R-b | R-b | |
| 2/5 | R-b | R-b | |
| 3/5 | R-b | R-b | |
| 4/5 | R-b | R-b | R-b |
| 5/5 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v3 0/5] Improve checks in blk_revalidate_disk_zones()
blk_revalidate_disk_zones() implements checks of the zones of a zoned block device, verifying that the zone size is a power of 2 number of sectors, that all zones (except possibly the last one) have the same size and that zones cover the entire addressing space of the device.
While these checks are appropriate to verify that well tested hardware devices have an adequate zone configurations, they lack in certain areas which may result in issues with potentially buggy emulated devices implemented with user drivers such as ublk or tcmu. Specifically, this function does not check if the device driver indicated support for the mandatory zone append writes, that is, if the device max_zone_append_sectors queue limit is set to a non-zero value. Additionally, invalid zones such as a zero length zone with a start sector equal to the device capacity will not be detected and result in out of bounds use of the zone bitmaps prepared with the callback function blk_revalidate_zone_cb().
This series address these issues by modifying the 4 block device drivers that currently support zoned block devices to ensure that they all set a zoned device zone size and max zone append sectors limit before executing blk_revalidate_disk_zones(). With these changes in place, patch 5 improves blk_revalidate_disk_zones() to address the missing checks, relying on the fact that the zone size and zone append limit are normally set when this function is called.
Changes from v2:
- Rebased on current Linus tree to fix a conflict with scsi changes in patch 1.
- Added Reviewed-by tags.
Changes from v1:
- Updated this cover letter and commit messages to include better explain for these patches
- Reworked patch 5 to simplify the checks
Damien Le Moal (5):
scsi: sd_zbc: Set zone limits before revalidating zones
nvme: zns: Set zone limits before revalidating zones
block: nullblk: Set zone limits before revalidating zones
block: virtio_blk: Set zone limits before revalidating zones
block: improve checks in blk_revalidate_disk_zones()
block/blk-zoned.c | 86 ++++++++++++++++++++-------------- drivers/block/null_blk/zoned.c | 16 ++----- drivers/block/virtio_blk.c | 34 ++++++-------- drivers/nvme/host/zns.c | 9 ++-- drivers/scsi/sd_zbc.c | 12 ++--- 5 files changed, 79 insertions(+), 78 deletions(-)
Signature · 1 line
2.41.0