projects
/
nbd-module.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f6cc2b6
)
nbd: Fix using zero offset and length for REQ_FLUSH properly
master
author
Alex Bligh <alex@alex.org.uk>
Sun, 22 May 2011 17:50:49 +0000
(18:50 +0100)
committer
Alex Bligh <alex@alex.org.uk>
Sun, 22 May 2011 17:50:49 +0000
(18:50 +0100)
nbd.c
patch
|
blob
|
history
diff --git
a/nbd.c
b/nbd.c
index
37949be
..
f665f54
100644
(file)
--- a/
nbd.c
+++ b/
nbd.c
@@
-248,7
+248,7
@@
static int nbd_send_req(struct nbd_device *lo, struct request *req)
(( (req->cmd_flags & REQ_FUA) && (lo->flags & NBD_FLAG_SEND_FUA)) ?
NBD_CMD_FLAG_FUA : 0));
/* Send from & len as zero on FLUSH - other values reserved per protocol */
(( (req->cmd_flags & REQ_FUA) && (lo->flags & NBD_FLAG_SEND_FUA)) ?
NBD_CMD_FLAG_FUA : 0));
/* Send from & len as zero on FLUSH - other values reserved per protocol */
- if (request.type == NBD_CMD_FLUSH) {
+ if (nbd_cmd(req) == NBD_CMD_FLUSH) {
request.from = 0;
request.len = 0;
} else {
request.from = 0;
request.len = 0;
} else {