Thread (1 message) 1 message, 1 author, 2025-03-19

Re: [PATCH v12 3/3] mtd: Add driver for concatenating devices

From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: 2025-03-19 08:21:21
Also in: lkml

On 19/03/2025 at 06:17:50 GMT, "Mahapatra, Amit Kumar" [off-list ref] wrote:
[AMD Official Use Only - AMD Internal Distribution Only]

Hello Miquel,
quoted
-----Original Message-----
From: Miquel Raynal <miquel.raynal@bootlin.com>
Sent: Tuesday, March 18, 2025 9:23 PM
To: Mahapatra, Amit Kumar <redacted>
Cc: richard@nod.at; vigneshr@ti.com; robh@kernel.org; krzk+dt@kernel.org;
conor+dt@kernel.org; linux-mtd@lists.infradead.org; devicetree@vger.kernel.org;
linux-kernel@vger.kernel.org; git (AMD-Xilinx) [off-list ref];
amitrkcian2002@gmail.com; Bernhard Frauendienst [off-list ref]
Subject: Re: [PATCH v12 3/3] mtd: Add driver for concatenating devices

On 05/02/2025 at 19:07:30 +0530, Amit Kumar Mahapatra <amit.kumar-
mahapatra@amd.com> wrote:
quoted
Introducing CONFIG_VIRT_CONCAT to separate the legacy flow from the
new
CONFIG_MTD_VIRT_CONCAT
quoted
approach, where individual partitions within a concatenated partition
are not registered, as they are likely not needed by the user.
I am not a big fan of this choice. We had issues with hiding things to the user in the
first place. Could we find a way to expose both the original mtd devices as well as
the virtually concatenated partitions?
Sure, I think that can be done, but I took this approach to hide the
original devices because Boris mentioned in [1] that we are creating
the original partitions even though the user probably doesn't need
them. I believe he is right, as I can't think of any use case where
the user would require the individual devices instead of the
concatenated device.

[1] https://lore.kernel.org/linux-mtd/20191209113506.41341ed4@collabora.com/ (local)
He was suggesting not to create the intermediate partitions, and I agree
it is not super relevant, but the flash devices themselves are relevant.

In this example:

concatenate = <&part2>, <&part3>;

flash@0 {
        part1 { }
        part2 { }
};

flash@0 {
        part3 { }
        part4 { }
};

part1, part2, part3, part4 are partitions, at least part1 and part4
should appear like mtd devices.
Boris was suggesting to not expose part2 and part3 individually when
concatenating them, I'm fine with that.

What I am saying, is that flash@0 and flash@1 shall be represented by
two mtd devices and not hidden/skipped.

Thanks,
Miquèl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help