Hi Alex, On Mon, May 16, 2011 at 06:23:33PM +0100, Alex Bligh wrote: > --On 16 May 2011 17:29:37 +0100 Alex Bligh <[email protected]> wrote: > > > I think the "<< 16" on line 215 is superfluous. The flags should > > simply be converted to host order, and assigned to "flags", so > > they will live in least significant two bytes (where they came > > from). > > In fact, unless lack of caffeine is getting to me, I don't see > how these ever get passed to the kernel anyway. The read only > flag, if it is set right, causes the BLKROSET ioctl to be > executed.
Currently there are no other flags that are of importance to the kernel, so indeed there's no way to inform the kernel of whatever it negotiated during handshake. > However, there is also a member of struct nbd_device in the > kernel called flags. As far as I can tell, this is always zero, > as it is never set to anything else. However, it is tested > for NBD_READ_ONLY at line 460 of nbd.c in the kernel. Unless > I'm missing something (quite possible) I don't think this > check is ever activated. Can't help you there; I don't do the kernel side of things, and indeed am utterly unfamiliar with kernel hacking (you mean there's another side to the syscall? whoa!) > I need to pass the remainder of the flags anyway, so I proposed adding > a NBD_SET_FLAGS ioctl to pass them through, and not checking for > errors in the client (as older kernels won't support it). Yeah, that's been suggested previously[1], and Paul seemed agreeable to that. It hasn't been implemented yet, though, TTBOMK; I guess Paul is busy with other things currently. [1] http://sourceforge.net/mailarchive/forum.php?thread_name=20101229221020.GA32735%40celtic.nixsys.be&forum_name=nbd-general Okay, so we called it NBD_SET_OPTS. Whatever. -- The volume of a pizza of thickness a and radius z can be described by the following formula: pi zz a ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
