From: Theodore Tso <tytso@MIT.EDU>
To: Andreas Dilger <adilger@sun.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: mke2fs and lazy_itable_init
Date: Thu, 8 May 2008 22:18:27 -0400 [thread overview]
Message-ID: <20080509021827.GA8871@mit.edu> (raw)
In-Reply-To: <20080508224847.GR3627@webber.adilger.int>
On Thu, May 08, 2008 at 04:48:47PM -0600, Andreas Dilger wrote:
> I just noticed lazy_itable_init in the mke2fs.8.in man page. I think
> a warning needs to be added there that this is not currently safe to
> use, because the kernel does not yet do the background zeroing. There
> is nothing in the man page to indicate that this is unsafe...
Yeah, I was hoping we would actually get this fixed before 1.41 was
released.... (i.e., implement the background zeroing). One of the
things I was thinking about was whether we could avoid needing to go
through the jbd layer when zeroing out an entire inode table block,
and then in the completion callback function when the block group was
completely initiaized, we could clear the ITABLE_UNINIT flag.
It doesn't need to go through the journal, because if we crash without
having the flag set, its not a big deal; the inode table will just not
be marked initialized. The only thing which might require a little
care is if buffer head referencing part of the inode table which is
getting zero'ed out is in flight when an inode allocation happens, an
inode gets marked dirty, and fs/ext4/inode.c wants to write out an
inode table block that is in the middle of being zero'ed. Given that
we've bypassed the jbd layer for efficiency's sake, something bad
could happy unless we protect it with some kind of lock.
Or we could just say that this initialization pass is relatively rare,
so do it the cheap cheasy way, even if the blocks end up going through
the journal. The upside is that it should be pretty quick and easy to
code it this way.
- Ted
next prev parent reply other threads:[~2008-05-09 2:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 22:48 mke2fs and lazy_itable_init Andreas Dilger
2008-05-09 2:18 ` Theodore Tso [this message]
2008-05-09 8:19 ` Andreas Dilger
2008-08-27 9:29 ` Solofo.Ramangalahy
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=20080509021827.GA8871@mit.edu \
--to=tytso@mit.edu \
--cc=adilger@sun.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox