From 04665066ebedb0a31335b525fb5f19df32cb8cfe Mon Sep 17 00:00:00 2001 From: "Matthew L. Creech" Date: Wed, 11 May 2011 17:02:28 -0400 Subject: mkfs.ubifs: add "-F" option for "free-space fixup" This adds a superblock flag indicating that "free-space fixup" is needed, and allows it to be set by the user via the "-F" command-line option. The first time the filesystem is mounted, this flag will trigger a one-time re-mapping of all LEBs containing free space. This fixes problems seen on some NAND flashes when a non-UBIFS-aware flash programmer is used. Artem: add a bit more help text, tweaked the patch a bit. Thanks to Ben Gardiner for help. Signed-off-by: Matthew L. Creech Signed-off-by: Artem Bityutskiy --- mkfs.ubifs/ubifs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkfs.ubifs/ubifs.h') diff --git a/mkfs.ubifs/ubifs.h b/mkfs.ubifs/ubifs.h index 5c29046..f94a52c 100644 --- a/mkfs.ubifs/ubifs.h +++ b/mkfs.ubifs/ubifs.h @@ -317,6 +317,7 @@ struct ubifs_znode * @nhead_lnum: LEB number of LPT head * @nhead_offs: offset of LPT head * @big_lpt: flag that LPT is too big to write whole during commit + * @space_fixup: flag indicating that free space in LEBs needs to be cleaned up * @lpt_sz: LPT size * * @ltab_lnum: LEB number of LPT's own lprops table @@ -394,6 +395,7 @@ struct ubifs_info int nhead_lnum; int nhead_offs; int big_lpt; + int space_fixup; long long lpt_sz; int ltab_lnum; -- cgit v1.2.3