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:36:52 -0400 [thread overview]
Message-ID: <20080828173652.GL26987@mit.edu> (raw)
In-Reply-To: <20080828171156.GK26987@mit.edu>
And here's the short-term fix. With this patch, e2fsprogs will work
on ext4 filesystems with flex_bg. Interested in working on the
long-term fix, where we put all or most of the resizing logic in the
kernel? :-)
- Ted
commit df3871a168c3f8308718d72a17062a20aa02cc01
Author: Theodore Ts'o <tytso@mit.edu>
Date: Thu Aug 28 13:24:12 2008 -0400
resize2fs: Allow (non-optimal) on-line resizing for ext4 filesystems
The current method of adding one block group at a time to a mounted
filesystem means it is impossible to accomodate the flex_bg allocation
method of placing the metadata together in a single block group. For
now we "fix" this issue by using the traditional layout for new block
groups, where each block group is self-contained and contains its own
bitmap blocks and inode tables. This means we don't get the layout
advantages of flex_bg in the new block groups, but at least it allows
on-line resizing to function.
Long term, we will need to create a new ioctl which does much more of
the resizing work in the kernel.
We also fix a bug in the ext3/ext4 ioctl fallback code so we stop
trying the ext3 ioctl for every single block group when resizing an
ext4 filesystem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/resize/online.c b/resize/online.c
index f4d24ce..d581553 100644
--- a/resize/online.c
+++ b/resize/online.c
@@ -93,6 +93,17 @@ errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
if (retval)
return retval;
+ /* The current method of adding one block group at a time to a
+ * mounted filesystem means it is impossible to accomodate the
+ * flex_bg allocation method of placing the metadata together
+ * in a single block group. For now we "fix" this issue by
+ * using the traditional layout for new block groups, where
+ * each block group is self-contained and contains its own
+ * bitmap blocks and inode tables. This means we don't get
+ * the layout advantages of flex_bg in the new block groups,
+ * but at least it allows on-line resizing to function.
+ */
+ new_fs->super->s_feature_incompat &= ~EXT4_FEATURE_INCOMPAT_FLEX_BG;
retval = adjust_fs_info(new_fs, fs, *new_size);
if (retval)
return retval;
@@ -154,7 +165,7 @@ errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
ioctl(fd, EXT2_IOC_GROUP_ADD, &input) == 0)
continue;
else
- use_old_ioctl = 1;
+ use_old_ioctl = 0;
input64.group = input.group;
input64.block_bitmap = input.block_bitmap;
next prev parent reply other threads:[~2008-08-28 17:36 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
2008-08-28 17:36 ` Theodore Tso [this message]
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=20080828173652.GL26987@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.