Giter Site home page Giter Site logo

btrfs-progs's People

Contributors

adambuchbinder avatar andidr avatar aschnell avatar asj avatar bergwolf avatar chrismason-xx avatar congwang avatar darkling avatar ddiss avatar eworm-de avatar fauxfaux avatar fdmanana avatar forpster avatar goldwynr avatar guaneryu avatar idryomov avatar jeffmahoney avatar k7k7 avatar kdave avatar kreijack avatar liub avatar masoncl avatar naota avatar okkez avatar pibroch avatar pomac303 avatar rakeshpandit avatar tomato42 avatar ukernel avatar zabbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btrfs-progs's Issues

Segmentation fault (core dump) with btrfsck and btrfs restore

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.

kernel BUG at fs/btrfs/free-space-cache.c:1542!

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

repair.c:263: check_node: Assertion `!(level != btrfs_header_level(b))' failed.

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.

an option to btrfs-restore exclude paths matching a pattern (e.g., Trash)

(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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.