Re: A rescue tool for btrfs

2010-12-20 Thread Bryan Østergaard
On 17/12/2010, at 00.18, Michael Niederle wrote: Hi! Last week I crashed a btrfs file system. I didn't lose a lot of data because I had current backups of most data and a full backup from a month ago. But I thought it would be a nice idea to have a rescue tool! Currently I have a first

[BUG] can not allocate space for caching data

2010-12-20 Thread Miao Xie
Hi, Chris There is something wrong with this patch: commit 83a50de97fe96aca82389e061862ed760ece2283 Author: Chris Mason chris.ma...@oracle.com Date: Mon Dec 13 15:06:46 2010 -0500 Btrfs: prevent RAID level downgrades when space is low The extent allocator has code that allows us

Re: [BUG] can not allocate space for caching data

2010-12-20 Thread Chris Mason
Excerpts from Miao Xie's message of 2010-12-20 07:25:10 -0500: Hi, Chris There is something wrong with this patch: commit 83a50de97fe96aca82389e061862ed760ece2283 Author: Chris Mason chris.ma...@oracle.com Date: Mon Dec 13 15:06:46 2010 -0500 Btrfs: prevent RAID level downgrades

Re: [BUG] can not allocate space for caching data

2010-12-20 Thread Miao Xie
On Mon, 20 Dec 2010 07:44:06 -0500, Chris Mason wrote: Excerpts from Miao Xie's message of 2010-12-20 07:25:10 -0500: Hi, Chris There is something wrong with this patch: commit 83a50de97fe96aca82389e061862ed760ece2283 Author: Chris Masonchris.ma...@oracle.com Date: Mon Dec 13 15:06:46 2010

Re: [BUG] can not allocate space for caching data

2010-12-20 Thread Chris Mason
Excerpts from Miao Xie's message of 2010-12-20 08:13:14 -0500: On Mon, 20 Dec 2010 07:44:06 -0500, Chris Mason wrote: Excerpts from Miao Xie's message of 2010-12-20 07:25:10 -0500: Hi, Chris There is something wrong with this patch: commit 83a50de97fe96aca82389e061862ed760ece2283

mini bug report

2010-12-20 Thread Xavier Nicollet
Hi, I use btrfs on my laptop, 2.6.37-rc2 from kernel.org, under dm-crypt, as /. I use space_cache and compression (not forced). Today, my computer froze. At reboot, the kernel could not mount. The dmesg output, which I haven't saved was speaking of a null dereference. After that I rebooted on

Re: mini bug report

2010-12-20 Thread Chris Mason
Excerpts from Xavier Nicollet's message of 2010-12-20 10:58:01 -0500: Hi, I use btrfs on my laptop, 2.6.37-rc2 from kernel.org, under dm-crypt, as /. I use space_cache and compression (not forced). Today, my computer froze. At reboot, the kernel could not mount. The dmesg output, which I

[TRIVIAL][PATCH] Improve error handling in the btrfs command

2010-12-20 Thread Goffredo Baroncelli
Hi Chris, below is enclosed a trivial patch, which has the aim to improve the error reporting of the btrfs command. You can pull from http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git branch strerror I changed every printf(some-error) to something like:

Re: [PATCH] Improve error handling in filesystem df

2010-12-20 Thread Goffredo Baroncelli
Hi Ben, I integrated your patch on the my one (see my next email). However I changed the argument of the strerror function from the ioctl return code to the errno variable. Regards G.Baroncelli On Sunday, 19 December, 2010, Ben Gamari wrote: The return values of ioctl weren't being printed to

Re: [TRIVIAL][PATCH] Improve error handling in the btrfs command

2010-12-20 Thread Goffredo Baroncelli
On Monday, 20 December, 2010, you (Chris Samuel) wrote: On 21/12/10 07:06, Goffredo Baroncelli wrote: below is enclosed a trivial patch, which has the aim to improve the error reporting of the btrfs command. Any reason to not just use perror() ? Some time I needed to add other info, so

Re: [TRIVIAL][PATCH] Improve error handling in the btrfs command

2010-12-20 Thread Chris Samuel
On 21/12/10 07:06, Goffredo Baroncelli wrote: below is enclosed a trivial patch, which has the aim to improve the error reporting of the btrfs command. Any reason to not just use perror() ? -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC -- To unsubscribe from this list: send

