Re: [PATCH] btrfs-progs: Add version.h dependency to fix parallel builds

2013-09-17 Thread Rongqing Li
On 09/18/2013 10:26 AM, Eric Sandeen wrote: On 9/17/13 8:56 PM, Eric Sandeen wrote: Change the suffix rule to ensure that version.h is built before we try to create any .o file. Reported-by: Roy Li Signed-off-by: Eric Sandeen --- I dunno, does this work? My gnu make is rusty. I'm actual

[PATCH] xfstests/btrfs: do not test btrfs/010 with autodefrag

2013-09-17 Thread Liu Bo
btrfs/010 is going to create a fragmented file, however, with autodefrag this is impossible, so just skip the test when we're with autodefrag. Signed-off-by: Liu Bo --- tests/btrfs/010 | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tests/btrfs/010 b/tests/bt

Re: [PATCH] Btrfs: allocate the free space by the existed max extent size when ENOSPC

2013-09-17 Thread Miao Xie
On Tue, 17 Sep 2013 15:13:12 +0200, David Sterba wrote: > On Mon, Sep 09, 2013 at 02:21:58PM +0800, Miao Xie wrote: >> On fri, 06 Sep 2013 15:47:08 +0200, Stefan Behrens wrote: >>> This patch makes the xfstest generic/256 lock up. It's quite >>> reliably reproducible on one of my test boxes, and no

Re: [PATCH] btrfs-progs: Add version.h dependency to fix parallel builds

2013-09-17 Thread Eric Sandeen
On 9/17/13 8:56 PM, Eric Sandeen wrote: > Change the suffix rule to ensure that version.h is > built before we try to create any .o file. > > Reported-by: Roy Li > Signed-off-by: Eric Sandeen > --- > > I dunno, does this work? My gnu make is rusty. I'm actually confused by what the makefile

[PATCH] btrfs-progs: Add version.h dependency to fix parallel builds

2013-09-17 Thread Eric Sandeen
Change the suffix rule to ensure that version.h is built before we try to create any .o file. Reported-by: Roy Li Signed-off-by: Eric Sandeen --- I dunno, does this work? My gnu make is rusty. diff --git a/Makefile b/Makefile index 3d715d8..d25054f 100644 --- a/Makefile +++ b/Makefile @@ -10

