diff options
author | Mike Christie <mchristi@redhat.com> | 2016-06-05 22:32:23 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-07 22:41:38 +0300 |
commit | 3a5e02ced11e22ecd9da3d6710afe15bcfee1d10 (patch) | |
tree | 78f6d1a737b01b559b61310b9355f1f7ecfdd54c /drivers/block/nbd.c | |
parent | 4e1b2d52a80d79296a5d899d73249748dea71a53 (diff) | |
download | linux-3a5e02ced11e22ecd9da3d6710afe15bcfee1d10.tar.xz |
block, drivers: add REQ_OP_FLUSH operation
This adds a REQ_OP_FLUSH operation that is sent to request_fn
based drivers by the block layer's flush code, instead of
sending requests with the request->cmd_flags REQ_FLUSH bit set.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 6c2c28d124d0..d6f3c9336f29 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -284,7 +284,7 @@ static int nbd_send_req(struct nbd_device *nbd, struct request *req) type = NBD_CMD_DISC; else if (req_op(req) == REQ_OP_DISCARD) type = NBD_CMD_TRIM; - else if (req->cmd_flags & REQ_FLUSH) + else if (req_op(req) == REQ_OP_FLUSH) type = NBD_CMD_FLUSH; else if (rq_data_dir(req) == WRITE) type = NBD_CMD_WRITE; |