Re: btrfs: 21 minutes to read 1.2M file directory

2010-12-20 Thread Andy Isaacson
Sigh, wrong btrfs address on the original. Apologies for the double-post. On Mon, Dec 20, 2010 at 02:24:46PM -0800, Andy Isaacson wrote: I have a directory with 1.2M files in it, which makes readdir very slow on btrfs with cold caches (although it's reasonably fast with hot caches as in the

Re: [TRIVIAL][PATCH] Improve error handling in the btrfs command

2010-12-20 Thread Chris Samuel
On 21/12/10 09:53, Goffredo Baroncelli wrote: Some time I needed to add other info, so perror(3) may not be sufficient.. Ah, of course, and you cannot rely on safely snprintf()'ing something into the string would get passed to perror() because that could easily change errno if something went

Re: [BUG] can not allocate space for caching data

2010-12-20 Thread Yan, Zheng
On Mon, Dec 20, 2010 at 11:41 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Miao Xie's message of 2010-12-20 08:13:14 -0500: On Mon, 20 Dec 2010 07:44:06 -0500, Chris Mason wrote: Excerpts from Miao Xie's message of 2010-12-20 07:25:10 -0500: Hi, Chris There is something

Re: btrfs: 21 minutes to read 1.2M file directory

2010-12-20 Thread Felipe Contreras
On Tue, Dec 21, 2010 at 12:24 AM, Andy Isaacson a...@hexapodia.org wrote: I have a directory with 1.2M files in it, which makes readdir very slow on btrfs with cold caches (although it's reasonably fast with hot caches as in the first example below): Sounds like: Bug 21562 - btrfs is dead

Scary OOPS when playing with --bind, --move, and friends

2010-12-20 Thread C Anthony Risinger
hello, i really need to stop recklessly doing this stuff to my laptop... i'm finishing a new initramfs hook to support many features of btrfs; when considering how i was going to mount the target subvol as / for the booting system, i decided to play with --bind and --move. in short, everything

Re: Scary OOPS when playing with --bind, --move, and friends

2010-12-20 Thread Fajar A. Nugraha
On Tue, Dec 21, 2010 at 10:51 AM, C Anthony Risinger anth...@extof.me wrote: in short, everything works fine until you --bind across a subvol via the special folders created when one takes a snapshot, # mount --bind root/subvol of my current root/home/anthony bind # touch bind/TEST you can

Re: Scary OOPS when playing with --bind, --move, and friends

2010-12-20 Thread cwillu
On Mon, Dec 20, 2010 at 10:16 PM, Fajar A. Nugraha l...@fajar.net wrote: On Tue, Dec 21, 2010 at 10:51 AM, C Anthony Risinger anth...@extof.me wrote: in short, everything works fine until you --bind across a subvol via the special folders created when one takes a snapshot, # mount --bind

Re: Scary OOPS when playing with --bind, --move, and friends

2010-12-20 Thread Fajar A. Nugraha
On Tue, Dec 21, 2010 at 11:16 AM, Fajar A. Nugraha l...@fajar.net wrote: On Tue, Dec 21, 2010 at 10:51 AM, C Anthony Risinger anth...@extof.me wrote: i'm on 2.6.36.2 Try 2.6.35 or later. I tested something similar under ubuntu maverick (2.6.35-24-generic) and it works just fine. Sorry, hit

Re: Scary OOPS when playing with --bind, --move, and friends

2010-12-20 Thread C Anthony Risinger
On Mon, Dec 20, 2010 at 10:19 PM, Fajar A. Nugraha l...@fajar.net wrote: On Tue, Dec 21, 2010 at 11:16 AM, Fajar A. Nugraha l...@fajar.net wrote: On Tue, Dec 21, 2010 at 10:51 AM, C Anthony Risinger anth...@extof.me wrote: i'm on 2.6.36.2 Try 2.6.35 or later. I tested something similar

Re: Scary OOPS when playing with --bind, --move, and friends

2010-12-20 Thread C Anthony Risinger
On Mon, Dec 20, 2010 at 10:25 PM, C Anthony Risinger anth...@extof.me wrote: On Mon, Dec 20, 2010 at 10:19 PM, Fajar A. Nugraha l...@fajar.net wrote: Still curious about your test scenario though. Can you double check it? A write on the snapshot should not appear on the parent filesystem.