josefbacik / btrfs-progs Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
free_extent_buffer dumps core after failing an assertion. It looks like the extent has the dirty flag set.
Thank you for developing a btrfs repair utility.
I'm having issues with btrfs and btrfs-progs. I've tried using an older kernel 3.9 and 3.13 as well as compiling btrfs-progs from git.
I'm on my phone and I couldn't tee the core dump for some reason. Here's some pictures.
http://imgur.com/IEvUIDU
http://imgur.com/HHeeocU
DMESG of running btrfsck and then mount
[ 68.532113] raid6: using algorithm avx2x4 (25437 MB/s)
[ 68.532114] raid6: using avx2x2 recovery algorithm
[ 68.571219] bio: create slab <bio-1> at 1
[ 68.571876] Btrfs loaded
[ 68.572789] btrfs: device fsid 20b35509-caee-4402-89fc-0e5d6e410a0f devid 1 transid 256183 /dev/dm-2
[ 79.173260] btrfsck[567]: segfault at 1d3 ip 000000000041a7c4 sp 00007fff3fc76c40 error 4 in btrfsck[400000+61000]
[ 293.004797] btrfs: device fsid 20b35509-caee-4402-89fc-0e5d6e410a0f devid 1 transid 256183 /dev/mapper/storageroot-rootvol
[ 293.005394] btrfs: disk space caching is enabled
[ 293.007408] btrfs bad tree block start 9871045958540255856 148835315712
[ 293.040087] btrfs: open_ctree failed
Background:
My laptop started acting really weird and x crashed. Systemd started spamming messages about failing to write because the filesystem was read only. Nothing would respond. I force powered it off and btrfs says it has a bad block. Booted it up with a livecd and tried to fix it according to help online. Noticed segfault.
Looks very similar to https://bugzilla.redhat.com/show_bug.cgi?id=923542
Here are details of my case:
i have couple of btrfs partitions one of which stops working for second time now with same symptoms (see dmesg). Others are working fine at the same time.
After the first failure i was able to get partition back to life by addtion nospace_cache
option to fstab
and rebooting. After that everything worked fine for a few weeks up until today.
Partition was always mounted like this
/dev/mapper/vg0-var /var btrfs defaults,compress=lzo 0 0
I created partition image just like you said in redhat bugzilla comment with git version of btrfs-image tool
$ uname -a
Linux archbang 3.8.7-1-pae #1 SMP PREEMPT Mon Apr 15 18:39:53 EDT 2013 i686 GNU/Linux
You could also see details of my first failure here https://bbs.archlinux.org/viewtopic.php?pid=1256798#p1256798
I've copied repair.c from unstable to your master branch to use its new support for lzo compression.
Trying to repair my filesystem shows the following message:
root@jupiter /usr/src/josefbacik-btrfs-progs-df8b44a % ./repair /dev/sda3
Checking extent root
parent transid verify failed on 622147694592 wanted 130733 found 134506
parent transid verify failed on 622147694592 wanted 130733 found 134506
parent transid verify failed on 622147694592 wanted 130733 found 134506
parent transid verify failed on 622147694592 wanted 130733 found 134506
Ignoring transid failure
repair: repair.c:263: check_node: Assertion `!(level != btrfs_header_level(b))' failed.
Running some of the tools here, including restore and btrfsck, fail on this method on a btrfs partition that fails to mount.
Stepping through with gdb, path.slots consists all of zeros and path.nodes usually only have the first two be non-zero.
Can supply more info if needed.
Would be cool if you could add a flag to Output responses in a more machine readable way, which would make writing a gui way easier :-)
(I first wrote this wish down at https://btrfs.wiki.kernel.org/index.php/Talk:Restore.)
I'm thinking how to exclude paths like .Trash from restoring with a regex.
So, POSIX Extended Regular Expressions are used here. (Which don't have a syntax for the wanted complement operation.)
he simplest solution must be to patch the C code to implement an option like grep's -v (or --invert-match): "Invert the sense of matching, to select non-matching lines." (But "-v" has already been taken as an option of btrfs-restore...) Combining inclusion and exclusion patterns is more complex; which one should take precedence is not a clear thing; ideally, a language like that of "find" should be implemented for matching, but that's too much work. (As for me personally, I'm simply interested in excluding trash directories, and that's achievable with the simplest inversion option.)
Exclusion could be done by a variant of the -m switch, say, -M.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.