From: Tao Ma <tm@tao.ma>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4: Don't calc checksum in update_backups in online resize.
Date: Thu, 20 Sep 2012 14:33:43 +0800 [thread overview]
Message-ID: <1348122823-4930-1-git-send-email-tm@tao.ma> (raw)
From: Tao Ma <boyu.mt@taobao.com>
update_backups is used to backup all the metadata blocks, so we should
not take it for granted that 'data' is pointed to a super block and use
ext4_superblock_csum_set to calculate the checksum there. In case
the data is a group descriptor block, it will corrupt the last group
descriptor. And e2fsck will complain it.
As all the metadata checksum should already be OK when we do the backup,
remove the wrong ext4_superblock_csum_set and it should be just fine.
Reported-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
fs/ext4/resize.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 41f6ef6..019d528 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -970,8 +970,6 @@ static void update_backups(struct super_block *sb,
goto exit_err;
}
- ext4_superblock_csum_set(sb, (struct ext4_super_block *)data);
next reply other threads:[~2012-09-20 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 6:33 Tao Ma [this message]
2012-09-20 15:54 ` [PATCH] ext4: Don't calc checksum in update_backups in online resize Theodore Ts'o
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=1348122823-4930-1-git-send-email-tm@tao.ma \
--to=tm@tao.ma \
--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).