[PATCH] Btrfs: don't null pointer deref on abort

2013-05-08 Thread Josef Bacik
I'm sorry, theres no excuse for this sort of work. We need to use root-leafsize since eb may be NULL. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/disk-io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c

[PATCH] Btrfs-progs: make image restore with the original device offsets

2013-05-08 Thread Josef Bacik
the entire image looking for chunk tree blocks and builds an in memory chunk tree so we can write logical blocks to their physical offsets. With this patch we no longer have the problems I described above. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- btrfs-image.c | 476

Re: WARNING: at fs/btrfs/free-space-cache.c:921 __btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]()

2013-05-08 Thread Josef Bacik
On Wed, May 08, 2013 at 11:34:40AM -0600, Alexander Skwar wrote: Hello Josef Did you have a chance to look at that image? Did you find anything? Or should I simply create a new filesystem and forget about the issue? I haven't looked at it yet, let me run it right now and see if it's

[PATCH] Btrfs: remove warn on in free space cache writeout

2013-05-08 Thread Josef Bacik
This catches block groups that are too large to properly cache. We deal with this case fine, so the warning just confuses users. Remove the warning. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/free-space-cache.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions

Re: WARNING: at fs/btrfs/free-space-cache.c:921 __btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]()

2013-05-08 Thread Josef Bacik
On Wed, May 08, 2013 at 11:34:40AM -0600, Alexander Skwar wrote: Hello Josef Did you have a chance to look at that image? Did you find anything? Or should I simply create a new filesystem and forget about the issue? So the file system isn't corrupt, you just got a giant block group for

Re: Btrfs: cleanup destroy_marked_extents

2013-05-09 Thread Josef Bacik
On Thu, May 09, 2013 at 06:22:06AM -0600, Dan Carpenter wrote: Hello Josef Bacik, This is a semi-automatic email about new static checker warnings. The patch fd8b2b611580: Btrfs: cleanup destroy_marked_extents from Apr 24, 2013, leads to the following Smatch complaint: fs/btrfs/disk

[PATCH] Btrfs-progs: sanity check the number of items in a leaf V2

2013-05-09 Thread Josef Bacik
-by: Josef Bacik jba...@fusionio.com --- V1-V2: 0 nritems is valid for leaves. ctree.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/ctree.c b/ctree.c index 16f4daa..4598665 100644 --- a/ctree.c +++ b/ctree.c @@ -638,6 +638,12 @@ int btrfs_check_leaf(struct btrfs_root

[PATCH] Btrfs-progs: add the ability to find mismmatching backrefs

2013-05-09 Thread Josef Bacik
this patch makes us keep track of how big the backrefs are, since their disk_num_bytes _have_ to match the number of bytes for the actual extent item. With this patch fsck now finds problems with a file system it previously thought was ok. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com

[PATCH] Btrfs: handle running extent ops with skinny metadata

2013-05-09 Thread Josef Bacik
the extent_op. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/extent-tree.c | 37 + 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 2305b5c..d39d69e 100644 --- a/fs

[PATCH] Btrfs: handle running extent ops with skinny metadata V2

2013-05-09 Thread Josef Bacik
this we can just check the -is_data section of the extent_op, and we can store the level of the buffer we were modifying in the extent_op. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- V1-V2: Just store the level in the extent op, we may not have other delayed refs for this bytenr which

[PATCH] Btrfs-progs: make fsck fix certain file extent inconsistencies

2013-05-14 Thread Josef Bacik
by my reproducer is also fixed. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c | 693 +--- ctree.h |2 + disk-io.c |3 + extent-tree.c |6 + 4 files changed, 666 insertions(+), 38 deletions(-) diff

Re: [PATCH] xfstests btrfs/284: shorten duration, fix output

2013-05-14 Thread Josef Bacik
' to see the entire diff) Ran: btrfs/284 Failures: btrfs/284 Failed 1 of 1 tests Yeah defrag used to spit out a return value on success, that has been fixed recently. This patch looks good, I just ran it on my box and it ran fine, you can add Reviewed-by: Josef Bacik jba...@fusionio.com

Re: I/O errors block the entire filesystem

2013-05-15 Thread Josef Bacik
On Sat, May 11, 2013 at 01:16:38AM -0600, Alexandre Oliva wrote: On Apr 4, 2013, Alexandre Oliva ol...@gnu.org wrote: I've been trying to figure out the btrfs I/O stack to try to understand why, sometimes (but not always), after a failure to read a (data non-replicated) block from the

[PATCH] Btrfs-progs: add a newline to a free space cache message

2013-05-15 Thread Josef Bacik
Left out a newline in the generation check printf. Signed-off-by: Josef Bacik jba...@fusionio.com --- free-space-cache.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/free-space-cache.c b/free-space-cache.c index 5fb8ece..a30438b 100644 --- a/free-space-cache.c +++ b

[PATCH] Btrfs: do delay iput in sync_fs

2013-05-16 Thread Josef Bacik
We get lock inversion with umount if we allow iputs from sync_fs, so use the delay iput flag to keep this from happening. Thanks, Reported-by: David Sterba dste...@suse.cz Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/super.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH] Btrfs-progs: add --init-extent-tree to btrfsck