Re: [PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue

2013-09-17 Thread Rongqing Li
On 09/18/2013 09:51 AM, Eric Sandeen wrote: @echo "[CC] $@" >$(Q)$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(STATIC_CFLAGS) -c $< -o $@ > I think this can be done more cleanly, I'll send a patch. -Eric Thanks, expect your patch -Roy -- Best Reagrds, Roy | RongQing Li -- To uns

[PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue

2013-09-17 Thread Eric Sandeen
On 9/17/13 8:11 PM, rongqing...@windriver.com wrote: > From: Roy Li > > The dependencies of "all: version.h" or other similar ones can not > fix the parallel build failure, only reduce the times; In fact, > many *.o files require version.h file. > > #grep '#include "version.h"' ./ -r >

[PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue

2013-09-17 Thread rongqing.li
From: Roy Li The dependencies of "all: version.h" or other similar ones can not fix the parallel build failure, only reduce the times; In fact, many *.o files require version.h file. #grep '#include "version.h"' ./ -r ./btrfs-corrupt-block.c:#include "version.h" ./btrfs.c

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-17 Thread Mark Fasheh
On Fri, Sep 13, 2013 at 03:33:34PM -0400, Chris Mason wrote: > Mark, could you please send a patch for the whole-struct option until > the unaligned put is upstreamed? > > -chris Here you go. It's been lightly tested and needs review. Thanks, --Mark -- Mark Fasheh From: Mark Fasheh [

Re: rootfs crash

2013-09-17 Thread Clemens Eisserer
Hi Jogi, When I tried to recovered a broken btrfs-parition, I encountered the same errors you did - btrfs restore seems to be a bit broken. What helped was to: a. comment out the free()-calls which led to crashes b. re-run "btrfs restore" to account for the crashes which happen elsewhere, hopeful

[PATCH 3/3] btrfs-progs: separate command ant implementation of chunk-recover code

2013-09-17 Thread David Sterba
The command has been moved and we should rename the files accordingly, so the entry point is now in cmds-rescue.c and the core functionality in it's own file. Return codes of btrfs_recover_chunk_tree have been simplified not to require a define and another file for defintion. CC: Miao Xie Signed

Re: rootfs crash

2013-09-17 Thread Jogi Hofmüller
Hi, Am 2013-09-17 14:24, schrieb Jogi Hofmüller: > Yes, did so. It stopped with an error. I will send the error > message later since it resides on a different machine that I cannot > access from where I am now. This is the promised output of btrfs chunk-recover -y -v /dev/sda3 [ 1090.896935

Re: [RFC v2] btrfs-progs: Add recursive defrag using -r option

2013-09-17 Thread Frank Holton
Thanks for that hint to use ftw. I've updated the code to use it and tried to make sure that I caught all of the styling errors. Since the ftw callback doesn't take any additional options I had to add several global variables to pass the fancy_ioctl and range parameters. Should I replace all of th

[PATCH] Btrfs: iput inode on allocation failure

2013-09-17 Thread Josef Bacik
We don't do the iput when we fail to allocate our delayed delalloc work in __start_delalloc_inodes, fix this. Signed-off-by: Josef Bacik --- fs/btrfs/inode.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 85a4900..7988113 100

[PATCH] btrfs-progs: add list_sort and use it to sort devices by id

2013-09-17 Thread David Sterba
The devices in 'btrfs filesystem show' are now sorted by the device id, currently the order was undefined. Signed-off-by: David Sterba --- Makefile | 2 +- cmds-filesystem.c | 19 ++- list_sort.c | 144 ++ list_sort.h

[PATCH 1/3] btrfs-progs: introduce rescue command group

2013-09-17 Thread David Sterba
Add an empty 1st level command namespace that will collect specialized recovery tools like chunk-recover, zero-log, select-super and similar. Signed-off-by: David Sterba --- Makefile | 2 +- btrfs.c| 1 + cmds-rescue.c | 37 + commands.h |

[PATCH 2/3] btrfs-progs: move chunk-recover to rescue group

2013-09-17 Thread David Sterba
Signed-off-by: David Sterba --- btrfs.c| 1 - cmds-chunk.c | 2 +- cmds-rescue.c | 1 + man/btrfs.8.in | 10 ++ 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/btrfs.c b/btrfs.c index 14a27cb..dfae35f 100644 --- a/btrfs.c +++ b/btrfs.c @@ -248,7 +248,6 @@ sta

[PATCH 0/3] btrfs-progs: Add command group for rescue operations

2013-09-17 Thread David Sterba
David Sterba (3): btrfs-progs: introduce rescue command group btrfs-progs: move chunk-recover to rescue group btrfs-progs: separate command ant implementation of chunk-recover code Makefile|3 +- btrfs.c |2 +- chunk-recover.c | 1745 +

[PATCH] Btrfs: remove space_info->reservation_progress

2013-09-17 Thread Josef Bacik
This isn't used for anything anymore, just remove it. Signed-off-by: Josef Bacik --- fs/btrfs/ctree.h |9 - fs/btrfs/extent-tree.c |3 --- 2 files changed, 0 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 36490b9..0506f40 100644 --- a

[PATCH 2/2] btrfs-progs: add nodiscard option to device add

2013-09-17 Thread David Sterba
Same as for mkfs. Signed-off-by: David Sterba --- cmds-device.c | 34 +- man/btrfs.8.in | 11 +-- utils.c| 2 ++ 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/cmds-device.c b/cmds-device.c index 800a050..12c802e 100644 --- a/cmd

[PATCH] Revert "Btrfs: rework the overcommit logic to be based on the total size"

2013-09-17 Thread Josef Bacik
This reverts commit 70afa3998c9baed4186df38988246de1abdab56d. It is causing performance issues and wasn't actually correct. There were problems with the way we flushed delalloc and that was the real cause of the early enospc. Thanks, Signed-off-by: Josef Bacik --- fs/btrfs/extent-tree.c | 15

[PATCH] Btrfs: kill delay_iput arg to the wait_ordered functions

2013-09-17 Thread Josef Bacik
This is a left over of how we used to wait for ordered extents, which was to grab the inode and then run filemap flush on it. However if we have an ordered extent then we already are holding a ref on the inode, and we just use btrfs_start_ordered_extent anyway, so there is no reason to have an ext

[PATCH 0/2] nodiscard for device add

2013-09-17 Thread David Sterba
David Sterba (2): btrfs-progs: use better name for nodiscard variable and flip the logic btrfs-progs: add nodiscard option to device add cmds-device.c | 34 +- man/btrfs.8.in | 11 +-- mkfs.c | 8 utils.c| 6 -- utils.h

[PATCH] Btrfs: fix worst case calculator for space usage

2013-09-17 Thread Josef Bacik
Forever ago I made the worst case calculator say that we could potentially split into 3 blocks for every level on the way down, which isn't right. If we split we're only going to get two new blocks, the one we originally cow'ed and the new one we're going to split. Thanks, Signed-off-by: Josef B

[PATCH 1/2] btrfs-progs: use better name for nodiscard variable and flip the logic

2013-09-17 Thread David Sterba
Signed-off-by: David Sterba --- mkfs.c | 8 utils.c | 4 ++-- utils.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mkfs.c b/mkfs.c index 3ac00ba..40da546 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1324,7 +1324,7 @@ int main(int ac, char **av) int mixed = 0;

Re: [PATCH] Btrfs: allocate the free space by the existed max extent size when ENOSPC

2013-09-17 Thread David Sterba
On Mon, Sep 09, 2013 at 02:21:58PM +0800, Miao Xie wrote: > On fri, 06 Sep 2013 15:47:08 +0200, Stefan Behrens wrote: > > This patch makes the xfstest generic/256 lock up. It's quite > > reliably reproducible on one of my test boxes, and not at all > > visible on a second test box. > > > > And yes

Re: [RFC] btrfs-progs: Add recursive defrag using -r option

2013-09-17 Thread David Sterba
On Mon, Sep 16, 2013 at 10:21:24PM -0400, Frank Holton wrote: > I'm working on a patch to add the recursive option to the > btrfs filesystem defrag command. Great! > I'd like some feedback on how the patch looks as written. I've added > two helper functions, which might need to be renamed, one t

Re: rootfs crash

2013-09-17 Thread Jogi Hofmüller
Hi, Am 2013-09-17 13:18, schrieb Sander: Jogi Hofmüller wrote (ao): I am fresh out of ideas at the moment, so if anyone has a suggestion I am willing to try. Did you try btrfs chunk-recover ? Yes, did so. It stopped with an error. I will send the error message later since it resides on

Re: rootfs crash

2013-09-17 Thread Sander
Jogi Hofmüller wrote (ao): > I am limited to working with the tools the Debian initramfs > provides. This means kernel 3.10.2 (Debian 3.10.7-1) and > btrfs-tools 0.19+20130705-1. The latter seems to be up to date > with git although `btrfs version` says v0.20 rc1. All this is > happening on an A

Re: rootfs crash

2013-09-17 Thread Jogi Hofmüller
Dear all, After trying all the suggested options from http://permalink.gmane.org/gmane.comp.file-systems.btrfs/27999 I still get no mountable file system :( Trying to mount I get mount -oro,recovery,compress=lzo /dev/sda3 /rootfs [ 906.835314] btrfs: enabling auto recovery [ 906.836977]

Re: [PATCH] Drop unused parameter from btrfs_item_nr

2013-09-17 Thread cwillu
On Mon, Sep 16, 2013 at 8:58 AM, Ross Kirk wrote: > Unused parameter cleanup > > Ross Kirk (1): > btrfs: drop unused parameter from btrfs_item_nr > > fs/btrfs/backref.c|2 +- > fs/btrfs/ctree.c | 34 +- > fs/btrfs/ctree.h | 13 ++---