* [PATCH] null_blk: fix checking for REQ_FUA
@ 2019-02-22 19:00 Heinz Mauelshagen
2019-02-28 21:03 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Heinz Mauelshagen @ 2019-02-22 19:00 UTC (permalink / raw)
To: heinzm, axboe; +Cc: linux-kernel, linux-block
null_handle_bio() erroneously uses the bio_op macro
which masks respective request flag bits including REQ_FUA
out thus failing the check.
Fix by checking bio->bi_opf directly.
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
---
drivers/block/null_blk_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 62c9654b9ce8..04b9d415511b 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -1104,7 +1104,7 @@ static int null_handle_bio(struct nullb_cmd *cmd)
len = bvec.bv_len;
err = null_transfer(nullb, bvec.bv_page, len, bvec.bv_offset,
op_is_write(bio_op(bio)), sector,
- bio_op(bio) & REQ_FUA);
+ bio->bi_opf & REQ_FUA);
if (err) {
spin_unlock_irq(&nullb->lock);
return err;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] null_blk: fix checking for REQ_FUA
2019-02-22 19:00 [PATCH] null_blk: fix checking for REQ_FUA Heinz Mauelshagen
@ 2019-02-28 21:03 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-02-28 21:03 UTC (permalink / raw)
To: Heinz Mauelshagen; +Cc: linux-kernel, linux-block
On 2/22/19 12:00 PM, Heinz Mauelshagen wrote:
> null_handle_bio() erroneously uses the bio_op macro
> which masks respective request flag bits including REQ_FUA
> out thus failing the check.
>
> Fix by checking bio->bi_opf directly.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-28 21:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 19:00 [PATCH] null_blk: fix checking for REQ_FUA Heinz Mauelshagen
2019-02-28 21:03 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).