Patchwork [v2] mkfs.ubifs: free-space-fixup: note supported kernels

login
register
mail settings
Submitter Ben Gardiner
Date May 19, 2011, 12:14 p.m.
Message ID <1305807291-12774-1-git-send-email-bengardiner@nanometrics.ca>
Download mbox | patch
Permalink /patch/96346/
State New
Headers show

Comments

Ben Gardiner - May 19, 2011, 12:14 p.m.
The free space fixup flag will only have an action taken on up-to-date
kernels.

Note in the help text and comment that kernel release 2.6.40 is required
for the free space fixup to be performed.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Matthew L. Creech <mlcreech@gmail.com>

---
Changes since v1:
 * updated references to the kernel release to reflect the reality that
   2.6.39 is a done deal

---
 mkfs.ubifs/mkfs.ubifs.c  |    4 +++-
 mkfs.ubifs/ubifs-media.h |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)
Artem Bityutskiy - May 20, 2011, 10:15 a.m.
Hi,

On Thu, 2011-05-19 at 08:14 -0400, Ben Gardiner wrote:
>   *
>   * UBIFS_FLG_BIGLPT: if "big" LPT model is used if set
>   * UBIFS_FLG_SPACE_FIXUP: first-mount "fixup" of free space within LEBs needed
> + *                        the free space fixup will be performed only by kernel
> + *                        releases 2.6.40 or greater.
>   */

Since this is kind of an out-of-date copy of the kernel header file,
this change is not needed because it'll anyway go away when someone
syncs ubifs-media.h with the kernel.

After my changes to Matthew's patch and tweaks to your patch I've found
out that it is cleaner to just fold your patch into Mathew's and make
one single commit. I've thanked you in the commit message and pushed one
single commit instead:

http://git.infradead.org/mtd-utils.git/commit/04665066ebedb0a31335b525fb5f19df32cb8cfe

Hopefully you will not mind.

Thanks!
Ben Gardiner - May 24, 2011, 2:36 p.m.
On Fri, May 20, 2011 at 6:15 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> [...]
> After my changes to Matthew's patch and tweaks to your patch I've found
> out that it is cleaner to just fold your patch into Mathew's and make
> one single commit. I've thanked you in the commit message and pushed one
> single commit instead:
>
> http://git.infradead.org/mtd-utils.git/commit/04665066ebedb0a31335b525fb5f19df32cb8cfe
>
> Hopefully you will not mind.

Not at all. I'm happy to see the free-space-fixup merged.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

Patch

diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index 96e17a3..1ce1db3 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -184,7 +184,9 @@  static const char *helptext =
 "                         how many percent better zlib should compress to make\n"
 "                         mkfs.ubifs use zlib instead of LZO (default 20%)\n"
 "-f, --fanout=NUM         fanout NUM (default: 8)\n"
-"-F, --space-fixup        fixup free space on first mount (needed for some NANDs)\n"
+"-F, --space-fixup        fixup free space on first mount (needed for some NANDs;\n"
+"                         the free space fixup will be performed only by kernel\n"
+"                         releases 2.6.40 or greater)\n"
 "-k, --keyhash=TYPE       key hash type - \"r5\" or \"test\" (default: \"r5\")\n"
 "-p, --orph-lebs=COUNT    count of erase blocks for orphans (default: 1)\n"
 "-D, --devtable=FILE      use device table FILE\n"
diff --git a/mkfs.ubifs/ubifs-media.h b/mkfs.ubifs/ubifs-media.h
index fe62d0e..16683de 100644
--- a/mkfs.ubifs/ubifs-media.h
+++ b/mkfs.ubifs/ubifs-media.h
@@ -374,6 +374,8 @@  enum {
  *
  * UBIFS_FLG_BIGLPT: if "big" LPT model is used if set
  * UBIFS_FLG_SPACE_FIXUP: first-mount "fixup" of free space within LEBs needed
+ *                        the free space fixup will be performed only by kernel
+ *                        releases 2.6.40 or greater.
  */
 enum {
 	UBIFS_FLG_BIGLPT = 0x02,