From: "Jose R. Santos" <jrs@us.ibm.com>
To: "Jose R. Santos" <jrs@us.ibm.com>
Cc: "Celine Bourde" <celine.bourde@bull.net>,
linux-ext4@vger.kernel.org, cmm@us.ibm.com,
"Frédéric Bohé" <frederic.bohe@bull.net>,
"SOLOFO RAMANGALAHY" <Solofo.Ramangalahy@bull.net>,
"Jean-Pierre Dion" <jean-pierre.dion@bull.net>
Subject: Re: [PATCH][e2fsprogs][mke2fs] fix FLEX_BG offset
Date: Mon, 7 Jul 2008 14:42:40 -0500 [thread overview]
Message-ID: <20080707144240.60656c76@gara> (raw)
In-Reply-To: <20080703065553.53c35979@gara>
On Thu, 3 Jul 2008 06:55:53 -0500
"Jose R. Santos" <jrs@us.ibm.com> wrote:
> On Thu, 03 Jul 2008 10:21:02 +0200
> Celine Bourde <celine.bourde@bull.net> wrote:
>
> > This patch resolves the offset problem of the flex_bg
> > option when you use mke2fs tool.
> >
> > For example, if you type mkfs.ext4 -I256 -O flex_bg -G32 -E test_fs <device>
> > and look dumpe2fs <device> result you will see an offset problem.
> >
> > Group 0: (Blocks 0-32767)
> > Primary superblock at 0, Group descriptors at 1-5
> > Reserved GDT blocks at 6-1024
> > Block bitmap at 1025 (+1025), Inode bitmap at 1058 (+1058)
> > Inode table at 1090-1601 (+1090)
> > 0 free blocks, 8181 free inodes, 2 directories
> > Free blocks:
> > Free inodes: 12-8192
> >
> > Inode bitmap must start at 1025 + 32 = 1057
> > In all flexbg groups, the block between the last block bitmap and the
> > first inode
> > bitmap (metatdata) is not used, which introduced a hole.
> >
> > This patch corrects it.
> > You have to apply it on e2fsprogs (mke2fs 1.41-WIP (17-Jun-2008)) master
> > branch.
> >
> > Celine Bourde.
>
> Acked-by: Jose R. Santos <jrs@us.ibm.com>
Looks like I jumped the gun to fast acknowledging this patch. The
current patch doesn't run the second ext2fs_get_free_blocks() when
doing a search for block bitmap space.
Here is an updated patch.
commit a58058e85240c7834cd863efa35b21688e104047
Author: Jose R. Santos <jrs@us.ibm.com>
Date: Mon Jul 7 14:36:08 2008 -0500
Fix FLEX_BG offset
The offset for both inode bitmaps and inode tables is overshot by one
block causing a hole between the group of bitmaps and inode tables.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c
index d87585b..7f6ac77 100644
--- a/lib/ext2fs/alloc_tables.c
+++ b/lib/ext2fs/alloc_tables.c
@@ -46,6 +46,8 @@ static blk_t flexbg_offset(ext2_filsys fs, dgrp_t group, blk_t start_blk,
if (size > fs->super->s_blocks_per_group / 8)
size = fs->super->s_blocks_per_group / 8;
+ if (offset)
+ offset -= 1;
/*
* Dont do a long search if the previous block
* search is still valid.
-JRS
next prev parent reply other threads:[~2008-07-07 19:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 8:21 [PATCH][e2fsprogs][mke2fs] fix FLEX_BG offset Celine Bourde
2008-07-03 11:55 ` Jose R. Santos
2008-07-07 19:42 ` Jose R. Santos [this message]
2008-07-07 22:30 ` Theodore Tso
2008-07-07 16:46 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080707144240.60656c76@gara \
--to=jrs@us.ibm.com \
--cc=Solofo.Ramangalahy@bull.net \
--cc=celine.bourde@bull.net \
--cc=cmm@us.ibm.com \
--cc=frederic.bohe@bull.net \
--cc=jean-pierre.dion@bull.net \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.