* [PATCH] drbd: Fix drbd_request_prepare() discard handling
@ 2018-06-25 22:51 Bart Van Assche
2018-06-29 8:59 ` Christoph Hellwig
2018-06-29 13:53 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2018-06-25 22:51 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Christoph Hellwig, Bart Van Assche, Philipp Reisner,
Lars Ellenberg
Fix the test that verifies whether bio_op(bio) represents a discard
or write zeroes operation. Compile-tested only.
Fixes: 7435e9018f91 ("drbd: zero-out partial unaligned discards on local backend")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_req.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 24f0884ec01f..a8e7d7318e37 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drbd: Fix drbd_request_prepare() discard handling
2018-06-25 22:51 [PATCH] drbd: Fix drbd_request_prepare() discard handling Bart Van Assche
@ 2018-06-29 8:59 ` Christoph Hellwig
2018-06-29 13:53 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-06-29 8:59 UTC (permalink / raw)
To: Bart Van Assche
Cc: Jens Axboe, linux-block, Christoph Hellwig, Philipp Reisner,
Lars Ellenberg
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drbd: Fix drbd_request_prepare() discard handling
2018-06-25 22:51 [PATCH] drbd: Fix drbd_request_prepare() discard handling Bart Van Assche
2018-06-29 8:59 ` Christoph Hellwig
@ 2018-06-29 13:53 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2018-06-29 13:53 UTC (permalink / raw)
To: Bart Van Assche
Cc: linux-block, Christoph Hellwig, Philipp Reisner, Lars Ellenberg
On 6/25/18 4:51 PM, Bart Van Assche wrote:
> Fix the test that verifies whether bio_op(bio) represents a discard
> or write zeroes operation. Compile-tested only.
Applied, thanks Bart.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-29 13:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 22:51 [PATCH] drbd: Fix drbd_request_prepare() discard handling Bart Van Assche
2018-06-29 8:59 ` Christoph Hellwig
2018-06-29 13:53 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.