Commit fad2d4ef authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

drbd: Fix drbd_request_prepare() discard handling

Fix the test that verifies whether bio_op(bio) represents a discard
or write zeroes operation. Compile-tested only.

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Fixes: 7435e901 ("drbd: zero-out partial unaligned discards on local backend")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1f57f8d4
...@@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long ...@@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long
_drbd_start_io_acct(device, req); _drbd_start_io_acct(device, req);
/* process discards always from our submitter thread */ /* process discards always from our submitter thread */
if ((bio_op(bio) & REQ_OP_WRITE_ZEROES) || if (bio_op(bio) == REQ_OP_WRITE_ZEROES ||
(bio_op(bio) & REQ_OP_DISCARD)) bio_op(bio) == REQ_OP_DISCARD)
goto queue_for_submitter_thread; goto queue_for_submitter_thread;
if (rw == WRITE && req->private_bio && req->i.size if (rw == WRITE && req->private_bio && req->i.size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment