linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
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:03:40 -0500	[thread overview]
Message-ID: <20131205020340.GA8404@thunk.org> (raw)
In-Reply-To: <20131205012210.GC10150@birch.djwong.org>

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
all modern e2fsprogs should be able to do the right thing, if we set
BLOCK_UNINIT on all block groups.

				- Ted

  reply	other threads:[~2013-12-05  2:03 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 [this message]
2013-12-05  5:04                   ` Darrick J. Wong
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=20131205020340.GA8404@thunk.org \
    --to=tytso@mit.edu \
    --cc=a-fujita@rs.jp.nec.com \
    --cc=darrick.wong@oracle.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;
as well as URLs for NNTP newsgroup(s).