2013-05-17 Thread Josef Bacik
on at the time of the crash, this is needed because the reloc tree seems to confuse fsck at the moment. With this patch I can put back together a users file system that was completely gone. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c | 360

Re: kernel 3.8.8: btrfs still crashes on boot when it can't replay a log

2013-05-17 Thread Josef Bacik
On Thu, May 16, 2013 at 09:09:18AM -0600, Marc MERLIN wrote: I've reported this bug a few times over different kernel versions over the last year now, and unfortunately it's still not fixed as of 3.8 (yes, I know 3.9 is out, I'm just about to switch). What happens as far as I know: I have

[PATCH] Btrfs: make sure roots are assigned before freeing their nodes

2013-05-17 Thread Josef Bacik
-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/disk-io.c | 39 +-- 1 files changed, 21 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1341247..84c4426 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1967,30

Re: kernel 3.8.8: btrfs still crashes on boot when it can't replay a log

2013-05-17 Thread Josef Bacik
On Fri, May 17, 2013 at 07:25:12PM -0600, Marc MERLIN wrote: On Fri, May 17, 2013 at 12:54:56PM -0400, Josef Bacik wrote: If so, could you add this to the list of things to fix to make btrfs a bit less scary to others? :) (and of course more production ready, this repeated problem would

[PATCH] Btrfs: fix estale with btrfs send

2013-05-20 Thread Josef Bacik
...@vger.kernel.org Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/send.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index ff40f1c..ba9690b 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4579,6

Re: [PATCH] Btrfs: fix estale with btrfs send

2013-05-20 Thread Josef Bacik
On Mon, May 20, 2013 at 09:48:54AM -0600, Wang Shilong wrote: Hello Josef, It seems you missed Reported-by in changelog~_~ Yup I'll fix it up in my tree, thanks, Josef -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

[PATCH] xfstests: btrfs 308: regression test for btrfs send

2013-05-20 Thread Josef Bacik
to make sure we don't have the same problem in the future. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- src/Makefile|2 +- src/hold-open.c | 29 tests/btrfs/308 | 74 +++ tests/btrfs/308.out

Re: Regression in kernel v3.9.3

2013-05-21 Thread Josef Bacik
On Tue, May 21, 2013 at 05:53:10AM -0600, Matteo Fortini wrote: Hi, I just built and installed kernel v3.9.3 (was using v3.9.0 before) and if I do a git fetch on a quite small (1MB) directory, the system starts thrashing and I can't even kill -9 git. It's a btrfs partition with no fancy mount

Re: Top shows brtfs-cache-1 and brtfs-endio-met while the hard drives seem busy

2013-05-22 Thread Josef Bacik
On Wed, May 22, 2013 at 07:22:42AM -0600, Laurent Humblet wrote: Hi, I have setup about a year ago a BTRFS RAID 1 filesystem on two 2TB Western Digital WD20EARS hard drives and I have created subvolumes that I mount regularly as I need them. I put mostly music, videos and various files on

[PATCH] Btrfs: set the free space control unit properly

2013-05-28 Thread Josef Bacik
generic/013 pass with 16k leafsize, whereas before it failed every single time. Thanks, Cc: sta...@vger.kernel.org Reported-by: Stefan Behrens sbehr...@giantdisaster.de Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.h|1 - fs/btrfs/extent-tree.c |7

Re: [PATCH] Btrfs: set the free space control unit properly

2013-05-29 Thread Josef Bacik
On Tue, May 28, 2013 at 09:43:07PM -0600, Miao Xie wrote: Ontue, 28 May 2013 14:50:25 -0400, Josef Bacik wrote: Stefan pointed out that xfstests generic/013 was failing because the free space cache checker was complaining with leafsize of 16k. Turns out this is because we were

[PATCH] Btrfs-progs: fix free space cache checks

2013-05-29 Thread Josef Bacik
extents set, we wouldn't advance last properly because we unconditionally use key.offset instead of root-leafsize. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c | 16 ++-- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/cmds-check.c b/cmds

[PATCH] Btrfs: simplify unlink reservations

2013-05-29 Thread Josef Bacik
and I can rm all the files on the file system. Thanks, Reported-by: David Sterba dste...@suse.cz Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.h |4 +- fs/btrfs/extent-tree.c | 25 ++ fs/btrfs/inode.c | 212

Re: oops at mount

2013-05-30 Thread Josef Bacik
On Thu, May 30, 2013 at 05:17:06AM -0600, Papp Tamas wrote: hi All, I'm new on the list. System: Distributor ID: Ubuntu Description: Ubuntu 13.04 Release: 13.04 Codename: raring Linux ctu 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64

Re: Btrfs metadata corruption; unmountable FS

2013-05-30 Thread Josef Bacik
On Wed, May 29, 2013 at 08:55:31PM -0600, Alex Marquez wrote: I'm not entirely sure what went completely wrong. Three possibilities are most likely, and they're listed below. For reference, here are supplemental materials split out into their own pastebins: * btrfs-debug-tree -R log

Re: Btrfsck errors (fs tree 565 refs 125 not found) - how serious

2013-05-30 Thread Josef Bacik
On Thu, May 30, 2013 at 12:06:50PM -0600, Clemens Eisserer wrote: Hi again, I am able to induce the btrfsck errors I experienced using a synthetic workload on a fresh filesystem with linux-3.10.0.rc2. However as filing the bug-report would take quite some time (uploading 512mb trace-files,

[PATCH] Btrfs: stop all workers before cleaning up roots

2013-05-30 Thread Josef Bacik
the thread has exited. This patch makes the kthreads all stop first and then we do our cleanup. This should fix the race. Thanks, Reported-by: David Sterba dste...@suse.cz Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/disk-io.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions

Re: testing stable pages being modified

2013-05-31 Thread Josef Bacik
On Fri, May 31, 2013 at 12:24:30AM -0600, Zach Brown wrote: Changing O_DIRECT in flight has always been a deep dark corner case, and crc errors are the expected result. Have you found anyone doing this in real life? Agreed; and no, I haven't heard of people accidentally modifying stable

Re: testing stable pages being modified

2013-05-31 Thread Josef Bacik
On Fri, May 31, 2013 at 07:53:29AM -0600, Chris Mason wrote: Quoting Josef Bacik (2013-05-31 09:29:07) On Fri, May 31, 2013 at 12:24:30AM -0600, Zach Brown wrote: Changing O_DIRECT in flight has always been a deep dark corner case, and crc errors are the expected result. Have you found

[PATCH] Btrfs-progs: fix fsck dealing with finding backrefs first

2013-06-03 Thread Josef Bacik
me to fix a file system that previously was not able to be fixed by fsck. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c | 134 +++--- 1 files changed, 119 insertions(+), 15 deletions(-) diff --git a/cmds-check.c b

[PATCH] Btrfs: do not pin while under spin lock

2013-06-03 Thread Josef Bacik
but before dropping the mutex, the same way it works when delayed refs run normally. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/disk-io.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5d18997

[PATCH] Btrfs: add some missing iput()'s in btrfs_orphan_cleanup

2013-06-03 Thread Josef Bacik
There are some error cases that we don't do an iput() on our inode, fix this. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/inode.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b11a95e..d37bccf 100644

[PATCH] Btrfs: put our inode if orphan cleanup fails

2013-06-03 Thread Josef Bacik
When we cross into a different subvol when doing a lookup we will run the orhpan cleanup. If this fails however we do not drop the ref to the inode we were looking up before we return an error, which leads to busy inodes on umount. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs

[PATCH] Btrfs-progs: fix incorrect root backref errors in fsck

2013-06-04 Thread Josef Bacik
when running this reproducer. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index bbef89a..4083298 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -1507,14

Re: v3.9 bug at /fs/btrfs/free-space-cache.c:1567 after powercycle

2013-06-05 Thread Josef Bacik
On Tue, Jun 04, 2013 at 09:59:05PM -0600, Sage Weil wrote: Hi- I'm pretty reliably triggering the following bug after powercycling an active btrfs + ceph workload and then trying to remount. Is this a known issue? Yeah sorry it's fixed in 3.10, I really need to send the patch back to

[PATCH] Btrfs-progs: fix reference check for roots in btrfsck

2013-06-05 Thread Josef Bacik
a root item. If it doesn't then it's just referenced by things that will go no where anyway. With this patch fsck no longer incorrectly complains about this file system image I have. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c |8 1 files changed, 8 insertions

[PATCH] Btrfs: don't delete fs_roots until after we cleanup the transaction

2013-06-06 Thread Josef Bacik
We get a use after free if we had a transaction to cleanup since there could be delayed inodes which refer to their respective fs_root. Thanks Reported-by: David Sterba dste...@suse.cz Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/disk-io.c |2 +- 1 files changed, 1 insertions

[PATCH] Btrfs: exclude logged extents before replying when we are mixed

2013-06-06 Thread Josef Bacik
xfstests generic/311 with mixed block groups turned on. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.h |2 + fs/btrfs/extent-tree.c | 122 +-- fs/btrfs/tree-log.c| 12 + 3 files changed, 99 insertions(+), 37

Re: [PATCH] xfstests btrfs/314: test send / receive

2013-06-06 Thread Josef Bacik
quick +314 auto rw metadata -- 1.7.2.2 It applys and runs fine with fssum and exits cleanly if it's not there. The test itself looks sane, so Reviewed-by: Josef Bacik jba...@fusionio.com Thanks, Josef -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: btrfsck: free-space-cache.c:813: btrfs_add_free_space: Assertion `!(ret == -17)' failed

2013-06-06 Thread Josef Bacik
On Thu, Jun 06, 2013 at 07:00:50PM -0600, Andrea Gelmini wrote: Hi everybody, and thanks a lot for your support and work. I've an external hard drive formatted with BTRFS that sometimes goes readonly (no complains in logs or dmesg output). It happens with kernel v9.4 and latest

Re: [PATCH v4 5/8] Btrfs: fill UUID tree initially

2013-06-07 Thread Josef Bacik
On Fri, Jun 07, 2013 at 04:27:50AM -0600, Stefan Behrens wrote: When the UUID tree is initially created, a task is spawned that walks through the root tree. For each found subvolume root_item, the uuid and received_uuid entries in the UUID tree are added. This is such a quick operation so that

Re: [PATCH v4 6/8] Btrfs: introduce uuid-tree-gen field

2013-06-07 Thread Josef Bacik
On Fri, Jun 07, 2013 at 04:27:51AM -0600, Stefan Behrens wrote: In order to be able to detect the case that a filesystem is mounted with an old kernel, add a uuid-tree-gen field like the free space cache is doing it. It is part of the super block and written with each commit. Old kernels do

Re: [PATCH v4 6/8] Btrfs: introduce uuid-tree-gen field

2013-06-07 Thread Josef Bacik
On Fri, Jun 07, 2013 at 08:41:52AM -0600, Stefan Behrens wrote: On 06/07/2013 16:39, Josef Bacik wrote: On Fri, Jun 07, 2013 at 04:27:51AM -0600, Stefan Behrens wrote: In order to be able to detect the case that a filesystem is mounted with an old kernel, add a uuid-tree-gen field like

[PATCH] Btrfs: free csums when we're done scrubbing an extent

2013-06-10 Thread Josef Bacik
we're done with the extent we've scrubbed. The user reported this to fix their problem. Thanks, Reported-and-tested-by: Remco Hosman re...@hosman.xs4all.nl Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/scrub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/scrub.c b

Re: Stale NFS file handle after power loss

2013-06-10 Thread Josef Bacik
On Sat, Jun 08, 2013 at 01:14:35PM -0600, Thomas Koch wrote: Hi, I had a power loss on my btrfs file system during package installation and now I found this: code % ls -l /var/lib/dpkg/tmp.ci ls: cannot access /var/lib/dpkg/tmp.ci/conffiles: Stale NFS file handle ls: cannot access

[PATCH] Btrfs: wake up delayed ref flushing waiters on abort

2013-06-10 Thread Josef Bacik
I hit a deadlock because we aborted when flushing delayed refs but didn't wake any of the other flushers up and so everybody was just sleeping forever. This should fix the problem. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/extent-tree.c |1 + 1 files changed, 1

Re: [PATCH 2/2 v2] btrfs: add framework to read fs info and dev info from the kernel

2013-06-10 Thread Josef Bacik
On Mon, Jun 10, 2013 at 08:59:15AM -0600, Anand Jain wrote: This adds two ioctl BTRFS_IOC_GET_FSIDS and BTRFS_IOC_GET_DEVS which reads the btrfs_fs_devices and btrfs_device structure from the kernel respectively. The information in these structure are useful to report the device/fs

[PATCH] Btrfs: stop waiting on current trans if we aborted

2013-06-10 Thread Josef Bacik
btrfs_abort_transaction() wake up any waiters there may be. All the callers will notice that the transaction has aborted and exit out properly. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/super.c |3 +++ fs/btrfs/transaction.c | 12 2 files changed, 11

Re: [PATCH 2/2 v2] btrfs: add framework to read fs info and dev info from the kernel

2013-06-11 Thread Josef Bacik
On Tue, Jun 11, 2013 at 07:10:12AM -0600, anand jain wrote: On 06/11/2013 03:40 AM, Josef Bacik wrote: On Mon, Jun 10, 2013 at 08:59:15AM -0600, Anand Jain wrote: This adds two ioctl BTRFS_IOC_GET_FSIDS and BTRFS_IOC_GET_DEVS which reads the btrfs_fs_devices and btrfs_device structure

Re: [PATCH 2/2 v2] btrfs: add framework to read fs info and dev info from the kernel

2013-06-11 Thread Josef Bacik
On Mon, Jun 10, 2013 at 08:59:15AM -0600, Anand Jain wrote: This adds two ioctl BTRFS_IOC_GET_FSIDS and BTRFS_IOC_GET_DEVS which reads the btrfs_fs_devices and btrfs_device structure from the kernel respectively. The information in these structure are useful to report the device/fs

[PATCH] Btrfs: fix transaction throttling for delayed refs

2013-06-12 Thread Josef Bacik
of delayed refs that we have instead of how much reserved space is left in the global reserve. With this patch we not only stop aborting transactions but we also get a smoother run speed with fs_mark and it makes us about 10% faster. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs

Re: [PATCH 0/4] btrfs: offline dedupe v2

2013-06-12 Thread Josef Bacik
during file writes, but after the fact when some userspace software initiates a dedupe. The primary patch is loosely based off of one sent by Josef Bacik back in January, 2011. http://permalink.gmane.org/gmane.comp.file-systems.btrfs/8508 I've made significant updates and changes from

[PATCH] Btrfs: cleanup backref search commit root flag stuff

2013-06-12 Thread Josef Bacik
to __resolve_indirect_refs which will have the search_commit_root flag set properly already and that way we can avoid allocating another path when we have a perfectly good one to use. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/backref.c | 41

Re: Kernel bug at fs/btrfs/inode.c:906

2013-06-13 Thread Josef Bacik
On Wed, Jun 12, 2013 at 05:51:20AM -0600, Frederik Himpe wrote: I just encoutered this btrfs bug. When this happened, I was compiling stuff in a qemu/kvm virtual machine running as guest on this host, so this might be related. The guest hard disk image is a qcow2 file which has the NO_COW

[PATCH] Btrfs: fix not being able to find skinny extents during relocate

2013-06-13 Thread Josef Bacik
system with skinny extents. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/relocation.c | 35 +++ 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 6162d90..df3c632 100644 --- a/fs

Re: Stale NFS file handle after power loss

2013-06-13 Thread Josef Bacik
On Thu, Jun 13, 2013 at 01:45:29PM -0600, Thomas Koch wrote: Thomas Koch: On Monday, June 10, 2013 09:00:47 AM Josef Bacik wrote: On Sat, Jun 08, 2013 at 01:14:35PM -0600, Thomas Koch wrote: Hi, I had a power loss on my btrfs file system during package installation and now I

Re: [PATCH V3] Btrfs: remove btrfs_sector_sum structure

2013-06-14 Thread Josef Bacik
On Mon, May 06, 2013 at 04:17:24AM -0600, Miao Xie wrote: Using the structure btrfs_sector_sum to keep the checksum value is unnecessary, because the extents that btrfs_sector_sum points to are continuous, we can find out the expected checksums by btrfs_ordered_sum's bytenr and the offset, so

Re: [PATCH] Btrfs: fix the comment typo for btrfs_attach_transaction_barrier

2013-06-14 Thread Josef Bacik
On Fri, Jun 14, 2013 at 02:21:24AM -0600, Wang Sheng-Hui wrote: The comment is for btrfs_attach_transaction_barrier, not for btrfs_attach_transaction. Fix the typo. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] Btrfs-progs: commit the csum_root if we do --init-csum-tree

2013-06-14 Thread Josef Bacik
will not match the node which will make the file system unmountable. Fix this by calling with the csum_root which is the one we're messing with. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- cmds-check.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cmds-check.c

[PATCH] Btrfs: unlock extent range on enospc in compressed submit

2013-06-14 Thread Josef Bacik
because we immediately try to lock that range again to do the cow, which will cause a deadlock. Fix this by unlocking the range. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/inode.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/btrfs

[PATCH] Btrfs: optimize read_block_for_search

2013-06-17 Thread Josef Bacik
(). This will keep us from doing yet another radix tree lookup for a buffer we've already found. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.c | 47 --- 1 files changed, 20 insertions(+), 27 deletions(-) diff --git a/fs/btrfs

[PATCH] Btrfs: optimize reada_for_balance

2013-06-17 Thread Josef Bacik
so if the blocks need to be waited on it will be done there. Secondly we no longer drop the path if we do readahead, we just set the path blocking before we call reada_for_balance() and then we're good to go. Hopefully this will cut down on the number of re-searches. Thanks, Signed-off-by: Josef

[PATCH] Btrfs: move btrfs_truncate_page to btrfs_cont_expand instead of btrfs_truncate

2013-06-17 Thread Josef Bacik
/083 failing to mount because of the orphan cleanup failing. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/inode.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3dbfee9..ecf8b5b 100644 --- a/fs

Re: Filesystem somewhat destroyed - need help for recovery/fixing

2013-06-17 Thread Josef Bacik
On Mon, Jun 17, 2013 at 09:08:26PM +, Alexander Skwar wrote: Hello I think, I somewhat destroyed my btrfs filesystem on my Ubuntu 13.04 kernel 3.8.0-25-lowlatency system. It got destroyed, because the system was hanging for some other reason and I had to remove power... When I try

Re: [PATCH] Btrfs: fix wrong csum clone when doing relocation

2013-06-18 Thread Josef Bacik
On Tue, Jun 18, 2013 at 11:13:37AM +0800, Miao Xie wrote: From: Josef Bacik jba...@fusionio.com Patch Btrfs: remove btrfs_sector_sum structure introduced a problem that we copied the checksum value to the wrong address when doing relocation. The reason is: It is very likely that one

Re: hang on 3.9, 3.10-rc5

2013-06-18 Thread Josef Bacik
On Tue, Jun 11, 2013 at 11:43:30AM -0400, Sage Weil wrote: I'm also seeing this hang regularly with both 3.9 and 3.10-rc5. Is this is a known problem? In this case there is no powercycling; just a regular ceph-osd workload. Have you gotten sysrq+w? Can you tell me where

[PATCH] Btrfs: move btrfs_truncate_page to btrfs_cont_expand instead of btrfs_truncate V2

2013-06-18 Thread Josef Bacik
/083 failing to mount because of the orphan cleanup failing. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- V1-V2: -we need to call btrfs_truncate_page in fallocate() -we need to zero the page in readpage endio fs/btrfs/extent_io.c | 11 ++- fs/btrfs/file.c | 21

[PATCH] Btrfs: check for actual acls rather than just xattrs when caching no acl

2013-06-19 Thread Josef Bacik
and check for the actual acl hash on the key and if it isn't there then we still get to cache no acl which makes everybody who uses selinux a little happier. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/inode.c | 18 -- 1 files changed, 16 insertions(+), 2

[PATCH] Btrfs: use a percpu to keep track of possibly pinned bytes

2013-06-19 Thread Josef Bacik
will actually free up by committing this transaction. With this patch we now pass xfstests 226. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.h | 12 ++ fs/btrfs/extent-tree.c | 58 +++ 2 files changed, 65

Re: [PATCH 4/4] Btrfs-progs: exhance btrfs-image to restore image onto multiple disks

2013-06-20 Thread Josef Bacik
On Thu, Jun 20, 2013 at 08:05:30PM +0800, Liu Bo wrote: This adds a 'btrfs-image -m' option, which let us restore an image that is built from a btrfs of multiple disks onto several disks altogether. This aims to address the following case, $ mkfs.btrfs -m raid0 sda sdb $ btrfs-image sda

Re: [PATCH 4/4] Btrfs-progs: exhance btrfs-image to restore image onto multiple disks

2013-06-20 Thread Josef Bacik
On Thu, Jun 20, 2013 at 08:24:32AM -0400, Josef Bacik wrote: On Thu, Jun 20, 2013 at 08:05:30PM +0800, Liu Bo wrote: This adds a 'btrfs-image -m' option, which let us restore an image that is built from a btrfs of multiple disks onto several disks altogether. This aims to address

[PATCH] Btrfs: stop using try_to_writeback_inodes_sb_nr to flush delalloc

2013-06-20 Thread Josef Bacik
the writeback underway check so that we are sure to actually have flushed some dirty pages out and will have ordered extents to use. With this patch xfstests generic/273 now passes. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/extent-tree.c |9 - 1 files changed

Re: [PATCH] Btrfs: use a percpu to keep track of possibly pinned bytes

2013-06-20 Thread Josef Bacik
On Thu, Jun 20, 2013 at 09:26:15AM -0700, Zach Brown wrote: @@ -3380,6 +3382,10 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags, if (!found) return -ENOMEM; + ret = percpu_counter_init(found-total_bytes_pinned, 0); + if (ret) +

[PATCH] xfstests: make fs for 274 larger

2013-06-21 Thread Josef Bacik
normal metadata/data seperation and allows us to pass this test. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- tests/generic/274 |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/generic/274 b/tests/generic/274 index da45fab..7c4887f 100755 --- a/tests

[PATCH] Btrfs: check if we can nocow if we don't have data space

2013-06-21 Thread Josef Bacik
pass xfstests generic/274. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.h |4 ++ fs/btrfs/extent-tree.c |1 + fs/btrfs/extent_io.c |3 + fs/btrfs/extent_io.h |1 + fs/btrfs/file.c| 125 +++ fs

Re: [PATCH] xfstests: make fs for 274 larger

2013-06-24 Thread Josef Bacik
On Fri, Jun 21, 2013 at 04:53:54PM -0500, Eric Sandeen wrote: On 6/21/13 3:30 PM, Josef Bacik wrote: Btrfs will default to mixed block groups for 1 gigabyte file systems and smaller, which means data and metadata share the same area. This makes generic/274 fail for us because we cannot

[PATCH] xfstests: fix btrfs/265 so it actually works

2013-06-24 Thread Josef Bacik
this test now passes for me. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- common/rc | 11 --- tests/btrfs/265 | 30 -- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/common/rc b/common/rc index fe6bbfc..ad7cbc9 100644

Re: WARNING: at fs/btrfs/backref.c:903

2013-06-24 Thread Josef Bacik
On Mon, Jun 24, 2013 at 02:22:30PM +0200, Martin Mailand wrote: Hi, I tried 3.10.0-rc7 with the btrfs option skinny extents (btrfstune -x), I get this warning after a few seconds of ceph workload. Can you file a bug at bugzilla.kernel.org and make sure the component is set to btrfs. Also

Re: Btrfs lockup during defrag and removing device

2013-06-24 Thread Josef Bacik
On Mon, Jun 24, 2013 at 12:25:07PM +0200, Ondřej Kunc wrote: Hi developers, I have been playing with btrfs on our test server. I have streessed it much ... and I can say ... it's troughput and features are very nice and usable, but I experienced one problem during testing, btrfs triggered

Re: btrfs send/receive issues

2013-06-24 Thread Josef Bacik
On Sun, Jun 23, 2013 at 11:41:33PM +0100, Miguel Negrão wrote: Hi, I want to do a backup of a btrfs subvolume from one disk to another disk, both with btrfs filesystems, using the btrfs send receive functionality. I do cd /media/miguel/btrfs_backup/ mkdir backups sudo btrfs send

Re: question about transaction-abort-related commits

2013-06-24 Thread Josef Bacik
On Sun, Jun 23, 2013 at 09:52:14PM +0300, Alex Lyakas wrote: Hello Josef, Liu, I am reviewing commits in the mainline tree: e4a2bcaca9643e7430207810653222fc5187f2be Btrfs: if we aren't committing just end the transaction if we error out (call end_transaction() instead of goto

Re: help: btrfs bad tree block start

2013-06-24 Thread Josef Bacik
On Sun, Jun 23, 2013 at 05:33:59AM +0200, Andrea Gelmini wrote: Hi everybody, and thanks a lot for your work. I have this problem. With latest 3.9 kernel and btrfs-next I was close to full my home. The system went read only mode while I was copying in some files.

Re: [PATCH 2/2 v3] btrfs: obtain used_bytes in BTRFS_IOC_FS_INFO ioctl

2013-06-24 Thread Josef Bacik
On Fri, Jun 21, 2013 at 03:32:28PM +0800, Anand Jain wrote: btrfs-progs has to read fs info from the kernel to read the latest info instead of reading it from the disks, which generally is a stale info after certain critical operation. getting used_bytes parameter will help to fix

Re: [PATCH] Btrfs: fix crash regarding to ulist_add_merge

2013-06-26 Thread Josef Bacik
On Wed, Jun 26, 2013 at 12:02:51PM +0800, Liu Bo wrote: Several users reported this crash of NULL pointer or general protection, the story is that we add a rbtree for speedup ulist iteration, and we use krealloc() to address ulist growth, and krealloc() use memcpy to copy old data to new

[PATCH] xfstests: check if the scratch dev pool is mounted in _require_scratch

2013-06-26 Thread Josef Bacik
and unmount it so we can run our test. This fixes the issue I was seeing by running ./check btrfs/307 generic/015 Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- common/rc | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/common/rc b/common/rc index

Re: [BULK] Re: [PATCH] xfstests: unmount scratch mnt in test 307

2013-06-26 Thread Josef Bacik
On Fri, May 03, 2013 at 07:27:21PM -0400, Dave Chinner wrote: On Fri, May 03, 2013 at 03:15:01PM -0500, Eric Sandeen wrote: On 5/3/13 3:11 PM, Josef Bacik wrote: So if you have a mount command that doesn't use /etc/mtab then it will spit out a different device for the mounted device

[PATCH] xfstests: fix btrfs/264 to not use the scratch dev pool

2013-06-26 Thread Josef Bacik
This test doesn't need the scratch dev pool and it also doesn't call _require_scratch_dev_pool, so just kick out the scratch dev pool part of the test. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- tests/btrfs/264 |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [PATCH] xfstests: check if the scratch dev pool is mounted in _require_scratch

2013-06-26 Thread Josef Bacik
On Wed, Jun 26, 2013 at 12:18:04PM -0700, Zach Brown wrote: $SCRATCH_DEV, so anybody who wants to just use the scratch mnt with the scratch dev will fail to work because we never unmount the scratch mount. Yeah, this is annoying. Fix this by checking to see if the scratch dev pool

Re: [PATCH v6 1/8] Btrfs: introduce a tree for items that map UUIDs to something

2013-06-26 Thread Josef Bacik
On Wed, Jun 26, 2013 at 11:47:29PM +0200, Stefan Behrens wrote: On 06/26/2013 21:55, Zach Brown wrote: + if (!uuid_root) { + WARN_ON_ONCE(1); + ret = -ENOENT; + goto out; + } WARN_ON_ONCE specifically returns the condition so that you can write:

[PATCH] xfstests: fix SCRATCH_DEV_POOL mount/umount issues

2013-06-26 Thread Josef Bacik
and unmount it so we can run our test. Also fix scratch_unmount to call umount $SCRATCH_MNT instead of unmount $SCRATCH_DEV so it doesn't screw up with tests that use $SCRATCH_DEV_POOL. This fixes the issue I was seeing by running ./check btrfs/307 generic/015 Thanks, Signed-off-by: Josef Bacik jba

Re: Problem with btrfsck / couurpted filesystem

2013-06-27 Thread Josef Bacik
On Thu, Jun 27, 2013 at 03:54:33PM +0200, Stéphane Mutz wrote: Hello, I'm trying to fix a btrfs file system. BTRFSCK reports errors in the extend tree. I've tryong to use --repair option but it ended up with an assertion failure. I'm also trying to understand how the filesystem can have

Re: Problem with btrfsck / couurpted filesystem

2013-06-27 Thread Josef Bacik
On Thu, Jun 27, 2013 at 04:23:45PM +0200, Stéphane Mutz wrote: Hi, I've built the GIT tools and run btrfsck (without options) following the wiki page. I got the following log: Checking filesystem on /dev/VG_NL-SAS/LV_snap UUID: de300fd0-1251-4767-9d80-84ce7ebfba9a checking extents

[PATCH] Btrfs: cleanup orphaned root orphan item

2013-06-27 Thread Josef Bacik
. With this patch I was able to successfully mount my file system. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/root-tree.c | 31 +-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 723a531

Re: btrfs triggered lockdep WARN.

2013-06-27 Thread Josef Bacik
On Thu, Jun 27, 2013 at 10:58:24AM -0400, Dave Jones wrote: Another bug caused by this script. https://github.com/kernelslacker/io-tests/blob/master/setup.sh WARNING: at kernel/lockdep.c:708 __lock_acquire+0x183b/0x1b70() Modules linked in: sctp lec bridge 8021q garp stp mrp fuse dlci tun

[PATCH] Btrfs: make the chunk allocator completely tree lockless

2013-06-27 Thread Josef Bacik
the transaction commits. This has passed all of the xfstests and my super annoying stress test followed by a balance. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/extent-tree.c | 15 +++- fs/btrfs/transaction.c |9 ++ fs/btrfs/transaction.h |1 + fs/btrfs/volumes.c

  1   2   3   4   5   6   7   8   9   10   >