From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: David Sterba <dsterba@suse.cz>, Josef Bacik <jbacik@fb.com>,
Chris Mason <clm@fb.com>
Subject: Re: [PATCH] btrfs: Don't continue mounting when superblock csum mismatches even generation is less than 10.
Date: Thu, 7 Aug 2014 10:51:15 +0800 [thread overview]
Message-ID: <53E2E9A3.6060206@cn.fujitsu.com> (raw)
In-Reply-To: <1403599753-4072-1-git-send-email-quwenruo@cn.fujitsu.com>
It seems that the patch is rejected in patchwork,
Could any one tell me the reason?
Thanks,
Qu
-------- Original Message --------
Subject: [PATCH] btrfs: Don't continue mounting when superblock csum
mismatches even generation is less than 10.
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Date: 2014年06月24日 16:49
> Revert kernel commit 667e7d94a1683661cff5fe9a0fa0d7f8fdd2c007.
> (Btrfs: allow superblock mismatch from older mkfs by Chris Mason)
>
> Above commit will cause disaster if someone try to mount a newly created but
> later corrupted btrfs filesystem.
>
> And before btrfs entered mainline, btrfs-progs has already superblock
> checksum. See btrfs-progs commit: 5ccd1715fa2eaad0b26037bb53706779c8c93b5f
> (superblock duplication by Yan Zheng).
> Before commit 5ccd17, mkfs.btrfs uses 16K as super offset, while current btrfs
> uses 64K super offset, anyway old btrfs without super csum will not be
> mountable due to the change of super offset.
>
> So backward compatibility is not a problem.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
> fs/btrfs/disk-io.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 8bb4aa1..dbfb2a3 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -400,12 +400,6 @@ static int btrfs_check_super_csum(char *raw_disk_sb)
>
> if (memcmp(raw_disk_sb, result, csum_size))
> ret = 1;
> -
> - if (ret && btrfs_super_generation(disk_sb) < 10) {
> - printk(KERN_WARNING
> - "BTRFS: super block crcs don't match, older mkfs detected\n");
> - ret = 0;
> - }
> }
>
> if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) {
next prev parent reply other threads:[~2014-08-07 2:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 8:49 [PATCH] btrfs: Don't continue mounting when superblock csum mismatches even generation is less than 10 Qu Wenruo
2014-08-07 2:51 ` Qu Wenruo [this message]
2014-08-19 17:18 ` David Sterba
2014-08-20 1:16 ` Qu Wenruo
2014-08-19 19:48 ` Chris Mason
2014-08-20 2:34 ` Qu Wenruo
2014-08-25 15:28 ` David Sterba
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=53E2E9A3.6060206@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fb.com \
--cc=linux-btrfs@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.