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

Re: [PATCH v2] proto: add xNBD command NBD_CMD_CACHE to the spec



On 05/03/2018 05:07 PM, Eric Blake wrote:
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

The ability to request an NBD server to cache things locally,
without also spending time in the client reading what was just
cached, has proved useful to both the xNBD implementation
(public), and to a VM restore operation performed by Virtuozzo
atop qemu (not yet public).  Time to document this functionality,
rather than calling the command a failed experiment.

The documentation is rather fuzzy, in that it makes no
requirements on what constitutes a valid cache (a server can
implement this command as a no-op) and no guarantees that a
cache will benefit the client (although for a specific server
implementation, the client can indeed benefit).  But as the
command has a use in existing implementations, it's better
to document what we can to prevent future incompatible use
of the command.

Note that this proposal adds NBD_FLAG_SEND_CACHE which xNBD
did not use; meanwhile, the command NBD_CMD_CACHE is allowed
to fail with no visible side effects.  The documentation tries
to point out interoperability constraints resulting from
existing servers that understand the command but don't advertise
it, as well as existing clients that send the command even when
it is not advertised.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20180326161049.15981-1-vsementsov@virtuozzo.com>
[eblake: add commit message, add more documentation]
Signed-off-by: Eric Blake <eblake@redhat.com>
---

This is an updated version of the NBD_CMD_CACHE patch that
Vladimir proposed [1], trying to incorporate feedback raised
in that thread.

Any last comments? I'd like to go ahead and push this Monday if no one else chimes in over the weekend.


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply to: