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

Usyskin, Alexander alexander.usyskin at intel.com
Thu Apr 10 09:44:22 UTC 2025


Hi
 
> 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.
> 

To be sure:

You want to have this hierarchy without MTD_PARTITIONED_MASTER:
mtd_master
\/
|->partition1
|->partition2

With MTD_PARTITIONED_MASTER flag:

mtd_master
\/
|->master_partition
   \/
   |->partition1
   |->partition2

- - 
Thanks,
Sasha


> Thanks,
> Miquèl


More information about the dri-devel mailing list