linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] allow tune2fs to set/clear resize_inode
@ 2007-11-05 20:45 Eric Sandeen
  2007-11-06  1:12 ` Andreas Dilger
  2008-02-26 22:34 ` Theodore Tso
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Sandeen @ 2007-11-05 20:45 UTC (permalink / raw)
  To: ext4 development

(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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-02-26 22:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05 20:45 [PATCH] allow tune2fs to set/clear resize_inode Eric Sandeen
2007-11-06  1:12 ` 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

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).