Error: btrfs bad tree block

2011-12-19 Thread Mathieu Chouquet-Stringer
Hello, It seems BTRFS finally gave up on me! :-) I've been using as my main FS for quite a while and this time I'm not able to fix this issue. I've tried mounting with -o clear_cache, zeroing the log and changing super but I'm still getting this over and over: btrfs bad tree block

[PATCH] btrfs: add new ioctl to determine size of compressed file

2011-12-19 Thread David Sterba
Go through all extents of a file in a given [start,end) range and sum for: * regular extent: -block_len, size is already rounded up to blocks * inline extents: length rounded up to 512 The range is start inclusive / end exclusive. For the whole file pass 0 and (u64)-1. The resulting value is

A sample tool how to use the new ioctl

2011-12-19 Thread David Sterba
This is a standalone tool I've used to exercise the ioctl, simply pass the name of a file and see the result. The numbers are a rough estimate. It also takes the range arguments, but the ratio will be bogus due to comparison to whole file (st_blocks), an exact extent length from fiemap/filefrag is

btrfs crashing 3.2.0-030200rc2-generic

2011-12-19 Thread Hadmut Danisch
Hi, just in case anybody wants to know: btrfs just crashed my kernel. regards Dec 19 15:13:53 sodom kernel: [19781.993189] INFO: task udisks-daemon:2987 blocked for more than 120 seconds. Dec 19 15:13:53 sodom kernel: [19781.993192] echo 0 /proc/sys/kernel/hung_task_timeout_secs disables

Re: A sample tool how to use the new ioctl

2011-12-19 Thread Chris Mason
On Mon, Dec 19, 2011 at 03:25:39PM +0100, David Sterba wrote: This is a standalone tool I've used to exercise the ioctl, simply pass the name of a file and see the result. The numbers are a rough estimate. It also takes the range arguments, but the ratio will be bogus due to comparison to

Re: A sample tool how to use the new ioctl

2011-12-19 Thread David Sterba
On Mon, Dec 19, 2011 at 09:47:06AM -0500, Chris Mason wrote: On Mon, Dec 19, 2011 at 03:25:39PM +0100, David Sterba wrote: This is a standalone tool I've used to exercise the ioctl, simply pass Could you please add this to btrfs filesystem stat filename Here it is, but I haven't really

Re: Error: btrfs bad tree block

2011-12-19 Thread Mathieu Chouquet-Stringer
On Mon, Dec 19, 2011 at 01:33:05PM +0100, Mathieu Chouquet-Stringer wrote: Any idea what I could try next? Or fsck I could use? ;-) -- Mathieu Chouquet-Stringer math...@csetco.com The sun itself sees not till heaven clears. -- William

Re: [PATCH] btrfs: add new ioctl to determine size of compressed file

2011-12-19 Thread Liu Bo
On 12/19/2011 10:17 PM, David Sterba wrote: Go through all extents of a file in a given [start,end) range and sum for: * regular extent: -block_len, size is already rounded up to blocks * inline extents: length rounded up to 512 The range is start inclusive / end exclusive. For the whole