All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] fs/ext2: bump journal overhead to 1300 blocks
@ 2013-04-12 12:57 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2013-04-12 12:57 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=0fab0a4afdff2f27fce49e7b38179e781e7b64ed
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

A quick test with a ~3.5MB ext4 filesystem shows that 1081 blocks isn't
enough:

tune2fs 1.42.7 (21-Jan-2013)

Please run e2fsck on the filesystem.

Creating journal inode:
Journal size too big for filesystem.

So bump it a bit. Overestimating the journal size is probably not really
a big deal for the kind of systems using ext3/4 anyway.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 fs/ext2/genext2fs.sh |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/ext2/genext2fs.sh b/fs/ext2/genext2fs.sh
index a4eb351..f7f8d33 100755
--- a/fs/ext2/genext2fs.sh
+++ b/fs/ext2/genext2fs.sh
@@ -34,14 +34,11 @@ then
     # we scale inodes / blocks with 10% to compensate for bitmaps size + slack
     BLOCKS=$(du -s -c -k $TARGET_DIR | grep total | sed -e "s/total//")
     BLOCKS=$(expr 500 + \( $BLOCKS + $INODES / 8 \) \* 11 / 10)
-    # we add 1081 blocks (a bit more than 1 MiB, assuming 1KiB blocks) for
+    # we add 1300 blocks (a bit more than 1 MiB, assuming 1KiB blocks) for
     # the journal if ext3/4
-    # Note: I came to 1081 blocks after trial-and-error checks. With 1080 or
-    # less additional blocks, and tune2fs would refuse to add the journal;
-    # with 1081 additional blocks or above, tune2fs wil happily add a journal.
-    # YMMV.
+    # Note: I came to 1300 blocks after trial-and-error checks. YMMV.
     if [ ${GEN} -ge 3 ]; then
-        BLOCKS=$(expr 1081 + $BLOCKS )
+        BLOCKS=$(expr 1300 + $BLOCKS )
     fi
     set -- $@ -b $BLOCKS
 fi

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-12 12:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12 12:57 [Buildroot] [git commit] fs/ext2: bump journal overhead to 1300 blocks Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.