]> git.baikalelectronics.ru Git - kernel.git/commit
block: always set partition number to '0' in blk_partition_remap()
authorHannes Reinecke <hare@suse.de>
Thu, 7 Jun 2018 08:29:44 +0000 (10:29 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Jun 2018 12:56:01 +0000 (06:56 -0600)
commit414287291ad2e3558a57a72a76132cbb82778c42
tree7509f7ec032c0d913651a309f03542f5d900ef12
parentd2b6ea280f4361717ba4b3d53450336140b63267
block: always set partition number to '0' in blk_partition_remap()

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.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c