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

Rickard x Andersson
2024-11-07T10:36:22Z

On 11/6/24 21:20, Richard Weinberger wrote:

>
> Do you really need distinct sysfs attributes for the fastmap and the
> non-fastmap case? Userspace does not care whether fastmap is used or
> not, all userspace is interested in is the mean erase counter value.
>
> IMHO, the mean_ec attribute should combine the mean EC values from
> the fastmap and the data area.
>
> Thanks,
> //richard

Hi and thanks for answering!

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.

Thanks,
Rickard A.