qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-4.0? 0/7] Final round of NBD alignment fixes
@ 2019-04-03  3:05 Eric Blake
  2019-04-03  3:05 ` [Qemu-devel] [PATCH 1/7] nbd/server: Fix blockstatus trace Eric Blake
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Eric Blake @ 2019-04-03  3:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: jsnow, vsementsov, qemu-block

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(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2019-04-10 20:46 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-03  3:05 [Qemu-devel] [PATCH for-4.0? 0/7] Final round of NBD alignment fixes Eric Blake
2019-04-03  3:05 ` [Qemu-devel] [PATCH 1/7] nbd/server: Fix blockstatus trace Eric Blake
2019-04-05 14:13   ` Vladimir Sementsov-Ogievskiy
2019-04-05 14:13     ` Vladimir Sementsov-Ogievskiy
2019-04-03  3:05 ` [Qemu-devel] [PATCH 2/7] nbd/server: Trace server noncompliance on unaligned requests Eric Blake
2019-04-05 14:39   ` Vladimir Sementsov-Ogievskiy
2019-04-05 14:39     ` Vladimir Sementsov-Ogievskiy
2019-04-05 20:04     ` Eric Blake
2019-04-05 20:04       ` Eric Blake
2019-04-08 12:14       ` Vladimir Sementsov-Ogievskiy
2019-04-08 12:14         ` Vladimir Sementsov-Ogievskiy
2019-04-08 14:32         ` Eric Blake
2019-04-08 14:32           ` Eric Blake
2019-04-03  3:05 ` [Qemu-devel] [PATCH 3/7] nbd/server: Don't fail NBD_OPT_INFO for byte-aligned sources Eric Blake
2019-04-05 15:34   ` Vladimir Sementsov-Ogievskiy
2019-04-05 15:34     ` Vladimir Sementsov-Ogievskiy
2019-04-03  3:05 ` [Qemu-devel] [PATCH 4/7] iotests: Update 241 to expose backing layer fragmentation Eric Blake
2019-04-08 13:51   ` Vladimir Sementsov-Ogievskiy
2019-04-08 13:51     ` Vladimir Sementsov-Ogievskiy
2019-04-10 20:44     ` Eric Blake
2019-04-10 20:44       ` Eric Blake
2019-04-03  3:05 ` [Qemu-devel] [PATCH 5/7] block: Fix BDRV_BLOCK_RAW status to honor alignment Eric Blake
2019-04-03 13:03   ` Kevin Wolf
2019-04-03 14:02     ` Eric Blake
2019-04-03  3:05 ` [Qemu-devel] [PATCH 6/7] nbd/server: Avoid unaligned read/block_status from backing Eric Blake
2019-04-03  3:05 ` [Qemu-devel] [PATCH for-4.1 7/7] nbd/server: Avoid unaligned dirty-bitmap status Eric Blake
2019-04-04 14:52 ` [Qemu-devel] [PATCH for-4.0? 8/7] nbd/client: Fix error message for server with unusable sizing Eric Blake
2019-04-04 15:22   ` [Qemu-devel] [Qemu-block] " Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).