* [PATCH] dm-ebs: Fix incorrect checking for REQ_OP_FLUSH.
@ 2020-07-31 22:46 John Dorminy
2020-08-04 14:53 ` Heinz Mauelshagen
0 siblings, 1 reply; 2+ messages in thread
From: John Dorminy @ 2020-07-31 22:46 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer, dm-devel; +Cc: John Dorminy
REQ_OP_FLUSH was being treated as a flag, but the operation
part of bio->bi_opf must be treated as a whole. Change to
accessing the operation part via bio_op(bio) and checking
for equality.
Signed-off-by: John Dorminy <jdorminy@redhat.com>
---
drivers/md/dm-ebs-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ebs-target.c b/drivers/md/dm-ebs-target.c
index 44451276f128..cb85610527c2 100644
--- a/drivers/md/dm-ebs-target.c
+++ b/drivers/md/dm-ebs-target.c
@@ -363,7 +363,7 @@ static int ebs_map(struct dm_target *ti, struct bio *bio)
bio_set_dev(bio, ec->dev->bdev);
bio->bi_iter.bi_sector = ec->start + dm_target_offset(ti, bio->bi_iter.bi_sector);
- if (unlikely(bio->bi_opf & REQ_OP_FLUSH))
+ if (unlikely(bio_op(bio) == REQ_OP_FLUSH))
return DM_MAPIO_REMAPPED;
/*
* Only queue for bufio processing in case of partial or overlapping buffers
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dm-ebs: Fix incorrect checking for REQ_OP_FLUSH.
2020-07-31 22:46 [PATCH] dm-ebs: Fix incorrect checking for REQ_OP_FLUSH John Dorminy
@ 2020-08-04 14:53 ` Heinz Mauelshagen
0 siblings, 0 replies; 2+ messages in thread
From: Heinz Mauelshagen @ 2020-08-04 14:53 UTC (permalink / raw)
To: John Dorminy, Alasdair Kergon, Mike Snitzer, dm-devel
Acked-by: Heinz Mauelshagen <heinzm@redhat.com>
On 8/1/20 12:46 AM, John Dorminy wrote:
> REQ_OP_FLUSH was being treated as a flag, but the operation
> part of bio->bi_opf must be treated as a whole. Change to
> accessing the operation part via bio_op(bio) and checking
> for equality.
>
> Signed-off-by: John Dorminy <jdorminy@redhat.com>
> ---
> drivers/md/dm-ebs-target.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-ebs-target.c b/drivers/md/dm-ebs-target.c
> index 44451276f128..cb85610527c2 100644
> --- a/drivers/md/dm-ebs-target.c
> +++ b/drivers/md/dm-ebs-target.c
> @@ -363,7 +363,7 @@ static int ebs_map(struct dm_target *ti, struct bio *bio)
> bio_set_dev(bio, ec->dev->bdev);
> bio->bi_iter.bi_sector = ec->start + dm_target_offset(ti, bio->bi_iter.bi_sector);
>
> - if (unlikely(bio->bi_opf & REQ_OP_FLUSH))
> + if (unlikely(bio_op(bio) == REQ_OP_FLUSH))
> return DM_MAPIO_REMAPPED;
> /*
> * Only queue for bufio processing in case of partial
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-04 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 22:46 [PATCH] dm-ebs: Fix incorrect checking for REQ_OP_FLUSH John Dorminy
2020-08-04 14:53 ` Heinz Mauelshagen
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.