Re: [PATCH v3 02/10] ubi: Expose mean erase counter for fastmap in sysfs

Richard Weinberger
2024-11-07T11:34:08Z

----- Ursprüngliche Mail -----
> Von: "Rickard x Andersson" <rickaran@axis.com>
> An: "richard" <richard@nod.at>, "Rickard X Andersson" <rickard.andersson@axis.com>
> One of my devices have the following status:
>
> /sys/class/ubi/ubi1 # cat max_ec_data
> 4672
> /sys/class/ubi/ubi1 # cat mean_ec_fastmap
> 8869
>
> If you combine the mean EC values you will not be able to tell that the
> fastmap area is much more worn down. For example the wear of your
> fastmap area could be on the verge of breaking the flash but that will
> not be seen on a mean value that includes both the fastmap and data area.
>
> If fastmap is not enabled on your system then mean_ec_fastmap will not
> be visible in sysfs.

But does the user application care?
Let me ask differently, what is the purpose of exposing these numbers?
If you just want to know how much your flash is aged, combined max/mean
ec counters will do it.

For debugging fastmap specific issues, the detailed info via debugfs will do it.

I'm totally fine with exposing more counters, we just need to be clear
about their meaning and use case. Especially in sysfs we must not make a mess.

Thanks,
//richard