Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
	"Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] btrfs: self heal from SB fail
Date: Mon, 11 Dec 2017 21:49:58 +0800	[thread overview]
Message-ID: <af568508-c2f2-d269-314a-5cf487e79d9a@oracle.com> (raw)
In-Reply-To: <aeadd575-240c-f1d8-cf88-fe77a537265a@gmx.com>




>>   If the old btrfs is over written with newer btrfs SB, and if mkfs.btrfs
>>   is not overwriting all the copies of SB then its a mkfs.btrfs bug.
> 
> Nope.
> 
> If the new btrfs is a smaller one than original btrfs, the 2nd super can
> still be there.

  Oh right, the mkfs.btrfs -b <SIZE> option, where we don't
  use entire device.

  Here the source of the problem is having the stale SB which is
  created by previous btrfs, and at the time of mkfs we do notice
  that there is a stale SB, so we already know how many copy of SB
  were there, but we are bit conservative not to clean all SBs.
  Its important to fix the problem end (mkfs), not the victim end
  (sb recovery).

  But looks like not everyone agrees to this view, and sb self heal
  will go wrong if mkfs does not clean all copy of SB, so now the
  only way to recover it is by user intervention, so I am ok to add
  mount -o sb_copy_num=<0|1|2>. Suggestions for any better name is
  welcome.

  Side check, any idea what's the use case around mkfs.btrfs -b option
  other than for testing ?

Thanks, Anand

  reply	other threads:[~2017-12-11 13:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  7:57 [PATCH RFC] btrfs: self heal from SB fail Anand Jain
2017-12-08  8:17 ` Qu Wenruo
2017-12-08 10:39   ` Anand Jain
2017-12-08 11:01     ` Qu Wenruo
2017-12-08 11:48       ` Anand Jain
2017-12-08 12:02         ` Qu Wenruo
2017-12-08 12:41           ` Anand Jain
2017-12-08 12:52             ` Qu Wenruo
2017-12-08 12:40   ` Hans van Kranenburg
2017-12-08  8:40 ` Nikolay Borisov
2017-12-08 10:33   ` Anand Jain
2017-12-08 12:12     ` Nikolay Borisov
2017-12-08 13:02       ` Anand Jain
2017-12-08 12:51 ` Austin S. Hemmelgarn
2017-12-08 12:59   ` Qu Wenruo
2017-12-08 13:05     ` Austin S. Hemmelgarn
2017-12-08 13:09       ` Qu Wenruo
2017-12-08 14:02   ` Anand Jain
2017-12-09  1:48     ` Qu Wenruo
2017-12-11 13:49       ` Anand Jain [this message]
2017-12-08 23:40   ` Paul Jones

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=af568508-c2f2-d269-314a-5cf487e79d9a@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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