]> git.baikalelectronics.ru Git - kernel.git/commit
block: don't add partitions if GD_SUPPRESS_PART_SCAN is set
authorMing Lei <ming.lei@redhat.com>
Tue, 23 Aug 2022 10:38:19 +0000 (18:38 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 3 Sep 2022 17:29:03 +0000 (11:29 -0600)
commit801cd89898c97a55d0f26f03bdd2f35824f5ea22
tree8592062c8d7b3593d507e276db016a651cb835be
parent9c76c43c45214b49badf5b8859f537afd0dfc8ad
block: don't add partitions if GD_SUPPRESS_PART_SCAN is set

Commit 5f4e67bf47bf ("block, loop: support partitions without scanning")
adds GD_SUPPRESS_PART_SCAN for replacing part function of
GENHD_FL_NO_PART. But looks blk_add_partitions() is missed, since
loop doesn't want to add partitions if GENHD_FL_NO_PART was set.
And it causes regression on libblockdev (as called from udisks) which
operates with the LO_FLAGS_PARTSCAN.

Fixes the issue by not adding partitions if GD_SUPPRESS_PART_SCAN is
set.

Fixes: 5f4e67bf47bf ("block, loop: support partitions without scanning")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220823103819.395776-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c