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>
This commit is contained in:
Mike Christie
2016-06-05 14:32:23 -05:00
committed by Jens Axboe
orang tua 4e1b2d52a8
melakukan 3a5e02ced1
20 mengubah file dengan 40 tambahan dan 31 penghapusan

Melihat File

@@ -1286,7 +1286,7 @@ static void do_ubd_request(struct request_queue *q)
req = dev->request;
if (req->cmd_flags & REQ_FLUSH) {
if (req_op(req) == REQ_OP_FLUSH) {
io_req = kmalloc(sizeof(struct io_thread_req),
GFP_ATOMIC);
if (io_req == NULL) {