summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2023-08-28 08:38:45 +0200
committerRichard Weinberger <richard@nod.at>2023-10-28 23:16:00 +0200
commitac085cfe57df2cc1d7a5c4c5e64b8780c8ad452f (patch)
tree22e450f1ed9849e2a0c5840abfdd5401e0c1a37e /drivers/mtd/ubi
parentubi: fastmap: Add module parameter to control reserving filling pool PEBs (diff)
downloadlinux-ac085cfe57df2cc1d7a5c4c5e64b8780c8ad452f.tar.xz
linux-ac085cfe57df2cc1d7a5c4c5e64b8780c8ad452f.zip
ubi: fastmap: Add control in 'UBI_IOCATT' ioctl to reserve PEBs for filling pools
This patch imports a new field 'need_resv_pool' in struct 'ubi_attach_req' to control whether or not reserving free PEBs for filling pool/wl_pool. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217787 Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/cdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 98aa00344b29..0d8f04cf03c5 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -1042,7 +1042,7 @@ static long ctrl_cdev_ioctl(struct file *file, unsigned int cmd,
mutex_lock(&ubi_devices_mutex);
err = ubi_attach_mtd_dev(mtd, req.ubi_num, req.vid_hdr_offset,
req.max_beb_per1024, !!req.disable_fm,
- false);
+ !!req.need_resv_pool);
mutex_unlock(&ubi_devices_mutex);
if (err < 0)
put_mtd_device(mtd);