How to detect if ubi volume is empty

Pintu Agarwal pintu.ping at gmail.com
Mon May 20 03:22:49 PDT 2024


Hi,

In Linux Kernel 5.15 is there a way to detect in runtime, if UBI
volume (squashfs based, ubiblock, dynamic) is empty or not ?

Based on this we need to make some decisions at runtime.

Currently, we are using a crude way to detect volume empty by reading
the first 1K block using the "dd" command and checking if the contents
are all FF.

Is this good enough, or is there some other better way ?

Thanks.
Pintu



More information about the linux-mtd mailing list