On 11/28/20 5:15 PM, Christoph Hellwig wrote:
Allocate hd_struct together with struct block_device to pre-load
the lifetime rule changes in preparation of merging the two structures.
Note that part0 was previously embedded into struct gendisk, but is
a separate allocation now, and already points to the block_device instead
of the hd_struct. The lifetime of struct gendisk is still controlled by
the struct device embedded in the part0 hd_struct.
Signed-off-by: Christoph Hellwig <[email protected]>
---
block/blk-core.c | 16 ++++---
block/blk-flush.c | 2 +-
block/blk-merge.c | 2 -
block/blk.h | 21 ----------
block/genhd.c | 50 +++++++++-------------
block/partitions/core.c | 67 +++---------------------------
drivers/block/drbd/drbd_receiver.c | 2 +-
drivers/block/drbd/drbd_worker.c | 3 +-
drivers/block/zram/zram_drv.c | 2 +-
drivers/md/dm.c | 4 +-
drivers/md/md.c | 2 +-
fs/block_dev.c | 39 ++++++-----------
include/linux/blk_types.h | 2 +-
include/linux/genhd.h | 14 +++----
include/linux/part_stat.h | 4 +-
15 files changed, 61 insertions(+), 169 deletions(-)
Reviewed-by: Hannes Reinecke <[email protected]>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
[email protected] +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel