mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
drbd: Fix drbd_request_prepare() discard handling
[ Upstream commitfad2d4ef63
] 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:7435e9018f
("drbd: zero-out partial unaligned discards on local backend") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8a9e8b683a
commit
a567493430
@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long
|
||||
_drbd_start_io_acct(device, req);
|
||||
|
||||
/* process discards always from our submitter thread */
|
||||
if ((bio_op(bio) & REQ_OP_WRITE_ZEROES) ||
|
||||
(bio_op(bio) & REQ_OP_DISCARD))
|
||||
if (bio_op(bio) == REQ_OP_WRITE_ZEROES ||
|
||||
bio_op(bio) == REQ_OP_DISCARD)
|
||||
goto queue_for_submitter_thread;
|
||||
|
||||
if (rw == WRITE && req->private_bio && req->i.size
|
||||
|
Loading…
Reference in New Issue
Block a user