Re: [PATCH/RFC -nxt] mtd_blkdevs: Set GENHD_FL_NO_PART

From: Christoph Hellwig
Date: Wed Dec 01 2021 - 02:23:44 EST


On Tue, Nov 30, 2021 at 05:23:46PM +0100, Geert Uytterhoeven wrote:
> When DT declares the partitions of an spi-nor device using
> "fixed-partitions", the individual mtdblockN partitions are now scanned
> for partitition tables, which should not happen.
>
> Fix this by setting the GENHD_FL_NO_PART flag in the MTD block layer
> interface.
>
> Fixes: 1ebe2e5f9d68e94c ("block: remove GENHD_FL_EXT_DEVT")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> Seen with e.g. arch/arm/boot/dts/r8a7791-koelsch.dts.
> I only noticed because I have debug code to measure QSPI performance,
> which informed me about 8 x 512 bytes being read from each partition
> detected.
>
> RFC as I'm not sure this is correct in all cases.
> I did verify that in the absence of "fixed-partitions", the spi-nor
> device is not scanned for partitions before and after commit
> 1ebe2e5f9d68e94c.

As far as I can tell mtd fixed partitions have nothing to do with
the block layer concept of partitions. What kind of behavior change
did you see?