From 76641773be73141652c6be5c45f53c91efd144e4 Mon Sep 17 00:00:00 2001 From: Ran Hongyun Date: Thu, 23 Jul 2026 10:37:06 +0800 Subject: ubi-utils: add wear-leveling threshold parameter to ubiattach Add wl_threshold support end-to-end: expose the kernel's wear-leveling threshold via a new --wl-threshold / -w option in ubiattach, plumb it through libubi, and define it by replacing 4 bytes of padding in struct ubi_attach_req. Valid range is 2-65536; 0 means use the kernel default. Signed-off-by: Ran Hongyun Signed-off-by: David Oberhollenzer --- include/libubi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libubi.h') diff --git a/include/libubi.h b/include/libubi.h index b5b3d8f..9203416 100644 --- a/include/libubi.h +++ b/include/libubi.h @@ -56,6 +56,7 @@ typedef void * libubi_t; * @max_beb_per1024: Maximum expected bad eraseblocks per 1024 eraseblocks * @disable_fm: whether disable fastmap * @need_resv_pool: whether reserve free pebs for filling pool/wl_pool + * @wl_threshold: wear-leveling threshold (0 means use kernel default) */ struct ubi_attach_request { @@ -66,6 +67,7 @@ struct ubi_attach_request int max_beb_per1024; bool disable_fm; bool need_resv_pool; + int wl_threshold; }; /** -- cgit v1.2.3