Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: linux-btrfs@vger.kernel.org, David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH v2] Btrfs: Remove the check for old-style mkfs
Date: Tue, 17 Mar 2015 00:13:07 -0700	[thread overview]
Message-ID: <20150317071307.GA17951@mew> (raw)
In-Reply-To: <1426574056-2978-1-git-send-email-bo.li.liu@oracle.com>

On Tue, Mar 17, 2015 at 02:34:16PM +0800, Liu Bo wrote:
> This was used to make sure that a fresh btrfs from an older mkfs.btrfs,
> but it also allows us to mount a buggy btrfs if this btrfs has the right
> superblock head part but has something wrong with chunk tree part[1], and
> after that we can hit BUG_ON()s set in the code to prevent something
> impossible.
> 
> Since David has released "Btrfs progs v3.19-rc2", just remove the check,
> if anyone who wants to make a fresh btrfs, please use the latest one.
> 
> [1]: http://www.spinics.net/lists/linux-btrfs/msg42358.html
> 
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>

# mount -o loop btrfs.img /mnt/test
# dmesg | tail
[   28.582698] BTRFS: device fsid 1c0ed5d6-550d-4010-b1b4-ce1828270713 devid 1 transid 4 /dev/loop0
[   28.598365] BTRFS: superblock checksum mismatch
[   28.617205] BTRFS: open_ctree failed

Looks good to me.

Reviewed-by: Omar Sandoval <osandov@osandov.com>

> ---
> v2: Refine the patch subject.
> 
>  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 41b320e..f63aacf 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -418,12 +418,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)) {
> -- 
> 1.8.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Omar

  reply	other threads:[~2015-03-17  7:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  5:40 [PATCH] Revert "Btrfs: allow superblock mismatch from older mkfs" Liu Bo
2015-03-12  5:45 ` Qu Wenruo
2015-03-12 17:34   ` David Sterba
2015-03-12 20:15     ` Liu Bo
2015-03-16 16:25       ` David Sterba
2015-03-17  2:41         ` Qu Wenruo
2015-03-17  6:34         ` [PATCH v2] Btrfs: Remove the check for old-style mkfs Liu Bo
2015-03-17  7:13           ` Omar Sandoval [this message]
2015-03-17 10:11           ` David Sterba
2015-03-12 17:25 ` [PATCH] Revert "Btrfs: allow superblock mismatch from older mkfs" David Sterba
2015-03-12 20:09   ` Liu Bo

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=20150317071307.GA17951@mew \
    --to=osandov@osandov.com \
    --cc=bo.li.liu@oracle.com \
    --cc=dsterba@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox