Hello again,
(this is a status update)
from what I begin to understand, the real problem is not the transid,
which is a kind of warning, but the failed assertion on "tree_root",
meaning that the read_tree_block call at disk-io.nc:736 fails.
The GDB backtrace is the following :
Reading symbols from /root/btrfs-progs-unstable/btrfsck...done.
(gdb) Starting program: /root/btrfs-progs-unstable/btrfsck /dev/dm-0
parent transid verify failed on 657818017792 wanted 85879 found 85878
parent transid verify failed on 657818017792 wanted 85879 found 85878
parent transid verify failed on 657818017792 wanted 85879 found 85878
btrfsck: disk-io.c:739: open_ctree_fd: Assertion
`!(!tree_root->node)'' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff7885ee5 in raise () from /lib/libc.so.6
(gdb) #0 0x00007ffff7885ee5 in raise () from /lib/libc.so.6
#1 0x00007ffff7887896 in abort () from /lib/libc.so.6
#2 0x00007ffff787e7a5 in __assert_fail () from /lib/libc.so.6
#3 0x000000000040a96a in open_ctree_fd (fp=5, path=0x14f77 <Address 0x14f77
out of bounds>, sb_bytenr=<value optimized out>, writes=<value
optimized out>) at disk-io.c:663
#4 0x000000000040adca in open_ctree (filename=0x7fffffffde9e
"/dev/dm-0", sb_bytenr=0, writes=0) at disk-io.c:587
#5 0x00000000004052ec in main (ac=<value optimized out>,
av=0x7fffffffdb68) at btrfsck.c:2859
Then I did some changes in disk-io.c#read_tree_block to tell him that
its parent_transid is 85878 when it is called with 85879 (a completely
blind change on consistency issues but my only guess for now). I also
added some printk''s to see what is going on. For details, see the
disk-io.[ch].patch files attached. Now btrfsck fails on this:
-- entering read_tree_block...
called with parent_transid=85879, setting it to 85878
btrfs_buffer_uptodate: extent_buffer_uptodate FAIL
btrfs_buffer_uptodate @657818017792 / transid wanted 85878
-- search loop [transid=85878] --
`-> extend buffer informations follow
|-> start: 657818017792
|-> dev_bytenr: 659437019136
|-> len: 4096
|-> refs: 2
`-> flags: 0
`-> eb found and set uptodate!
btrfsck: root-tree.c:46: btrfs_find_last_root: Assertion `!(path->slots[0] ==
0)'' failed.
I dd''ed the block to have a backup, I attached it here, if it can
useful
for anything. Here''s the dd command, if I''m wrong somewhere,
please tell
me:
dd bs=1 count=4096 skip=659437019136 if=/dev/dm-0 of=block
My next move will be to analyse the BTRFS''s structure more deeply to
understand how I can try to figure out what exactly is impacted and how
to get access to a least what is not impacted (corruption on impacted
data is something I can live with much better than losing access to
these 3TB of data "just" because of this ;)).
Any link/help welcome, of course. And also tell me if you consider my
status updates as useless for this list, so I don''t spam you guys. My
first goal is to get the data back, of course, but a good secondary goal
is to help have btrfsck handle these cases (but my C is pretty old now).
Regards,
Mikaƫl.