Recovering btrfs fs after failed to read chunk root

2013-10-04 Thread Daniele Buono
So I'm writing my (dis)adventure with btrfs here hoping to help the developers or someone with similar problems. I had a btrfs filesystem at work, using two 1TB disks, raid1 for both data and metadata. A week ago one of the two disks start having hundreds of relocated sectors, so I decide to

Re: Corrupt btrfs filesystem recovery... What best instructions?

2013-10-04 Thread Martin
What best to try next? mount -o recovery,noatime btrfsck: --repairtry to repair the filesystem --init-csum-treecreate a new CRC tree --init-extent-tree create a new extent tree or is a scrub worthwhile? The fail and switch to read-only

btrfs recovery: What do the commands actually do?

2013-10-04 Thread Martin
There's ad-hoc comment for various commands to recover from filesystem errors. But what do they actually do and when should what command be used? (The wiki gives scant indication other than to 'blindly' try things...) There's: mount -o recovery,noatime btrfsck: --repair

Re: btrfs recovery: What do the commands actually do?

2013-10-04 Thread Duncan
Martin posted on Fri, 04 Oct 2013 16:47:19 +0100 as condensed: There's ad-hoc comment for various commands to recover from filesystem errors. But what do they actually do and when should what command be used? What do they do exactly and what are the indicators to try using them? Or when

Re: btrfs recovery: What do the commands actually do?

2013-10-04 Thread Martin
On 04/10/13 19:32, Duncan wrote: Martin posted on Fri, 04 Oct 2013 16:47:19 +0100 as condensed: There's ad-hoc comment for various commands to recover from filesystem errors. But what do they actually do and when should what command be used? What do they do exactly and what are the

[PATCH] Btrfs: Simplify the logic in alloc_extent_buffer() for existing extent buffer case

2013-10-04 Thread Chandra Seetharaman
alloc_extent_buffer() uses radix_tree_lookup() when radix_tree_insert() fails with EEXIST. That part of the code is very similar to the code in find_extent_buffer(). This patch replaces radix_tree_lookup() and surrounding code in alloc_extent_buffer() with find_extent_buffer(). While at it, this

[PATCH] Btrfs-progs: print out human readable errors for inodes and backrefs

2013-10-04 Thread Josef Bacik
We usually print out a hex value of any errors on inodes or their backrefs, which is a huge pain for me because I have to put it into a calculator and count the bits to figure out which errors these map to, and usually I get it wrong the first time. To fix this lets just print out a human

Re: [PATCH] Btrfs: relocate csums properly with prealloc extents

2013-10-04 Thread Johannes Hirte
On Fri, 27 Sep 2013 09:37:00 -0400 Josef Bacik jba...@fusionio.com wrote: A user reported a problem where they were getting csum errors when running a balance and running systemd's journal. This is because systemd is awesome and fallocate()'s its log space and writes into it. Unfortunately

Re: [PATCH] Btrfs: Simplify the logic in alloc_extent_buffer() for existing extent buffer case

2013-10-04 Thread Zach Brown
On Fri, Oct 04, 2013 at 02:55:29PM -0500, Chandra Seetharaman wrote: alloc_extent_buffer() uses radix_tree_lookup() when radix_tree_insert() fails with EEXIST. That part of the code is very similar to the code in find_extent_buffer(). This patch replaces radix_tree_lookup() and surrounding

Re: [PATCH] Btrfs: Simplify the logic in alloc_extent_buffer() for existing extent buffer case

2013-10-04 Thread Chandra Seetharaman
On Fri, 2013-10-04 at 14:38 -0700, Zach Brown wrote: Thanks for the review Zach. On Fri, Oct 04, 2013 at 02:55:29PM -0500, Chandra Seetharaman wrote: alloc_extent_buffer() uses radix_tree_lookup() when radix_tree_insert() fails with EEXIST. That part of the code is very similar to the

Re: [PATCH] Btrfs: Simplify the logic in alloc_extent_buffer() for existing extent buffer case

2013-10-04 Thread Zach Brown
+struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, + u64 start, unsigned long len) len isn't used. Thought about removing the unused argument. But didn't know all the history behind why it was there in the first place. So, didn't

btrfs raid0

2013-10-04 Thread ray clancy
How can I verify the read speed of a btrfs raid0 pair in archlinux.? I assume raid0 means striped activity in a paralleled mode at lease similar to raid0 in mdadm. How can I measure the btrfs read speed since it is copy-on-write which is not the norm in mdadm raid0.? Perhaps I cannot use

Re: btrfs raid0

2013-10-04 Thread Hugo Mills
On Fri, Oct 04, 2013 at 04:15:22PM +, ray clancy wrote: How can I verify the read speed of a btrfs raid0 pair in archlinux.? I assume raid0 means striped activity in a paralleled mode at lease similar to raid0 in mdadm. How can I measure the btrfs read speed since it is copy-on-write

Linux Arch: kernel BUG at fs/btrfs/inode.c:873!

2013-10-04 Thread Anatol Pomozov
Hi, I have a home server on Linux Arch (kernel 3.11.2) that uses multi-device btrfs on root filesystem. Until recently it worked completely fine. And yesterday I rebooted it and the machine did not wake up. I booted from a USB (kernel 3.10) and tried to mount the filesystem. Here is OOPs I see

Re: Linux Arch: kernel BUG at fs/btrfs/inode.c:873!

2013-10-04 Thread Duncan
Anatol Pomozov posted on Fri, 04 Oct 2013 21:03:11 -0700 as excerpted: Hi, I have a home server on Linux Arch (kernel 3.11.2) that uses multi-device btrfs on root filesystem. Until recently it worked completely fine. And yesterday I rebooted it and the machine did not wake up. I