Re: WARNING: at fs/btrfs/extent_map.c:77 free_extent_map

2013-03-12 Thread Johannes Hirte
On Tue, 12 Mar 2013 09:39:35 +0800 Liu Bo bo.li@oracle.com wrote: Hi Johannes, Could you please tell us what mount options you're with? thanks, liubo The Filesystem has six subvolumes, so mount options are: noatime,inode_cache,autodefrag,subvolid=... for each subvol. I was able to

Re: WARNING: at fs/btrfs/extent_map.c:77 free_extent_map

2013-03-12 Thread Liu Bo
On Tue, Mar 12, 2013 at 10:32:09AM +0100, Johannes Hirte wrote: On Tue, 12 Mar 2013 09:39:35 +0800 Liu Bo bo.li@oracle.com wrote: Hi Johannes, Could you please tell us what mount options you're with? thanks, liubo The Filesystem has six subvolumes, so mount options are:

Re: [PATCH] Btrfs: fix backref walking race with tree deletions

2013-03-12 Thread Alex Lyakas
Hi Jan, I have been testing your patch, and definitely the reproducer now passes. However, my system tests still hit the issue, but unfortunately I am unable to isolate it into a bash script. All bash scripts work alright:) I have added some prints to attempt to debug this, and here is what I

[PATCH] Btrfs-progs: alloc our super copy in btrfs-find-root

2013-03-12 Thread Josef Bacik
Dave fixed the fs_info to allocate the super copy instead of embedding it, but he failed to notice that I open code open_ctree in btrfs-find-root so we end up with a super that's not allocated, so we segfault whenever you try to run btrfs-find-root. I've fixed this up and now we don't segfault

[PATCH v2] btrfs: clean up transaction abort messages

2013-03-12 Thread David Sterba
The transaction abort stacktrace is printed only once per module lifetime, but we'd like to see it each time it happens per mounted filesystem. Introduce a fs_state flag that records it. Tweak the messages around abort: * add error number to the first abort * print the exact negative errno from

[PATCH v3] btrfs: clean snapshots one by one

2013-03-12 Thread David Sterba
Each time pick one dead root from the list and let the caller know if it's needed to continue. This should improve responsiveness during umount and balance which at some point waits for cleaning all currently queued dead roots. A new dead root is added to the end of the list, so the snapshots

Re: [PATCH] btrfs-progs: Add a rule to build a static mkfs.btrfs

2013-03-12 Thread David Sterba
On Mon, Mar 11, 2013 at 09:17:17PM +, Antoine Sirinelli wrote: Static mkfs.btrfs can be used to bootstrap a system from a live CD which does not provide mkfs.btrfs. The executable produced is named mkfs.btrfs.static and built by invoking the static make rule. Added to integration queue,

Re: [PATCH] btrfs-progs: output raid[56] options in mkfs.btrfs

2013-03-12 Thread David Sterba
On Sun, Mar 10, 2013 at 09:30:13PM +0100, Matias Bjørling wrote: This patch adds the raid[56] options to the output of mkfs.btrfs help. Thanks, there was a patch for that in my branch already. Please don't forget to add your signed-off-by line. david -- To unsubscribe from this list: send the

Re: [PATCH] Btrfs-progs: alloc our super copy in btrfs-find-root

2013-03-12 Thread David Sterba
On Tue, Mar 12, 2013 at 10:07:39AM -0400, Josef Bacik wrote: Dave fixed the fs_info to allocate the super copy instead of embedding it, but he failed to notice that I open code open_ctree in btrfs-find-root so we end up with a super that's not allocated, so we segfault whenever you try to run

[PATCH] btrfs-progs: add Makefile rule for static build of btrfs-find-root

2013-03-12 Thread Hugo Mills
From: Hugo Mills h.r.mi...@reading.ac.uk btrfs-find-root isn't yet integrated into the main btrfs tool, and is an important recovery tool, so it deserves to be built as a static binary. Signed-off-by: Hugo Mills h...@carfax.org.uk --- Makefile |6 +- 1 file changed, 5 insertions(+), 1

Re: [PATCH v2] btrfs: clean up transaction abort messages

