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

login
register
mail settings
Submitter Ben Gardiner
Date May 18, 2011, 8:57 p.m.
Message ID <1305752243-4095-1-git-send-email-bengardiner@nanometrics.ca>
Download mbox | patch
Permalink /patch/96236/
State New
Headers show

Comments

Ben Gardiner - May 18, 2011, 8:57 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.39 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>

---
 mkfs.ubifs/mkfs.ubifs.c  |    4 +++-
 mkfs.ubifs/ubifs-media.h |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)
Matthew L. Creech - May 19, 2011, 5:41 a.m.
Thanks Ben, I missed Artem's reply asking for this.

On Wed, May 18, 2011 at 4:57 PM, Ben Gardiner
<bengardiner@nanometrics.ca> wrote:
>
> Note in the help text and comment that kernel release 2.6.39 is required
> for the free space fixup to be performed.
>

Will it actually be included in 2.6.39?  The flag exists there, but
I'd assumed the code changes wouldn't be merged until the next cycle.
Artem Bityutskiy - May 19, 2011, 5:56 a.m.
On Thu, 2011-05-19 at 01:41 -0400, Matthew L. Creech wrote:
> Thanks Ben, I missed Artem's reply asking for this.
> 
> On Wed, May 18, 2011 at 4:57 PM, Ben Gardiner
> <bengardiner@nanometrics.ca> wrote:
> >
> > Note in the help text and comment that kernel release 2.6.39 is required
> > for the free space fixup to be performed.
> >
> 
> Will it actually be included in 2.6.39?  The flag exists there, but
> I'd assumed the code changes wouldn't be merged until the next cycle.

Hi, indeed, yes, I'm planning to merge this upstream, but in 2.6.40. I'm
sorry for misleading infromation.

Patch

diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index 96e17a3..f4cf09d 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.39 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..a710589 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.39 or greater.
  */
 enum {
 	UBIFS_FLG_BIGLPT = 0x02,