From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Erik Jensen <erikjensen@rkjnsn.net>,
Hugo Mills <hugo@carfax.org.uk>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: "bad tree block start" when trying to mount on ARM
Date: Wed, 26 Jun 2019 16:10:43 +0800 [thread overview]
Message-ID: <8aa09a61-aa1c-5dcd-093f-ec096a38a7b5@gmx.com> (raw)
In-Reply-To: <CAMj6ewOHrJVdwfKrgXZxwfwE=eoTaB9MS57zha33yb1_iOLWiw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2749 bytes --]
On 2019/6/26 下午3:04, Erik Jensen wrote:
> I'm still seeing this. Anything else I can try?
[...]
>>>>
>>>> [ 83.066301] BTRFS info (device dm-3): disk space caching is enabled
>>>> [ 83.072817] BTRFS info (device dm-3): has skinny extents
>>>> [ 83.553973] BTRFS error (device dm-3): bad tree block start, want
>>>> 17628726968320 have 396461950000496896
>>>> [ 83.554089] BTRFS error (device dm-3): bad tree block start, want
>>>> 17628727001088 have 5606876608493751477
>>>> [ 83.601176] BTRFS error (device dm-3): bad tree block start, want
>>>> 17628727001088 have 5606876608493751477
>>>> [ 83.610811] BTRFS error (device dm-3): failed to verify dev extents
>>>> against chunks: -5
>>>> [ 83.639058] BTRFS error (device dm-3): open_ctree failed
Since your fsck reports no error, I'd say your on-disk data is
completely fine.
So it's either the block layer reading some wrong from the disk or btrfs
layer doesn't do correct endian convert.
Would you dump the following data (X86 and ARM should output the same
content, thus one output is enough).
# btrfs ins dump-tree -b 17628726968320 /dev/dm-3
# btrfs ins dump-tree -b 17628727001088 /dev/dm-3
And then, for the ARM system, please apply the following diff, and try
mount again.
The diff adds extra debug info, to exam the vital members of a tree block.
Correct fs should output something like:
BTRFS error (device dm-4): bad tree block start, want 30408704 have 0
tree block gen=4 owner=5 nritems=2 level=0
csum:
a304e483-0000-0000-0000-00000000000000000000-0000-0000-0000-000000000000
The csum one is the most important one, if there aren't so many zeros,
it means at that timing, btrfs just got a bunch of garbage, thus we
could do further debug.
Thanks,
Qu
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index deb74a8c191a..e9d11d501b7b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -618,8 +618,16 @@ static int btree_readpage_end_io_hook(struct
btrfs_io_bio *io_bio,
found_start = btrfs_header_bytenr(eb);
if (found_start != eb->start) {
+ u8 csum[BTRFS_CSUM_SIZE];
+
btrfs_err_rl(fs_info, "bad tree block start, want %llu
have %llu",
eb->start, found_start);
+ pr_info("tree block gen=%llu owner=%llu nritems=%u
level=%u\n",
+ btrfs_header_generation(eb), btrfs_header_owner(eb),
+ btrfs_header_nritems(eb), btrfs_header_level(eb));
+ read_extent_buffer(eb, csum, 0, BTRFS_CSUM_SIZE);
+ pr_info("csum: %pU%-pU\n", csum, csum + 16);
+
ret = -EIO;
goto err;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-06-26 8:10 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 8:34 "bad tree block start" when trying to mount on ARM Erik Jensen
2019-05-21 8:56 ` Patrik Lundquist
2019-05-21 9:01 ` Erik Jensen
2019-05-21 9:18 ` Hugo Mills
2019-05-22 16:02 ` Erik Jensen
2019-06-26 7:04 ` Erik Jensen
2019-06-26 8:10 ` Qu Wenruo [this message]
[not found] ` <CAMj6ewO229vq6=s+T7GhUegwDADv4dzhqPiM0jo10QiKujvytA@mail.gmail.com>
2019-06-28 8:15 ` Qu Wenruo
2021-01-18 10:50 ` Erik Jensen
[not found] ` <CAMj6ewMqXLtrBQgTJuz04v3MBZ0W95fU4pT0jP6kFhuP830TuA@mail.gmail.com>
2021-01-18 11:07 ` Qu Wenruo
2021-01-18 11:55 ` Erik Jensen
2021-01-18 12:01 ` Qu Wenruo
2021-01-18 12:12 ` Erik Jensen
2021-01-19 5:22 ` Erik Jensen
2021-01-19 9:28 ` Erik Jensen
2021-01-20 8:21 ` Qu Wenruo
2021-01-20 8:30 ` Qu Wenruo
[not found] ` <CAMj6ewOqCJTGjykDijun9_LWYELA=92HrE+KjGo-ehJTutR_+w@mail.gmail.com>
2021-01-26 4:54 ` Erik Jensen
2021-01-29 6:39 ` Erik Jensen
2021-02-01 2:35 ` Qu Wenruo
2021-02-01 5:49 ` Su Yue
2021-02-04 6:16 ` Erik Jensen
2021-02-06 1:57 ` Erik Jensen
2021-02-10 5:47 ` Qu Wenruo
2021-02-10 22:17 ` Erik Jensen
2021-02-10 23:47 ` Qu Wenruo
2021-02-18 1:24 ` Qu Wenruo
2021-02-18 4:03 ` Erik Jensen
2021-02-18 5:24 ` Qu Wenruo
2021-02-18 5:49 ` Erik Jensen
2021-02-18 6:09 ` Qu Wenruo
2021-02-18 6:59 ` Erik Jensen
2021-02-18 7:24 ` Qu Wenruo
2021-02-18 7:59 ` Erik Jensen
2021-02-18 8:38 ` Qu Wenruo
2021-02-18 8:52 ` Erik Jensen
2021-02-18 8:59 ` Qu Wenruo
2021-02-20 2:47 ` Erik Jensen
2021-02-20 3:16 ` Qu Wenruo
2021-02-20 4:28 ` Erik Jensen
2021-02-20 6:01 ` Qu Wenruo
2021-02-21 5:36 ` Erik Jensen
2021-02-18 7:25 ` Erik Jensen
2019-05-21 10:17 ` 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=8aa09a61-aa1c-5dcd-093f-ec096a38a7b5@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=erikjensen@rkjnsn.net \
--cc=hugo@carfax.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).