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

Re: [Nbd] Some errors in the FOSDEM nbd talk



On Mon, Feb 06, 2017 at 12:06:42PM +0000, Richard W.M. Jones wrote:
> On Mon, Feb 06, 2017 at 11:22:04AM +0000, Richard W.M. Jones wrote:
> > You write "Multiple client connections for a single export", and not
> > supported by qemu or nbdkit.  Assuming that means the common case
> > where multiple clients connect to a server and access the same export,
> > and not something else, nbdkit certainly supports that, and has done
> > since the beginning.  qemu-nbd supports it too, but you have to use
> > the -t option.
> 
> Now I see from the talk that this means the NBD client supports
> multiple connections,

Yeah, sortof. I meant to clarify that but I forgot, sorry.

> so not applicable to nbdkit / qemu-nbd.

Actually it is.

You'll need to add the NBD_FLAG_CAN_MULTI_CONN transmission flag if it's
safe to connect multiple times from the same client (i.e., cache
coherency in the face of NBD_CMD_FLUSH and/or NBD_CMD_FLAG_FUA can be
guaranteed across connections), as explained in the spec for that flag.

I'm guessing that in the specific case of nbdkit this should be a
decision you leave to the plugin, as it might depend on how things are
written. In the case of nbd-server, I only set that flag if the
copy-on-write feature is not enabled, since when it is enabled,
nbd-server writes changes to a per-connection "difffile", so then these
changes will not (ever) be shared across connections and the client
would get very confused.

-- 
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
       people in the world who think they really understand all of its rules,
       and pretty much all of them are just lying to themselves too.
 -- #debian-devel, OFTC, 2016-02-12



Reply to: