Skip to content

block: fix the zone write granularity and the zone append limit

Niklas Cassel qemu-devel 6 versions – Applied

Status from this message: Thanks, applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest15 patches 12 repliesApplied
  2. v515 patches 1 replySuperseded
  3. v412 patches 16 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v312 patches6 repliesSuperseded
v211 patches4 repliesSuperseded
v112 patches12 repliesSuperseded

Changes in v6 from the cover letter

-Picked up Stefan's Reviewed-by tags that he gave when reviewing v4.
Patches that have changed significantly since v4 have had tags dropped (i.e. they will have neither Damien's nor Stefan's Reviewed-by tags).

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/15block: widen BlockLimits.zone_size to uint64_tblock/file-posix.c include/block/block_int-common.h+2 -20 replies
2/15virtio-blk: do not merge requests across a zone boundaryblock/block-backend.c hw/block/virtio-blk.c include/system/block-backend-io.h+33 -10 replies
3/15block: add a helper for the index of the zone an offset falls inblock/file-posix.c block/io.c hw/block/virtio-blk.c +2 more+26 -50 replies
4/15block: add a helper to check if a zone is conventionalblock/io.c hw/block/virtio-blk.c include/block/block-io.h+14 -11 reply
5/15hw/block: derive the zone write granularity from the block sizeshw/block/block.c hw/block/virtio-blk.c include/block/block_int-common.h +1 more+32 -61 reply
6/15virtio-blk: check the write granularity of writes to sequential zoneshw/block/virtio-blk.c+37 -10 replies
7/15hw/block: reject a zoned device that the block sizes cannot addresshw/block/block.c hw/block/virtio-blk.c include/hw/block/block.h+68 -01 reply
8/15block: reject zone appends that are not a multiple of the sector sizeblock/io.c+10 -00 replies
9/15block: reject a zone append that is larger than a zoneblock/io.c+12 -01 reply
10/15file-posix: remove the zone append write granularity checkblock/file-posix.c+1 -150 replies
11/15virtio-blk: add a max-append-sectors propertyhw/block/virtio-blk.c include/hw/virtio/virtio-blk.h+61 -71 reply
12/15block: remove BlockLimits.max_append_sectorsblock/file-posix.c include/block/block_int-common.h+0 -81 reply
13/15file-posix: reject a zone append past the device capacityblock/file-posix.c+7 -00 replies
14/15file-posix: reject a zone append to a full or conventional zoneblock/file-posix.c block/io.c include/block/block-io.h+37 -10 replies
15/15block: do not use CoroutineIOCompletion to hold a return valueblock/io.c+11 -180 replies

Reviews trailers per patch

14 of 15 patches have a Reviewed-by or Acked-by.

PatchNiklas CasselDamien Le MoalStefan Hajnoczi
1/15R-b R-b R-b
2/15R-b R-b R-b
3/15R-b R-b
4/15R-b
5/15R-b
6/15R-b R-b
7/15R-b
8/15R-b R-b
9/15R-b
10/15R-b R-b
11/15R-b
12/15R-b
13/15R-b R-b
14/15R-b R-b
15/15

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.

Read the v6 thread

Cover letter [PATCH v6 00/15] block: fix the zone write granularity and the zone append limit

Hello Stefan, Kevin, and everyone else,

This series fixes how QEMU reports and enforces the two constraints that a zoned device places on a write to a sequential zone: the write granularity, and the largest zone append that it accepts. It also fixes two bugs in the zone append emulation in file-posix, one of which a guest can reach.

Most of it is preparation for Sam Li's zoned qcow2 series. The first two patches are taken directly from there, as they are unrelated to qcow2.

Changes since v5:
-Picked up Stefan's Reviewed-by tags that he gave when reviewing v4.
Patches that have changed significantly since v4 have had tags dropped (i.e. they will have neither Damien's nor Stefan's Reviewed-by tags).

Niklas Cassel (13):
block: add a helper for the index of the zone an offset falls in
block: add a helper to check if a zone is conventional hw/block: derive the zone write granularity from the block sizes
virtio-blk: check the write granularity of writes to sequential zones hw/block: reject a zoned device that the block sizes cannot address
block: reject zone appends that are not a multiple of the sector size
block: reject a zone append that is larger than a zone
file-posix: remove the zone append write granularity check
virtio-blk: add a max-append-sectors property
block: remove BlockLimits.max_append_sectors
file-posix: reject a zone append past the device capacity
file-posix: reject a zone append to a full or conventional zone
block: do not use CoroutineIOCompletion to hold a return value

Sam Li (2):
block: widen BlockLimits.zone_size to uint64_t
virtio-blk: do not merge requests across a zone boundary

 block/block-backend.c             |  11 +++
 block/file-posix.c                |  59 +++++++-----
 block/io.c                        |  79 ++++++++++++----
 hw/block/block.c                  |  68 ++++++++++++++
 hw/block/virtio-blk.c             | 146 ++++++++++++++++++++++++++----
 include/block/block-io.h          |  14 +++
 include/block/block_int-common.h  |  19 +++-
 include/hw/block/block.h          |  14 +++
 include/hw/virtio/virtio-blk.h    |   1 +
 include/system/block-backend-io.h |   1 +
 10 files changed, 349 insertions(+), 63 deletions(-)

base-commit: 3b5d71cc3652fa7f5ecc449f05dae3ead2b718d7

Signature · 1 line
2.55.0