[RFC] UBI statistics and bitrot interface

Ashley Herron herroash at amazon.com
Fri Feb 14 08:04:19 PST 2025


> IIRC, this patches have been part of our failed approach to support MLC
> NAND. One part was exposing a more or less sophisticated interface
> to userspace such that a NAND flash specific daemon can foster the chip.
>
>
> After some iterations, ubihealthd was born. But it does not use a statistics
> interface.

Unfortunately ubihealthd wouldn't fit what we need.

>
> What kind of metrics are you looking for?
> Maybe some eBPF/tracing magic will already serve you enough data points?

The goal is to capture similar data as eMMC and UFS devices report regarding
total bytes written to the block device. So I want to capture total (payload)
bytes written by callers to the UBI layer, not including UBI overhead (headers,
wear leveling). This is for the purpose of monitoring and identifying any
pattern of excessive writing on devices in operation that may effect its
lifetime. We may want to monitor total writes to a UBI device over a 24 hour
periods or less, so only using erase counter monitoring doesn't give us the
level of monitoring we require. We write to some UBI volumes using UBIFS
and others using UBI IO directly. I was planning to add (or request you add) a
wc (write count) variable to the current struct with ec and rc in this patchset.

Cheers,
Ashley



More information about the linux-mtd mailing list