public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: "Fr�d�ric Boh�" <frederic.bohe@bull.net>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Theodore Tso <tytso@mit.edu>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH v2] ext4: fix initialization of UNINIT bitmap blocks
Date: Tue, 23 Sep 2008 17:13:46 -0600	[thread overview]
Message-ID: <20080923231346.GT10950@webber.adilger.int> (raw)
In-Reply-To: <1222075960.3581.33.camel@frecb007923.frec.bull.fr>

On Sep 22, 2008  11:32 +0200, Fr�d�ric Boh� wrote:
> Le lundi 22 septembre 2008 à 14:17 +0530, Aneesh Kumar K.V a écrit :
> > What you can do is make ext4_group_info generic for both mballoc and
> > oldalloc. We can then add bg_flag to the in memory ext4_group_info
> > that would indicate whether the group is initialized or not. Here
> > initialized for an UNINIT_GROUP indicate we have done
> > ext4_init_block_bitmap on the buffer_head. Then 
> > instead of depending on the buffer_head uptodate flag we can check
> > for the ext4_group_info bg_flags and decided whether the block/inode
> > bitmap need to be initialized.
> 
> That makes sense ! I agree with you, we need an additional in-memory
> flag to know whether buffers are initialized or not. Anyway, making
> ext4_group_info generic will lead to unneeded memory consumption for
> oldalloc. Maybe a simple independent bits array could do the trick. Is
> there any advantage to re-use ext4_group_info ?

For ext4 I think 99% of users will use mballoc, and the reduction in code
complexity is itself useful.  I don't think the in-memory overhead is very
much, maybe 1 MB per TB of filesystem space.

Also, if you are considering this approach (to initialize the in-memory
bitmaps at mount time) they should be written to disk even if unused.
Please also consider doing the inode table zeroing at the same time.
This would allow uninit_bg to avoid doing it at mke2fs time.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-09-23 23:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 11:41 [PATCH] ext4: fix initialization of UNINIT bitmap blocks Frédéric Bohé
2008-09-15 12:16 ` [PATCH v2] " Frédéric Bohé
2008-09-15 13:36   ` Aneesh Kumar K.V
2008-09-15 14:30     ` Frédéric Bohé
2008-09-18 13:45       ` Frédéric Bohé
2008-09-21  0:44         ` Theodore Tso
2008-09-22  8:09           ` Frédéric Bohé
2008-09-22  8:47             ` Aneesh Kumar K.V
2008-09-22  9:32               ` Frédéric Bohé
2008-09-23 23:13                 ` Andreas Dilger [this message]
2008-09-24 12:57                   ` Frédéric Bohé
2008-09-24 16:23                     ` Theodore Tso
2008-09-25 23:04                       ` Andreas Dilger
2008-09-24 12:38                 ` Frédéric Bohé
2008-09-26 13:17                   ` Frédéric Bohé
2008-09-28 22:49   ` 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=20080923231346.GT10950@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=frederic.bohe@bull.net \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox