From: Peng Tao <bergwolf@gmail.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH][e2fsprogs] [resend]tune2fs: add force flag to tune2fs -I
Date: Thu, 11 Dec 2008 09:53:07 +0800 [thread overview]
Message-ID: <49407283.8090804@gmail.com> (raw)
In-Reply-To: <493F7852.2040201@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 969 bytes --]
Sorry, just found out that I messed up this patch...
----------------------------------------
add force flag to tune2fs -I, because it may cause data corruption when
the last inode table block is followed by a in-use data block. If user
really want to tune the inode size, they should be warned about this.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
---
misc/tune2fs.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 453a529..7308773 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1598,6 +1598,12 @@ retry_open:
ext2fs_mark_super_dirty(fs);
}
if (I_flag) {
+ if (f_flag) {
+ fputs(_("Enlarging inode size may cause data "
+ "corruption.\nUse with -f at your warranty. "
+ "Abort.\n"), stderr);
+ exit(1);
+ }
if (mount_flags & EXT2_MF_MOUNTED) {
fputs(_("The inode size may only be "
"changed when the filesystem is "
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
prev parent reply other threads:[~2008-12-11 1:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 8:05 [PATCH 3/3][e2fsprogs] tune2fs: Don't allow tune2fs -I if flex_bg on Peng Tao
2008-12-11 1:53 ` Peng Tao [this message]
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=49407283.8090804@gmail.com \
--to=bergwolf@gmail.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).