OSDN Git Service

ubifs: Export filesystem error counters
authorStefan Schaeckeler <schaecsn@gmx.net>
Sun, 10 Oct 2021 04:22:39 +0000 (21:22 -0700)
committerRichard Weinberger <richard@nod.at>
Thu, 23 Dec 2021 19:23:42 +0000 (20:23 +0100)
commit2e3cbf425804fb44a005e252f88f93dff108c911
treee8834e956a27afa66eef1dc7faaa4136836b1057
parent3fea4d9d160186617ff40490ae01f4f4f36b28ff
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>
fs/ubifs/Makefile
fs/ubifs/io.c
fs/ubifs/super.c
fs/ubifs/sysfs.c [new file with mode: 0644]
fs/ubifs/ubifs.h