The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] UBI: fix ubi.mtd MODULE_PARM_DESC issues and add per-device wear-leveling threshold
@ 2026-07-23  2:02 Ran Hongyun
  2026-07-23  2:02 ` [PATCH 1/2] UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC Ran Hongyun
  2026-07-23  2:02 ` [PATCH 2/2] UBI: support per-device wear-leveling threshold Ran Hongyun
  0 siblings, 2 replies; 9+ messages in thread
From: Ran Hongyun @ 2026-07-23  2:02 UTC (permalink / raw)
  To: richard, miquel.raynal, vigneshr, vapier, artem.bityutskiy
  Cc: linux-mtd, linux-kernel, chengzhihao1, yangerkun, yi.zhang

This series adds a per-device wear-leveling threshold for UBI devices,
with a preparatory fix to the MODULE_PARM_DESC.

Patch 1 fixes two pre-existing issues in the ubi.mtd MODULE_PARM_DESC:
the parameter format string was missing the enable_fm and need_resv_pool
tokens, and the bad-block reservation note was misplaced after Example 5
instead of after Example 3.

Patch 2 extends struct ubi_attach_req with a __s32 wl_threshold field, 
plumbs it through the ioctl and module parameter paths, and replaces 
the compile-time macros UBI_WL_THRESHOLD and WL_FREE_MAX_DIFF with p
er-device fields across wl.c and fastmap-wl.c. 0 means "use the kernel 
default", the accepted range is 2-65536.

Ran Hongyun (2):
  UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC
  UBI: support per-device wear-leveling threshold

 drivers/mtd/ubi/build.c      | 43 ++++++++++++++++++++++++++++++------
 drivers/mtd/ubi/cdev.c       |  2 +-
 drivers/mtd/ubi/fastmap-wl.c |  8 +++----
 drivers/mtd/ubi/ubi.h        | 21 +++++++++++++++++-
 drivers/mtd/ubi/wl.c         | 39 ++++++++------------------------
 include/uapi/mtd/ubi-user.h  | 10 ++++++++-
 6 files changed, 79 insertions(+), 44 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-07-23  8:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23  2:02 [PATCH 0/2] UBI: fix ubi.mtd MODULE_PARM_DESC issues and add per-device wear-leveling threshold Ran Hongyun
2026-07-23  2:02 ` [PATCH 1/2] UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC Ran Hongyun
2026-07-23  2:40   ` Zhihao Cheng
2026-07-23  2:02 ` [PATCH 2/2] UBI: support per-device wear-leveling threshold Ran Hongyun
2026-07-23  3:01   ` Zhihao Cheng
2026-07-23  6:06   ` Ran Hongyun
2026-07-23  7:19     ` Richard Weinberger
2026-07-23  8:16   ` Ran Hongyun
2026-07-23  8:30     ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox