From 663586c0a8929db81e617c775823efb9d65f2bc2 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Wed, 7 Nov 2018 23:16:19 +0100 Subject: ubi: Expose the bitrot interface Using UBI_IOCRPEB and UBI_IOCSPEB userspace can force reading and scrubbing of PEBs. In case of bitflips UBI will automatically take action and move data to a different PEB. This interface allows a daemon to foster your NAND. Signed-off-by: Richard Weinberger --- include/uapi/mtd/ubi-user.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/uapi/mtd/ubi-user.h b/include/uapi/mtd/ubi-user.h index aad3b6201fc0..b69e9ba6742b 100644 --- a/include/uapi/mtd/ubi-user.h +++ b/include/uapi/mtd/ubi-user.h @@ -171,6 +171,11 @@ /* Re-name volumes */ #define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) +/* Read the specified PEB and scrub it if there are bitflips */ +#define UBI_IOCRPEB _IOW(UBI_IOC_MAGIC, 4, __s32) +/* Force scrubbing on the specified PEB */ +#define UBI_IOCSPEB _IOW(UBI_IOC_MAGIC, 5, __s32) + /* ioctl commands of the UBI control character device */ #define UBI_CTRL_IOC_MAGIC 'o' -- cgit v1.2.3-58-ga151