From 2425614638a798e55e79e1b1f9b8d84567769311 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 13 Nov 2023 17:48:12 +0800 Subject: ubiattach: introduce need_resv_pool in UBI_IOCATT The ioctl UBI_IOCATT has been extended with need_resv_pool parameter in [1]. This parameter is used for deciding whether to reserve PEBs for filling pool/wl_pool for target ubi device. This parameter will be effective when fastmap is enabled, which will slow down the frequency of updating fastmap by filling more free PEBs in pool/wl_pool. See details in [2]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ac085cfe57df2cc1d7a5c4c5e64b8780c8ad452f [2] https://bugzilla.kernel.org/show_bug.cgi?id=217787 Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- include/mtd/ubi-user.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/mtd') diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index a389693..bb5c0f9 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h @@ -236,6 +236,7 @@ enum { * @vid_hdr_offset: VID header offset (use defaults if %0) * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs * @disable_fm: whether disable fastmap + * @need_resv_pool: whether reserve free pebs for filling pool/wl_pool * @padding: reserved for future, not used, has to be zeroed * * This data structure is used to specify MTD device UBI has to attach and the @@ -282,7 +283,8 @@ struct ubi_attach_req { int32_t vid_hdr_offset; int16_t max_beb_per1024; int8_t disable_fm; - int8_t padding[9]; + int8_t need_resv_pool; + int8_t padding[8]; }; /* -- cgit v1.2.3