linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: "Frédéric Bohé" <frederic.bohe@bull.net>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: Online resize with flex bg
Date: Thu, 28 Aug 2008 13:11:56 -0400	[thread overview]
Message-ID: <20080828171156.GK26987@mit.edu> (raw)
In-Reply-To: <1219934280.3591.121.camel@frecb007923.frec.bull.fr>

On Thu, Aug 28, 2008 at 04:38:00PM +0200, Frédéric Bohé wrote:
> with flexbg :
> 	It works the same way but this time, meta-datas blocks for new groups
> are created inside the working filesystem (in a group containing
> meta-datas for the whole flex group). resize2fs scans from the end of
> the last flex_group meta-datas until it finds enough space to put the
> new meta-datas. This is not a problem when resizing offline, but when
> online, the blocks found for the meta-datas may be allocated by someone
> else before the GROUP_ADD ioctl occurs.

Yep, that's a problem.  Probably the quick fix is to allocate the
metadata outside of the working filesystem at least for now.  Because
we're extending the filesystem block group by block group, the
quick-and-dirty fix would be to just use the non-flex_bg allocation
algorithm and allocate the block bitmap, inode bitmap, and inode table
in the block group.

This we can do in the userspace code right now, since the kernel code
is enforcing that the block and inode bitmaps be in the new block
group at the moment anyway.  It is highly undesirable, since it would
break the advantage of flex_bg, but at least online resizing would
work.

To fix it right, I suspect we will need a new ioctl and do more of the
work inside the kernel, instead of in userspace.  That's the only way
we can do the block allocation inside the kernel efficiently.

       	      	    	       	      	  	 - Ted
--
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-08-28 17:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 14:38 Online resize with flex bg Frédéric Bohé
2008-08-28 17:11 ` Theodore Tso [this message]
2008-08-28 17:36   ` Theodore Tso
2008-08-28 19:57     ` Andreas Dilger
2008-09-01 14:02     ` [PATCH] ext4: update flex bg counters when resizing Frédéric Bohé
2008-09-08 14:17       ` 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=20080828171156.GK26987@mit.edu \
    --to=tytso@mit.edu \
    --cc=frederic.bohe@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 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).