Re: [PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-25 Thread Hani Benhabiles
On Sun, May 25, 2014 at 02:11:13PM -0400, Paul Clements wrote: > On Sun, May 25, 2014 at 6:18 AM, Hani Benhabiles wrote: > > On Sun, May 18, 2014 at 10:11:13AM +0100, Hani Benhabiles wrote: > >> On Fri, May 16, 2014 at 10:56:33PM -0400, Paul Clements wrote: > >> > Agreed. But better yet, the reque

Re: [PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-25 Thread Paul Clements
On Sun, May 25, 2014 at 6:18 AM, Hani Benhabiles wrote: > On Sun, May 18, 2014 at 10:11:13AM +0100, Hani Benhabiles wrote: >> On Fri, May 16, 2014 at 10:56:33PM -0400, Paul Clements wrote: >> > Agreed. But better yet, the request structure should just be zeroed when >> > it's allocated. >> > >> >>

Re: [PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-25 Thread Hani Benhabiles
On Sun, May 18, 2014 at 10:11:13AM +0100, Hani Benhabiles wrote: > On Fri, May 16, 2014 at 10:56:33PM -0400, Paul Clements wrote: > > Agreed. But better yet, the request structure should just be zeroed when > > it's allocated. > > > > It is already initialized in __nbd_ioctl() with the blk_rq_in

Re: [PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-18 Thread Hani Benhabiles
On Fri, May 16, 2014 at 10:56:33PM -0400, Paul Clements wrote: > Agreed. But better yet, the request structure should just be zeroed when > it's allocated. > It is already initialized in __nbd_ioctl() with the blk_rq_init() call which sets the __sector value to -1 (which is 0xfe00 af

[PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-16 Thread Hani Benhabiles
Len field is already set to zero, but not the from field which is sent as 0xfe00. This makes no sense, and may cause confuse server implementations doing sanity checks (qemu-nbd is an example.) Signed-off-by: Hani Benhabiles --- drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion