ubifs: Export filesystem error counters

Not all ubifs filesystem errors are propagated to userspace.

Export bad magic, bad node and crc errors via sysfs. This allows userspace
to notice filesystem errors:

 /sys/fs/ubifs/ubiX_Y/errors_magic
 /sys/fs/ubifs/ubiX_Y/errors_node
 /sys/fs/ubifs/ubiX_Y/errors_crc

The counters are reset to 0 with a remount.

Signed-off-by: Stefan Schaeckeler <sschaeck@cisco.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Stefan Schaeckeler 2021-10-09 21:22:39 -07:00 • committed by Richard Weinberger
commit 2e3cbf4258
5 changed files with 225 additions and 2 deletions