[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1400283807-27930-1-git-send-email-kroosec@gmail.com>
Date: Sat, 17 May 2014 00:43:27 +0100
From: Hani Benhabiles <kroosec@...il.com>
To: Paul.Clements@...eleye.com
Cc: nbd-general@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: [PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.
Len field is already set to zero, but not the from field which is sent as
0xfffffffffffffe00. This makes no sense, and may cause confuse server
implementations doing sanity checks (qemu-nbd is an example.)
Signed-off-by: Hani Benhabiles <hani@...ux.com>
---
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 3a70ea2..657bdac 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -246,7 +246,7 @@ static int nbd_send_req(struct nbd_device *nbd, struct request *req)
request.magic = htonl(NBD_REQUEST_MAGIC);
request.type = htonl(nbd_cmd(req));
- if (nbd_cmd(req) == NBD_CMD_FLUSH) {
+ if (nbd_cmd(req) == NBD_CMD_FLUSH || nbd_cmd(req) == NBD_CMD_DISC) {
/* Other values are reserved for FLUSH requests. */
request.from = 0;
request.len = 0;
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists