summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-08-28 10:59:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-08-28 10:59:07 -0700
commitce727a090be04dc7c51edd5c0da2a41d2fb6e106 (patch)
tree5c7c741e397b38eb198ef2a4b2c518dce68016eb /include
parent115bd364ab20b2dbef22824ec80d15901847dbe2 (diff)
parenta5e0055eac837a1168c781653943d4a0d9920af3 (diff)
downloadlinux-stable-ce727a090be04dc7c51edd5c0da2a41d2fb6e106.tar.gz
linux-stable-ce727a090be04dc7c51edd5c0da2a41d2fb6e106.zip
Merge tag 'ubifs-for-linus-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs
Pull UBI and UBIFS updates from Richard Weinberger: "UBI: - Support for a per-device wear-leveling threshold - Various fixes and cleanups of error paths - Correctly preserve torture flag up wear-leveling UBIFS: - Various fixes and cleanups of error paths and kernel-doc" * tag 'ubifs-for-linus-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: UBI: support per-device wear-leveling threshold UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC mtd: ubi: Release device reference on busy detach ubi: Fix rollback for explicit UBI device numbers ubifs: fix out-of-bounds read in signature length check UBI: fastmap: Pass to_be_tortured when reusing old fastmap PEBs UBI: Preserve torture flag when rescheduling failed erasures ubifs: ubifs.h: clean up kernel-doc comments ubifs: key.h: use correct function parameter name ubifs: debug.h: fix kernel-doc struct prototypes
Diffstat (limited to 'include')
-rw-r--r--include/uapi/mtd/ubi-user.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/mtd/ubi-user.h b/include/uapi/mtd/ubi-user.h
index aa872a41ffb9..3538e11b5175 100644
--- a/include/uapi/mtd/ubi-user.h
+++ b/include/uapi/mtd/ubi-user.h
@@ -289,6 +289,13 @@ enum {
* If @disable_fm is not zero, ubi doesn't create new fastmap even the module
* param 'fm_autoconvert' is set, and existed old fastmap will be destroyed
* after doing full scanning.
+ *
+ * The @wl_threshold defines the maximum difference between the highest and the
+ * lowest erase counter value of eraseblocks of this UBI device. When this
+ * threshold is exceeded, UBI starts performing wear leveling by means of
+ * moving data from eraseblock with low erase counter to eraseblocks with high
+ * erase counter. If @wl_threshold is zero, the default kernel value of
+ * %CONFIG_MTD_UBI_WL_THRESHOLD is used. The accepted range is 2-65536.
*/
struct ubi_attach_req {
__s32 ubi_num;
@@ -297,7 +304,8 @@ struct ubi_attach_req {
__s16 max_beb_per1024;
__s8 disable_fm;
__s8 need_resv_pool;
- __s8 padding[8];
+ __s32 wl_threshold;
+ __s8 padding[4];
};
/*