diff options
author | Richard Weinberger <richard@nod.at> | 2018-11-07 23:16:19 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-02-24 11:40:45 +0100 |
commit | 663586c0a8929db81e617c775823efb9d65f2bc2 (patch) | |
tree | 0bce3115039445f6f49f39a02edd5fbd61b7e3a8 /include/uapi/mtd | |
parent | b32b78f89221ee26ae60f9a59e71b5ec28ba5fe2 (diff) |
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 <richard@nod.at>
Diffstat (limited to 'include/uapi/mtd')
-rw-r--r-- | include/uapi/mtd/ubi-user.h | 5 |
1 files changed, 5 insertions, 0 deletions
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' |