All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Alexander Wetzel <alexander.wetzel@web.de>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
	wqu@suse.com
Subject: Re: [BUG] BTRFS critical corrupt leaf - bisected to 496245cac57e
Date: Mon, 15 Jul 2019 09:07:25 +0800	[thread overview]
Message-ID: <6f7968ec-af22-77e9-a8e3-e58a385b53cf@gmx.com> (raw)
In-Reply-To: <CAJCQCtTNrF-Oj_WQ71_ApRRpVikwdG7mYW4iiz2iA+N1AAWkmQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2360 bytes --]



On 2019/7/14 下午11:40, Chris Murphy wrote:
> On Sun, Jul 14, 2019 at 3:49 AM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>
>> I totally understand that the solution I'm going to provide sounds
>> aweful, but I'd recommend to use a newer enough kernel but without that
>> check, to copy all the data to another btrfs fs.
>>
>> It could be more safe than waiting for a btrfs check to repair it.
> 
> Does the problem affect all trees? If so, then merely creating new
> subvolumes, and then 'cp -a --relink oldsubvol newsubvol', and then
> delete old subvolumes, won't fix it.

Not 100% sure yet, but from your dump, it's affecting INODE_ITEM and
DIR_INDEX/DIR_ITEM.

For other trees, only root tree and data reloc tree has INODE_ITEM.
They may get affected but shouldn't be a problem.

> 
> I wonder where the ideas are for online or even out of band fsck.
> Offline fsck is too slow and does not scale, a known problem. And both
> copying old file system to new file system; as well as restoring
> backups to a new file system, is astronomically slower because data
> must also be copied, not just metadata. Also a known problem.
> 
> What about a variation on btrfs send/receive with --no-data option, to
> read out all the old metadata and rewrite all new metadata to the same
> file system, taking advantage of COW, but without having to copy out
> the data? And then after all of that is done, delete the old file
> subvolumes?

It looks possible, but the use case also looks very limited.
Just the case you're hitting, not a generic use case.

So I'm afraid it won't be possible in short term.

Thanks,
Qu

> 
> Or a variation on seed/sprout, without requiring additional devices.
> The seed part "snapshots" the whole original file system (all trees),
> and create two read-write file systems: current online mounted volume,
> and in-progress offline repair volume. If the repair fails, it's
> straightforward to clean up everything while retaining the changes -
> at least it's not worse off. If the repair succeeds, then there'd need
> to be some means of merging the two read-write file systems - that
> could be complicated. But even if in the short term that merge
> required an unmount, and perform the merge offline, that would be way
> more tolerable than the way things are now.
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-07-15  1:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13 20:48 [BUG] BTRFS critical corrupt leaf - bisected to 496245cac57e Alexander Wetzel
2019-07-14  1:30 ` Qu Wenruo
2019-07-14  9:25   ` Alexander Wetzel
2019-07-14  9:49     ` Qu Wenruo
2019-07-14 12:07       ` Alexander Wetzel
2019-07-14 12:51         ` Qu Wenruo
2019-07-14 15:40       ` Chris Murphy
2019-07-15  1:07         ` Qu Wenruo [this message]
2019-07-29 12:46 ` Swâmi Petaramesh
2019-07-29 13:33   ` Qu Wenruo
2019-07-30  4:56     ` Qu Wenruo
2019-07-30  6:44       ` Swâmi Petaramesh
2019-07-30  7:21         ` Qu Wenruo
2019-07-30  8:02           ` Swâmi Petaramesh
2019-07-30 13:57           ` Swâmi Petaramesh
2019-07-30 14:16             ` Qu Wenruo

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=6f7968ec-af22-77e9-a8e3-e58a385b53cf@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=alexander.wetzel@web.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=wqu@suse.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 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.