--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. 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. 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). -- Alex Bligh ------------------------------------------------------------------------------ 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
