* [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
@ 2018-06-07 8:29 ` Hannes Reinecke
0 siblings, 0 replies; 10+ messages in thread
From: Hannes Reinecke @ 2018-06-07 8:29 UTC (permalink / raw)
To: Jens Axboe
Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme,
linux-block, Hannes Reinecke, Hannes Reinecke
blk_partition_remap() will only clear bi_partno if an actual remapping
has happened. But flush request et al don't have an actual size, so
the remapping doesn't happen and bi_partno is never cleared.
So for stacked devices blk_partition_remap() will be called on each level.
If (as is the case for native nvme multipathing) one of the lower-level
devices do _not_support partitioning a spurious I/O error is generated.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 3f56be15f17e..cf0ee764b908 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2220,10 +2220,10 @@ static inline int blk_partition_remap(struct bio *bio)
if (bio_check_eod(bio, part_nr_sects_read(p)))
goto out;
bio->bi_iter.bi_sector += p->start_sect;
- bio->bi_partno = 0;
trace_block_bio_remap(bio->bi_disk->queue, bio, part_devt(p),
bio->bi_iter.bi_sector - p->start_sect);
}
+ bio->bi_partno = 0;
ret = 0;
out:
rcu_read_unlock();
--
2.12.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
@ 2018-06-07 8:29 ` Hannes Reinecke
0 siblings, 0 replies; 10+ messages in thread
From: Hannes Reinecke @ 2018-06-07 8:29 UTC (permalink / raw)
blk_partition_remap() will only clear bi_partno if an actual remapping
has happened. But flush request et al don't have an actual size, so
the remapping doesn't happen and bi_partno is never cleared.
So for stacked devices blk_partition_remap() will be called on each level.
If (as is the case for native nvme multipathing) one of the lower-level
devices do _not_support partitioning a spurious I/O error is generated.
Signed-off-by: Hannes Reinecke <hare at suse.com>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 3f56be15f17e..cf0ee764b908 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2220,10 +2220,10 @@ static inline int blk_partition_remap(struct bio *bio)
if (bio_check_eod(bio, part_nr_sects_read(p)))
goto out;
bio->bi_iter.bi_sector += p->start_sect;
- bio->bi_partno = 0;
trace_block_bio_remap(bio->bi_disk->queue, bio, part_devt(p),
bio->bi_iter.bi_sector - p->start_sect);
}
+ bio->bi_partno = 0;
ret = 0;
out:
rcu_read_unlock();
--
2.12.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
2018-06-07 8:29 ` Hannes Reinecke
@ 2018-06-07 8:31 ` Johannes Thumshirn
-1 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2018-06-07 8:31 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Jens Axboe, linux-block, Hannes Reinecke, Sagi Grimberg,
linux-nvme, Keith Busch, Christoph Hellwig
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: Felix Imend�rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N�rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
@ 2018-06-07 8:31 ` Johannes Thumshirn
0 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2018-06-07 8:31 UTC (permalink / raw)
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
2018-06-07 8:29 ` Hannes Reinecke
@ 2018-06-07 8:42 ` Sagi Grimberg
-1 siblings, 0 replies; 10+ messages in thread
From: Sagi Grimberg @ 2018-06-07 8:42 UTC (permalink / raw)
To: Hannes Reinecke, Jens Axboe
Cc: Christoph Hellwig, Keith Busch, linux-nvme, linux-block, Hannes Reinecke
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
@ 2018-06-07 8:42 ` Sagi Grimberg
0 siblings, 0 replies; 10+ messages in thread
From: Sagi Grimberg @ 2018-06-07 8:42 UTC (permalink / raw)
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
2018-06-07 8:29 ` Hannes Reinecke
@ 2018-06-07 11:24 ` Christoph Hellwig
-1 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2018-06-07 11:24 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, Keith Busch,
linux-nvme, linux-block, Hannes Reinecke
On Thu, Jun 07, 2018 at 10:29:44AM +0200, Hannes Reinecke wrote:
> blk_partition_remap() will only clear bi_partno if an actual remapping
> has happened. But flush request et al don't have an actual size, so
> the remapping doesn't happen and bi_partno is never cleared.
> So for stacked devices blk_partition_remap() will be called on each level.
> If (as is the case for native nvme multipathing) one of the lower-level
> devices do _not_support partitioning a spurious I/O error is generated.
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
@ 2018-06-07 11:24 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2018-06-07 11:24 UTC (permalink / raw)
On Thu, Jun 07, 2018@10:29:44AM +0200, Hannes Reinecke wrote:
> blk_partition_remap() will only clear bi_partno if an actual remapping
> has happened. But flush request et al don't have an actual size, so
> the remapping doesn't happen and bi_partno is never cleared.
> So for stacked devices blk_partition_remap() will be called on each level.
> If (as is the case for native nvme multipathing) one of the lower-level
> devices do _not_support partitioning a spurious I/O error is generated.
>
> Signed-off-by: Hannes Reinecke <hare at suse.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
2018-06-07 8:29 ` Hannes Reinecke
@ 2018-06-07 12:56 ` Jens Axboe
-1 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2018-06-07 12:56 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme,
linux-block, Hannes Reinecke
On 6/7/18 2:29 AM, Hannes Reinecke wrote:
> blk_partition_remap() will only clear bi_partno if an actual remapping
> has happened. But flush request et al don't have an actual size, so
> the remapping doesn't happen and bi_partno is never cleared.
> So for stacked devices blk_partition_remap() will be called on each level.
> If (as is the case for native nvme multipathing) one of the lower-level
> devices do _not_support partitioning a spurious I/O error is generated.
That's better, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] block: always set partition number to '0' in blk_partition_remap()
@ 2018-06-07 12:56 ` Jens Axboe
0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2018-06-07 12:56 UTC (permalink / raw)
On 6/7/18 2:29 AM, Hannes Reinecke wrote:
> blk_partition_remap() will only clear bi_partno if an actual remapping
> has happened. But flush request et al don't have an actual size, so
> the remapping doesn't happen and bi_partno is never cleared.
> So for stacked devices blk_partition_remap() will be called on each level.
> If (as is the case for native nvme multipathing) one of the lower-level
> devices do _not_support partitioning a spurious I/O error is generated.
That's better, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-06-07 12:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 8:29 [PATCHv2] block: always set partition number to '0' in blk_partition_remap() Hannes Reinecke
2018-06-07 8:29 ` Hannes Reinecke
2018-06-07 8:31 ` Johannes Thumshirn
2018-06-07 8:31 ` Johannes Thumshirn
2018-06-07 8:42 ` Sagi Grimberg
2018-06-07 8:42 ` Sagi Grimberg
2018-06-07 11:24 ` Christoph Hellwig
2018-06-07 11:24 ` Christoph Hellwig
2018-06-07 12:56 ` Jens Axboe
2018-06-07 12:56 ` 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.