Files
linux-stable-mirror/include/uapi/mtd
Ran Hongyun a5e0055eac UBI: support per-device wear-leveling threshold
The UBI wear-leveling threshold (CONFIG_MTD_UBI_WL_THRESHOLD) is
currently a compile-time constant shared by all UBI devices. When a
single kernel image must support multiple NAND flashes with different
erase lifetimes, one global threshold cannot suit all devices.

Add a per-device configurable wl_threshold parameter:

  - UAPI: add __s32 wl_threshold to struct ubi_attach_req, carved
    from the existing padding.

  - Module parameter: ubi.mtd gains a new optional token
    "wl_threshold":
      ubi.mtd=0,0,0,0,0,0,256  ubi.mtd=1,0,0,0,0,0,4096

0 means "use the kernel default", the accepted range is
2-65536.

Signed-off-by: Ran Hongyun <ranhongyun1@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2026-08-12 00:08:54 +02:00
..