qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/3] NBD: flag handling cleanup


From: Eric Blake
Subject: [Qemu-devel] [PATCH 0/3] NBD: flag handling cleanup
Date: Thu, 31 Mar 2016 15:20:19 -0600

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]