OSDN Git Service

block: refactor rescan_partitions
authorChristoph Hellwig <hch@lst.de>
Thu, 14 Nov 2019 14:34:32 +0000 (15:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 Nov 2019 14:40:55 +0000 (07:40 -0700)
commitf902b02600028dfc0c9df811eb711ac7d7fca09f
tree86611dbc07ee58daf2a007ababc485bce61eb0c2
parentd41003513e61dd9d4974cb441d30b63650b85654
block: refactor rescan_partitions

Split out a helper that adds one single partition, and another one
calling that dealing with the parsed_partitions state.  This makes
it much more obvious how we clean up all state and start again when
using the rescan label.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partition-generic.c