On 04/13/2018 09:31 AM, Vladimir Sementsov-Ogievskiy wrote: > Handle nbd CACHE command. Just do read, without sending read data back. > Cache mechanism should be done by exported node driver chain. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > include/block/nbd.h | 3 ++- > nbd/server.c | 10 ++++++---- > 2 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/include/block/nbd.h b/include/block/nbd.h > index fcdcd54502..b4793d0a29 100644 > --- a/include/block/nbd.h > +++ b/include/block/nbd.h > @@ -135,6 +135,7 @@ typedef struct NBDExtent { > #define NBD_FLAG_SEND_TRIM (1 << 5) /* Send TRIM (discard) */ > #define NBD_FLAG_SEND_WRITE_ZEROES (1 << 6) /* Send WRITE_ZEROES */ > #define NBD_FLAG_SEND_DF (1 << 7) /* Send DF (Do not Fragment) */ > +#define NBD_FLAG_SEND_CACHE (1 << 8) /* Send CACHE (prefetch) */
Hmm, this flag is not documented in the upstream NBD protocol yet; are we sure it matches the xNBD implementation? We'll want at least a documentation patch proposed for the NBD list before taking this. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature