From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] allow tune2fs to set/clear resize_inode
Date: Mon, 05 Nov 2007 14:45:41 -0600 [thread overview]
Message-ID: <472F80F5.3030608@redhat.com> (raw)
(this patch has been carried in Red Hat / Fedora rpms for a while, not
sure why it never got sent upstream... clearing this allows for mounting
filesystems with a resize_inode on older systems)
-----------------
Allow tune2fs to set & clear resize_inode; requires fsck afterwards.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Addresses-Red-Hat-Bugzilla: #167816
Index: e2fsprogs-git/misc/tune2fs.c
===================================================================
--- e2fsprogs-git.orig/misc/tune2fs.c
+++ e2fsprogs-git/misc/tune2fs.c
@@ -96,6 +96,7 @@ static void usage(void)
static __u32 ok_features[3] = {
EXT3_FEATURE_COMPAT_HAS_JOURNAL |
+ EXT2_FEATURE_COMPAT_RESIZE_INODE |
EXT2_FEATURE_COMPAT_DIR_INDEX, /* Compat */
EXT2_FEATURE_INCOMPAT_FILETYPE, /* Incompat */
EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER /* R/O compat */
@@ -283,6 +284,7 @@ static void update_feature_set(ext2_fils
{
int sparse, old_sparse, filetype, old_filetype;
int journal, old_journal, dxdir, old_dxdir;
+ int resize_inode, old_resize_inode;
struct ext2_super_block *sb= fs->super;
__u32 old_compat, old_incompat, old_ro_compat;
@@ -298,6 +300,8 @@ static void update_feature_set(ext2_fils
EXT3_FEATURE_COMPAT_HAS_JOURNAL;
old_dxdir = sb->s_feature_compat &
EXT2_FEATURE_COMPAT_DIR_INDEX;
+ old_resize_inode = sb->s_feature_compat &
+ EXT2_FEATURE_COMPAT_RESIZE_INODE;
if (e2p_edit_feature(features, &sb->s_feature_compat,
ok_features)) {
fprintf(stderr, _("Invalid filesystem option set: %s\n"),
@@ -312,6 +316,8 @@ static void update_feature_set(ext2_fils
EXT3_FEATURE_COMPAT_HAS_JOURNAL;
dxdir = sb->s_feature_compat &
EXT2_FEATURE_COMPAT_DIR_INDEX;
+ resize_inode = sb->s_feature_compat &
+ EXT2_FEATURE_COMPAT_RESIZE_INODE;
if (old_journal && !journal) {
if ((mount_flags & EXT2_MF_MOUNTED) &&
!(mount_flags & EXT2_MF_READONLY)) {
@@ -358,7 +364,8 @@ static void update_feature_set(ext2_fils
sb->s_feature_incompat))
ext2fs_update_dynamic_rev(fs);
if ((sparse != old_sparse) ||
- (filetype != old_filetype)) {
+ (filetype != old_filetype) ||
+ (resize_inode != old_resize_inode)) {
sb->s_state &= ~EXT2_VALID_FS;
printf("\n%s\n", _(please_fsck));
}
Index: e2fsprogs-git/misc/tune2fs.8.in
===================================================================
--- e2fsprogs-git.orig/misc/tune2fs.8.in
+++ e2fsprogs-git/misc/tune2fs.8.in
@@ -392,12 +392,16 @@ option.
.TP
.B sparse_super
Limit the number of backup superblocks to save space on large filesystems.
+.TP
+.B resize_inode
+Reserve space so the block group descriptor table may grow in the future.
.RE
.IP
After setting or clearing
-.B sparse_super
-and
-.B filetype
+.BR sparse_super ,
+.BR filetype ,
+or
+.B resize_inode
filesystem features,
.BR e2fsck (8)
must be run on the filesystem to return the filesystem to a consistent state.
next reply other threads:[~2007-11-05 20:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 20:45 Eric Sandeen [this message]
2007-11-06 1:12 ` [PATCH] allow tune2fs to set/clear resize_inode Andreas Dilger
2007-11-06 4:49 ` Eric Sandeen
2007-11-06 18:51 ` Theodore Tso
2007-11-07 20:30 ` Andreas Dilger
2008-02-26 22:34 ` Theodore Tso
2008-02-26 22:38 ` Eric Sandeen
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=472F80F5.3030608@redhat.com \
--to=sandeen@redhat.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).