[PATCH] mtd: expose ooblayout information via sysfs
Gabor Juhos
j4g8y7 at gmail.com
Wed Aug 6 11:40:21 PDT 2025
Hi Miquel,
2025. 08. 06. 8:57 keltezéssel, Miquel Raynal írta:
> Hello Gabor,
>
> On 19/07/2025 at 14:06:48 +02, Gabor Juhos <j4g8y7 at gmail.com> wrote:
>
>> Add two new sysfs device attributes which allows to determine the OOB
>> layout used by a given MTD device. This can be useful to verify the
>> current layout during driver development without adding extra debug
>> code. The exposed information also makes it easier to analyze NAND
>> dumps without the need of cravling out the layout from the driver
>> code.
>
> I would prefer a debugfs entry, as this is mostly focusing on
> development and debugging purposes. sysfs has a stable API, which makes
> it a less relevant place in this case.
Sorry, it seems that I misunderstood the ABI documentation.
Since the 'sysfs-class-mtd' file is under the 'testing' directory within
'Documentation/ABI' I thought that it can be extended by attributes used for
testing purposes. Additionally, the 'oobavail' and 'oobsize' attributes are
exposed via sysfs, so it seemed to be a logical place for the new oob related ones.
Nevertheless, I will check what can I do with the debugfs based approach.
Thanks,
Gabor
More information about the linux-mtd
mailing list