[PATCH v7 01/12] mtd: core: always create master device

Miquel Raynal miquel.raynal at bootlin.com
Wed Apr 9 02:59:57 PDT 2025


Hello,

> The mtd_master is completely different class to avoid mtd tree disturbances.
> It is real kernel device object, I'm not sure how we can do 'link to'
> magic here.

Maybe we can add that later if someone needs.

> About MTD_PARTITIONED_MASTER - we can treat it as another partition and 
> create master device plus whole device partition as it's child with all other
> partitions as children of master device.
> For unpartitioned device this mean that we create master device and partition
> regardless of MTD_PARTITIONED_MASTER flag.

I am not sure I follow you. I am proposing to create the mtd_master
device in all cases. I believe this is the future-proof approach. Can
you make this change?

Regarding the hierarchy, I indeed agree with what you propose:
mtd_master parent of whole partition device (if any) parent of
partitions.

Thanks,
Miquèl



More information about the linux-mtd mailing list