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-media.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkfs.ubifs/ubifs-media.h') diff --git a/mkfs.ubifs/ubifs-media.h b/mkfs.ubifs/ubifs-media.h index a9ecbd9..fe62d0e 100644 --- a/mkfs.ubifs/ubifs-media.h +++ b/mkfs.ubifs/ubifs-media.h @@ -373,9 +373,11 @@ enum { * Superblock flags. * * UBIFS_FLG_BIGLPT: if "big" LPT model is used if set + * UBIFS_FLG_SPACE_FIXUP: first-mount "fixup" of free space within LEBs needed */ enum { UBIFS_FLG_BIGLPT = 0x02, + UBIFS_FLG_SPACE_FIXUP = 0x04, }; /** -- cgit v1.2.3