From b4b45994a9ba02d575625e3b1076c337be7d4861 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 13 Nov 2023 17:48:11 +0800 Subject: ubiattach: introduce disable_fm in UBI_IOCATT The ioctl UBI_IOCATT has been extended with disable_fm parameter after [1]. This parameter is used for disabling fastmap for target ubi device. If 'disable_fm' is set, ubi doesn't create new fastmap even the module param 'fm_autoconvert' is set, and existed old fastmap will be destroyed after attaching process. A simple test case in [2]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=669d204469c46e91d99da24914130f78277a71d3 [2] https://bugzilla.kernel.org/show_bug.cgi?id=216278 Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- lib/libubi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/libubi.c b/lib/libubi.c index baaca2f..410d104 100644 --- a/lib/libubi.c +++ b/lib/libubi.c @@ -767,6 +767,7 @@ int ubi_attach(libubi_t desc, const char *node, struct ubi_attach_request *req) r.ubi_num = req->dev_num; r.mtd_num = req->mtd_num; r.vid_hdr_offset = req->vid_hdr_offset; + r.disable_fm = req->disable_fm ? 1 : 0; if (req->max_beb_per1024) { /* -- cgit v1.2.3