Final round of NBD alignment fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | nbd/server: Fix blockstatus tracenbd/ | +3 | 1 reply | |
| 2/7 | nbd/server: Trace server noncompliance on unaligned requestsnbd/ nbd/ | +13 | 4 replies | |
| 3/7 | nbd/server: Don't fail NBD_OPT_INFO for byte-aligned sourcesnbd/ | +8 | 1 reply | |
| 4/7 | iotests: Update 241 to expose backing layer fragmentationtests/ tests/ | +28 | 2 replies | |
| 5/7 | block: Fix BDRV_BLOCK_RAW status to honor alignmentblock/ tests/ tests/ +1 more | +122 | 2 replies | |
| 6/7 | nbd/server: Avoid unaligned read/block_status from backingblock/ include/ nbd/ | +50 | 0 replies | |
| 7/7 | nbd/server: Avoid unaligned dirty-bitmap statusnbd/ | +34 | 0 replies |
Reviews trailers per patch
4 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Kevin Wolf | Vladimir Sementsov-Ogievskiy |
|---|---|---|
| Series | R-b | |
| 1/7 | R-b | |
| 2/7 | R-b | |
| 3/7 | R-b | |
| 4/7 | T-b R-b | |
| 5/7 | ||
| 6/7 | ||
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH for-4.0? 0/7] Final round of NBD alignment fixes
My recent pull request for -rc2 documented several places where our server still does not comply with the NBD specification with regards to alignment. This series finishes the work in making everything compliant, insofar as I could test.
The first three patches are rather trivial - they don't drive -rc3 on their own, but are worth having if there is another patch that we want in 4.0 (oh, and I need to fix the missing space in nbd/client's error message in commit 3add3ab7, also in that same category but not posted here).
Patch 4 is as close as I can get to demonstrating the remaining alignment bugs in existing qemu (the test passes on current master, but fails if you revert the client workarounds, and then passes again once you apply the tail of this series to fix the server noncompliance). (Viewing traces is a lot more informative than running iotests when it comes to diagnosing protocol compliance issues, although it is also a lot slower and more verbose). Again, not something to drive -rc3 on its own, but worth having if we want the rest.
Patches 5-6 fix the most common cases of bad server alignments, but does so by changing a fundamental algorithm in io.c:bdrv_co_block_status() - any time we grab block status by deferral with BDRV_BLOCK_RAW, we want to ensure that the lower layer status is aligned to the requirements of the upper layer. While it passed iotests for me, I'm very much on the fence as to whether this is 4.0 material as a bug fix, or whether we declare that because the alignment bugs are not a regression over 3.1, we save the patch until 4.1.
Patch 7 is definitely not 4.0 material - it fixes a bug that I could not provoke in practice, without applying other patches to let NBD exports see through blkdebug (Max's series to fix filter handling will presumably be applied for 4.1, at which point patch 7 should be rebased on top of those patches).
Eric Blake (7):
nbd/server: Fix blockstatus trace
nbd/server: Trace server noncompliance on unaligned requests nbd/server: Don't fail NBD_OPT_INFO for byte-aligned sources
iotests: Update 241 to expose backing layer fragmentation
block: Fix BDRV_BLOCK_RAW status to honor alignment nbd/server: Avoid unaligned read/block_status from backing nbd/server: Avoid unaligned dirty-bitmap status
include/block/block.h | 2 + block/io.c | 155 +++++++++++++++++++++++++++++++++++-- nbd/server.c | 88 +++++++++++++++------ nbd/trace-events | 1 + tests/qemu-iotests/221 | 10 +++ tests/qemu-iotests/221.out | 6 ++ tests/qemu-iotests/241 | 20 ++++- tests/qemu-iotests/241.out | 12 ++- 8 files changed, 258 insertions(+), 36 deletions(-)
Signature · 1 line
2.20.1