qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] NBD: flag handling cleanup
@ 2016-03-31 21:20 Eric Blake
  2016-03-31 21:20 ` [Qemu-devel] [PATCH 1/3] nbd: Treat flags vs. command type as separate fields Eric Blake
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eric Blake @ 2016-03-31 21:20 UTC (permalink / raw)
  To: qemu-devel

I'm currently helping with work on adding extensions to the
upstream NBD protocol to allow more efficient handling of sparse
files, and wanted to get my feet wet in the qemu NBD code (both
client and server), to actually implement those proposals to see
how well they work.  In the process, I found a flaw where we
were silently ignoring bad client flags; the same flaw was just
recently patched in upstream NBD:
https://github.com/yoe/nbd/commit/ab22e0820

I didn't go quite as far as upstream (that is, I still silently
permit FLAG_FUA in combination with CMD_TRIM, which does not
have defined semantics upstream, and where our current
implementation might be too weak compared to the actual semantics
that upstream wants to propose, because we aren't actually
flushing in that case), but this at least gets rid of the
worst offenses and starts to document some anomolies that may
need later fixing.

Eric Blake (3):
  nbd: Treat flags vs. command type as separate fields
  nbd: Fix poor debug message
  nbd: Reject unknown request flags

 include/block/nbd.h | 17 +++++++++++------
 block/nbd-client.c  | 11 ++++-------
 nbd/client.c        | 19 +++++++++++--------
 nbd/server.c        | 32 ++++++++++++++++++++------------
 4 files changed, 46 insertions(+), 33 deletions(-)

-- 
2.5.5

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

end of thread, other threads:[~2016-04-01 10:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 21:20 [Qemu-devel] [PATCH 0/3] NBD: flag handling cleanup Eric Blake
2016-03-31 21:20 ` [Qemu-devel] [PATCH 1/3] nbd: Treat flags vs. command type as separate fields Eric Blake
2016-03-31 21:20 ` [Qemu-devel] [PATCH 2/3] nbd: Fix poor debug message Eric Blake
2016-04-01 10:47   ` Paolo Bonzini
2016-03-31 21:20 ` [Qemu-devel] [PATCH 3/3] nbd: Reject unknown request flags Eric Blake
2016-04-01 10:47   ` Paolo Bonzini

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