linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Akira Fujita <a-fujita@rs.jp.nec.com>,
	"'ext4 development'" <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] mke2fs: Fix block bitmaps initalization with -O ^resize_inode
Date: Wed, 4 Dec 2013 21:04:10 -0800	[thread overview]
Message-ID: <20131205050410.GA10143@birch.djwong.org> (raw)
In-Reply-To: <20131205020340.GA8404@thunk.org>

[resend without accidentally dropping the cc's]

On Wed, Dec 04, 2013 at 09:03:40PM -0500, Theodore Ts'o wrote:
> On Wed, Dec 04, 2013 at 05:22:10PM -0800, Darrick J. Wong wrote:
> > > 2) The IETF rule of "be conservative in what you send, and liberal in
> > > what you accept" applies.
> > 
> > I'm not convinced that we /need/ Akira's patch to clear BLOCK_UNINIT on any
> > group containing its own metadata, but I doubt it'd harm anything other than
> > make e2fsck slower.
> > 
> > It would certainly be the conservative-send route though.
> 
> The place where we are being conserviative what we send is that we
> clear BLOCK_UNINIT for block groups that don't have any data blocks,
> but which has metadata blocks belonging to *other* block groups,
> because there were some kernel implementations in the past that didn't
> handle this correctly.
> 
> But if you have a block group that has only its metadata, that's
> perfectly fine.  And that's easy to test; if you create a file system
> like this:
> 
>      touch /tmp/foo.img
>      mke2fs -t ext2 -O uninit_bg /tmp/foo.img 1800000
> 
> ... then by definition every single block group has its own metadata,
> and if there were problems with block groups that had its own metadata
> blocks, we wouldn't be able to set BLOCK_UNINIT on any block group at
> all.
> 
> It looks like we are currently clearing BLOCK_UNINIT for block groups
> that contain superblocks and backup superblocs.  To be honest, I don't
> remember why we are currently doing this.  I *think* the kernel and

Looking at the git history, that chunk of ext2fs_reserve_super_and_bgd() landed
there when you were trying to clean up libext2fs, though there's no obvious
reason why we need to unset BLOCK_UNINIT there too.  Oh well, it can't hurt.

> all modern e2fsprogs should be able to do the right thing, if we set
> BLOCK_UNINIT on all block groups.

Fortunately, they do, and have since the initial ext4dev code in 2006-7.

--D
> 
> 				- Ted

  reply	other threads:[~2013-12-05  5:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22  7:39 [PATCH] mke2fs: Fix block bitmaps initalization with -O ^resize_inode Akira Fujita
2013-11-22  8:03 ` Akira Fujita
2013-11-23  1:33 ` Darrick J. Wong
2013-11-26  1:27   ` Darrick J. Wong
2013-11-26  8:10     ` Akira Fujita
2013-11-27  0:55       ` Darrick J. Wong
2013-11-28  8:50         ` Akira Fujita
2013-11-30 20:06           ` Darrick J. Wong
2013-12-04 23:44             ` Theodore Ts'o
2013-12-05  1:22               ` Darrick J. Wong
2013-12-05  2:03                 ` Theodore Ts'o
2013-12-05  5:04                   ` Darrick J. Wong [this message]
2013-12-05  2:09                 ` Theodore Ts'o
2013-12-05  5:00                   ` Darrick J. Wong

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=20131205050410.GA10143@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=a-fujita@rs.jp.nec.com \
    --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;
as well as URLs for NNTP newsgroup(s).