Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: none <ytrezq@sdf-eu.org>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: How to recover a filesystem without formatting nor using the btrfs check command.
Date: Wed, 04 Jan 2017 23:29:42 +0100	[thread overview]
Message-ID: <ce3a4bebb63ae1c4d526f9943081e903@mx.sdfeu.org> (raw)
In-Reply-To: <24b88326-e44b-adc6-044d-ae678316f9a6@cn.fujitsu.com>

Le 2017-01-03 07:11, Qu Wenruo a écrit :
>> 
>> Hello, what’s the status of my report since last October ?
>> 
>> thanks,
>> 
>> 
> Sorry for the late reply.
> 
> I tried your image but...
> It's so slow, no matter the mode I'm using.
> 
> So I'm not sure if it's a deadlock since lowmem mode still takes
> several minuts and just output the same output.
Anyway, I got the lowmem mode finishing. But it didn’t solved my 
problem. I have a core i7‑6700k ᴄᴘᴜ
> The fs contains SOOOOOOOOO many reflinks and I can hardly determine if
> it's normal or deadlock.
> 
Yes, but most those reflinks are used only by a small number of sparse 
file whose content are made of 0 bits (they still represent several 
hundreds of Gb data). If those files can be deleted, then I should be 
able to btrfs the disk normally. (the problem is I can’t do it because 
of filesystem corruption)

I don’t know how much they are, but I think the number is high enough to 
make btrfscking the disk as hard as breaking encryption.

> Considering btrfs check original mode is using list to iteration
> backrefs, it can be very very slow, maybe O(n^3)~O(n^4).
> 
> And considering the number of reflinks, it can be longer than your
> assumption (maybe longer than 48 hours).

I tried running it and even after a week nothing is finished. I never 
assumed anything.

> Just try xfstests generic/175, and see how slow btrfs check is.
> 
> 
> And since your fs tree is super big, normal btrfs-debug-tree output
> will be over several GBs for debugging, this also makes things quite
> nasty to debug manually.
But most of the virtual space is used by only a small number of very 
large files which I agree to delete.

> IMHO we only have 2 remaining methods to fix your fs:
> 1) Rework current backref structure.
>    Use rb-tree other than list to iteration.
> 2) Introduce --init-extent-tree in lowmem mode.
> 
> Neither way it's a quick fix.
> And I'm trying to implement the 2nd method first, but it may takes a
> lot of time.
> (I still have a lot of other btrfs development to do, sorry)
> 
> I'd suggest you to rebuild the fs, considering the time we need to fix 
> it.
which I can’t, looks like it will takes some months to get a rce 
vulnerability in git to get fixed (before corrupting the filesystem, I 
saw ᴄᴠᴇ‑2016‑2315 was fixed incorrectly on GitHub servers).

As soon as I get access to my previous work data, I will be able to 
trace the root cause in ~1‒5 hours.
> Thanks,
> Qu
regards,

  reply	other threads:[~2017-01-04 22:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 19:42 How to recover a filesystem without formatting nor using the btrfs check command none
2016-10-24  1:15 ` Qu Wenruo
     [not found]   ` <36f56365-27ac-878e-c5fb-f414646eda3a@sdf-eu.org>
2016-10-25  3:04     ` Qu Wenruo
2016-10-25 18:19       ` none
2016-10-26  1:43         ` Qu Wenruo
2016-10-26 11:52           ` none
2016-10-27  1:11             ` Qu Wenruo
2017-01-01 23:29               ` none
2017-01-03  6:11                 ` Qu Wenruo
2017-01-04 22:29                   ` none [this message]
2016-10-26 19:03           ` none

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=ce3a4bebb63ae1c4d526f9943081e903@mx.sdfeu.org \
    --to=ytrezq@sdf-eu.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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