2013-03-12 Thread Zach Brown
* clean up btrfs_decode_error and callers -static const char *btrfs_decode_error(int errno, char nbuf[16]) +static const char *btrfs_decode_error(int errno) { - char *errstr = NULL; + char *errstr = unknown; switch (errno) { case -EIO: @@ -80,12 +80,6 @@ static

File space cache

2013-03-12 Thread Alex
Hi All, It seems my btrfs file space cache is corrupt; I had to run clear the log through a kernel problem. I've seen messages that the cache is rebuilt automatically, but this doesn't seem to be true as the messages that the free space is what is expected keep coming. I'm running kernel 3.8.2

Re: [PATCH 4/4 V2] btrfs-progs: rework get_fs_info to remove side effects

2013-03-12 Thread David Sterba
On Mon, Mar 11, 2013 at 11:17:40PM -0500, Eric Sandeen wrote: * btrfs scrub start * btrfs scrub status I did a quick test here: $ mkfs.btrfs -d raid10 -m raid10 /dev/sda[5678] $ mount /dev/sda5 /mnt $ fill with files $ btrfs scrub start /dev/sda5 (ok) $ btrfs scrub status /dev/sda5 (ok) $

[PATCH] xfstests: make defrag test 222 generic

2013-03-12 Thread Eric Sandeen
test 222 is just a stress test defragging the test device: # xfs_fsr QA tests # run xfs_fsr over the test filesystem to give it a wide and varied set of # inodes to try to defragment. This is effectively a crash/assert failure # test looking for corruption induced by xfs_fsr runs. There's no

Scrub and raid10 (3.9-rc2+) transid verify failed

2013-03-12 Thread David Sterba
Hi, while testing the userspace scrub updates, I've found lots of parent transid verify failures (see below) that are likely unrelated to the userspace patches. The filesystem was freshly created with raid10/raid10 profiles on 4x10G partitions (sda5...8) and there was fs_mark -D 5000 -S0 -n

Btrfs-progs: Update btrfs restore so it matches all current development

2013-03-12 Thread Josef Bacik
Hello, I noticed today that a bunch of work that had been done to restore last year wasn't in the normal btrfs-progs restore. So this work forward ports all of the patches that were missing, and redoes a bunch of the work that was done to deal with really broken file systems so that it uses more

[PATCH 01/10] Btrfs-progs: add an option for specifying the root to restore

2013-03-12 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com If the normal fs tree is hosed and the user has multiple subvolumes it's handy to be able to specify just one of the subvolumes to restore. It's also handy if a user only wants to restore say /home instead of his entire disk. Thanks, Signed-off-by: Josef

[PATCH 04/10] btrfs-progs: Fix error handling for failed reads in restore tool when mirrors exist

2013-03-12 Thread Josef Bacik
From: David Marcin djmar...@google.com --- cmds-restore.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmds-restore.c b/cmds-restore.c index 617f507..9781801 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -198,7 +198,7 @@ static int

[PATCH 05/10] restore: Split output directory and btrfs-local path search_dir() parameters

2013-03-12 Thread Josef Bacik
From: Peter Stuge pe...@stuge.se search_dir() recurses down the btrfs tree, and used to take the output path for every item (i.e. in the running system, output root directory concatenated with btrfs-local pathname) passed as the only path parameter. Moving the output root directory to a separate

[PATCH 02/10] Btrfs-progs: try other mirrors if decomression fails

2013-03-12 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com This will make the restore program fall back on other mirrors if it fails to decompress an extent for whatever reason. Thanks, Signed-off-by: Josef Bacik jo...@redhat.com --- cmds-restore.c | 46 +- 1 files

[PATCH 06/10] restore: Add regex matching of paths and files to be restored

2013-03-12 Thread Josef Bacik
From: Peter Stuge pe...@stuge.se The option -m is used to specify the regex string. -c is used to specify case insensitive matching. -i was already taken. In order to restore only a single folder somewhere in the btrfs tree, it is unfortunately neccessary to construct a slightly nontrivial

[PATCH 07/10] btrfs-progs: add lzo compression support to restore

2013-03-12 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com This patch simply adds support to decompress lzo compressed extents in restore. Signed-off-by: Josef Bacik jo...@redhat.com --- Makefile |2 +- cmds-restore.c | 89 2 files changed, 84

[PATCH 09/10] Btrfs-progs: give restore a list roots option

2013-03-12 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com Since restore has the ability to open really really screwed up file systems, add a list roots option to it so we can still get the contents of the tree root on a horribly broken fs. Thanks, Signed-off-by: Josef Bacik jo...@redhat.com --- cmds-restore.c | 92

[PATCH 10/10] Btrfs-progs: make restore deal with really broken file systems

2013-03-12 Thread Josef Bacik
All we need for restore to work is the chunk root, the tree root and the fs root we want to restore from. So to do this we need to make a few adjustments 1) Make open_ctree_fs_info fail completely if it can't read the chunk tree. There is no sense in continuing if we can't read the chunk tree

[PATCH 03/10] Btrfs-progs: try other mirrors on read failure

2013-03-12 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com If we hit a bad disk and the read doesn't work, try other mirrors in case we have other disks with good copies. Thanks, Signed-off-by: Josef Bacik jo...@redhat.com --- cmds-restore.c | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-)

[PATCH 08/10] btrfs-progs: fix regexec to only work if we actually have a regexec

2013-03-12 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com We were unconditionally executing our regular expression, even though we may not have one, so check to make sure mreg is not null before calling regexec. Thanks, Signed-off-by: Josef Bacik jo...@redhat.com --- cmds-restore.c |2 +- 1 files changed, 1

Re: Scrub and raid10 (3.9-rc2+) transid verify failed

2013-03-12 Thread David Sterba
On Tue, Mar 12, 2013 at 06:03:12PM +0100, David Sterba wrote: while testing the userspace scrub updates, I've found lots of parent transid verify failures (see below) that are likely unrelated to the userspace patches. Reproduced, now with [ 293.442196] btrfs bad fsid on block 1462738944 [

Re: [PATCH] btrfs-progs: add Makefile rule for static build of btrfs-find-root

2013-03-12 Thread David Sterba
On Tue, Mar 12, 2013 at 03:44:11PM +, Hugo Mills wrote: From: Hugo Mills h.r.mi...@reading.ac.uk btrfs-find-root isn't yet integrated into the main btrfs tool, and is an important recovery tool, so it deserves to be built as a static binary. Thanks, I'll add this now as a separate

Re: Scrub and raid10 (3.9-rc2+) transid verify failed

2013-03-12 Thread Chris Mason
On Tue, Mar 12, 2013 at 11:03:12AM -0600, David Sterba wrote: Hi, while testing the userspace scrub updates, I've found lots of parent transid verify failures (see below) that are likely unrelated to the userspace patches. The filesystem was freshly created with raid10/raid10 profiles on

Re: Btrfs-progs: Update btrfs restore so it matches all current development

2013-03-12 Thread Chris Mason
On Tue, Mar 12, 2013 at 11:38:07AM -0600, Josef Bacik wrote: Hello, I noticed today that a bunch of work that had been done to restore last year wasn't in the normal btrfs-progs restore. So this work forward ports all of the patches that were missing, and redoes a bunch of the work that

Debian 3.7.1 BTRFS crash

2013-03-12 Thread Russell Coker
I have a workstation running the Debian packaged 3.7.1 kernel from 24th December last year. After some period of uptime (maybe months) it crashed and mounted the root filesystem read-only. Now when I boot it the root filesystem gets mounted read-only. I have attached the dmesg output from

Re: Debian 3.7.1 BTRFS crash

2013-03-12 Thread Harald Glatt
If you care about the data, create a backup if you haven't already done so. Then you can try btrfsck, maybe you are in luck! On Wed, Mar 13, 2013 at 2:38 AM, Russell Coker russ...@coker.com.au wrote: I have a workstation running the Debian packaged 3.7.1 kernel from 24th December last year.

Re: Debian 3.7.1 BTRFS crash

2013-03-12 Thread Eric Sandeen
On 3/12/13 8:38 PM, Russell Coker wrote: I have a workstation running the Debian packaged 3.7.1 kernel from 24th December last year. After some period of uptime (maybe months) it crashed and mounted the root filesystem read-only. Now when I boot it the root filesystem gets mounted

Re: Debian 3.7.1 BTRFS crash

2013-03-12 Thread Jérôme Poulin
On Tue, Mar 12, 2013 at 10:03 PM, Eric Sandeen sand...@redhat.com wrote: [ 37.176790] BTRFS error (device dm-0) in __btrfs_free_extent:5143: IO failure [ 37.176791] btrfs is forced readonly [ 37.176793] btrfs: run_one_delayed_ref returned -5 It seems the SSD has bad blocks now, BTRFS

Re: File space cache

2013-03-12 Thread dima
Hello Alex, On 03/13/2013 01:17 AM, Alex wrote: Hi All, It seems my btrfs file space cache is corrupt; I had to run clear the log through a kernel problem. I've seen messages that the cache is rebuilt automatically, but this doesn't seem to be true as the messages that the free space is what