Re: BTRFS volume crashes after hard reset

2013-11-04 Thread Hugo Mills
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Nov 04, 2013 at 07:39:04AM +0100, Michael Eitelwein wrote: Hi Doing a btrfsck and then mounting with -o recovery finally worked. All seems well again. You should upgrade your kernel, too. 3.2 has a large number of known bugs --

Re: [PATCH] Btrfs: avoid heavy operations in btrfs_commit_super

2013-11-04 Thread Stefan Behrens
On Sun, 3 Nov 2013 23:24:34 +0800, Liu Bo wrote: The 'git blame' history shows that, the old transaction commit code has to do twice to ensure roots are updated and we have to flush metadata and super block manually, however, right now all of these can be handled well inside the transaction

Re: [PATCH] Btrfs: avoid heavy operations in btrfs_commit_super

2013-11-04 Thread Liu Bo
On Mon, Nov 04, 2013 at 09:49:59AM +0100, Stefan Behrens wrote: On Sun, 3 Nov 2013 23:24:34 +0800, Liu Bo wrote: The 'git blame' history shows that, the old transaction commit code has to do twice to ensure roots are updated and we have to flush metadata and super block manually,

Re: btrfs send/receive do not keep inode ctimes

2013-11-04 Thread Karl Kiniger
Hi Jan + list On Fri 131101, Jan Schmidt wrote: Hi Karl, On Fri, October 25, 2013 at 15:12 (+0200), Karl Kiniger wrote: is there low level support to change inode ctimes somehow? (on ext[234] it can be done using debugfs) No. Yes :-), offline only of course It would be nice to

Re: BTRFS volume crashes after hard reset

2013-11-04 Thread Michael Eitelwein
The crash actually happened on kernel 3.8 (Ubuntu 13.04) but I had to fall back to a Ubuntu 12.04 LTS with kernel 3.2 to get it fixed. Hope that Ubuntu back-ports btrfs bug-fixes into their LTS kernel - do they? Michael Am 4. November 2013 09:29:53 schrieb Hugo Mills h...@carfax.org.uk:

Re: [PATCH v6] Btrfs: fix memory leak of orphan block rsv

2013-11-04 Thread Alex Lyakas
Hi Filipe, any luck with this patch?:) Alex. On Wed, Oct 23, 2013 at 5:26 PM, Filipe David Manana fdman...@gmail.com wrote: On Wed, Oct 23, 2013 at 3:14 PM, Alex Lyakas alex.bt...@zadarastorage.com wrote: Hello, On Wed, Oct 23, 2013 at 4:35 PM, Filipe David Manana fdman...@gmail.com

Re: BTRFS volume crashes after hard reset

2013-11-04 Thread David Taylor
On Mon, 04 Nov 2013, Michael Eitelwein wrote: Am 4. November 2013 09:29:53 schrieb Hugo Mills h...@carfax.org.uk: You should upgrade your kernel, too. 3.2 has a large number of known bugs -- including the one you've just met here -- which have been fixed in later versions. Some of those

[PATCH] FS: BTRFS: fixed coding style issues

2013-11-04 Thread Aldo Iljazi
Fixed three coding style issues. Replaced spaces with tabs. Signed-off-by: Aldo Iljazi m...@aldo.io --- fs/btrfs/dev-replace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 9efb94e..b2fe609 100644 ---

[PATCH] FS: BTRFS: fixed a styling issue

2013-11-04 Thread Aldo Iljazi
Line 363: Added a space before the open parenthesis. Signed-off-by: Aldo Iljazi m...@aldo.io --- fs/btrfs/compression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 6aad98c..91338d2 100644 --- a/fs/btrfs/compression.c

[PATCH 3/7] Btrfs: pick up the code for the item number calculation in flush_space()

2013-11-04 Thread Miao Xie
This patch picked up the code that was used to calculate the number of the items for which we need reserve space, and we will use it in the next patch. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/extent-tree.c | 25 - 1 file changed, 16 insertions(+), 9

[PATCH 0/7] Btrfs: improve the latency of the space reservation

2013-11-04 Thread Miao Xie
This patchset improve the latency of the space reservation when doing the delalloc inode flush. As we know, the current code would wait for the completion all the ordered extents in the filesystem. It was unnecessary, we can finish the wait and try to do reservation once again earlier if we get

[PATCH 6/7] Btrfs: don't wait for the completion of all the ordered extents

2013-11-04 Thread Miao Xie
It is very likely that there are lots of ordered extents in the filesytem, if we wait for the completion of all of them when we want to reclaim some space for the metadata space reservation, we would be blocked for a long time. The performance would drop down suddenly for a long time.

[PATCH 2/7] Btrfs: wait for the ordered extent only when we want

2013-11-04 Thread Miao Xie
Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/extent-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index abe65ed..ed6eceb 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4029,7 +4029,8

[PATCH 7/7] Btrfs: rename btrfs_start_all_delalloc_inodes

2013-11-04 Thread Miao Xie
rename the function -- btrfs_start_all_delalloc_inodes(), and make its name be compatible to btrfs_wait_ordered_roots(), since they are always used at the same place. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/ctree.h | 3 +-- fs/btrfs/dev-replace.c | 2 +-

Re: [PATCH 0/7] Btrfs: improve the latency of the space reservation

2013-11-04 Thread Josef Bacik
On Mon, Nov 04, 2013 at 11:13:19PM +0800, Miao Xie wrote: This patchset improve the latency of the space reservation when doing the delalloc inode flush. As we know, the current code would wait for the completion all the ordered extents in the filesystem. It was unnecessary, we can finish the

Re: [PATCH 7/7] Btrfs: rename btrfs_start_all_delalloc_inodes

2013-11-04 Thread Josef Bacik
On Mon, Nov 04, 2013 at 11:13:26PM +0800, Miao Xie wrote: rename the function -- btrfs_start_all_delalloc_inodes(), and make its name be compatible to btrfs_wait_ordered_roots(), since they are always used at the same place. Signed-off-by: Miao Xie mi...@cn.fujitsu.com ---

Re: [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951)

2013-11-04 Thread Josef Bacik
On Thu, Oct 24, 2013 at 03:22:06PM +0200, Jan Schmidt wrote: btrfs_dec_ref() queued a delayed ref for owner of a tree block. The qgroup tracking is based on delayed refs. The owner of a tree block is set when a tree block is allocated, it is never updated. When you allocate a tree block and

Re: btrfsck errors is it save to fix?

2013-11-04 Thread Hendrik Friedel
Hello, the list was quite full with patches, so this might have been hidden. Here the complete Stack. Does this help? Is this what you needed? Greetings, Hendrik sorry about that: [ 126.444603] init: plymouth-stop pre-start process (3446) terminated with status 1 [11189.299864] hda-intel:

[PATCH 6/9] btrfs: remove unused variable from setup_cluster_no_bitmap

2013-11-04 Thread Valentina Giusti
The variable window_start in setup_cluster_no_bitmap is not used since commit 1bb91902dc90e25449893e693ad45605cb08fbe5 (Btrfs: revamp clustered allocation logic) Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/free-space-cache.c |2 -- 1 file changed, 2 deletions(-)

[PATCH 7/9] btrfs: remove unused variable from scrub_fixup_nodatasum

2013-11-04 Thread Valentina Giusti
Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/scrub.c |2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index a18e0e2..84139c6 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -705,13 +705,11 @@ static void

[PATCH 1/9] btrfs: remove unused variable from btrfs_search_forward

2013-11-04 Thread Valentina Giusti
The variable blockptr in btrfs_search_forward is not used since commit de78b51a2852bddccd6535e9e12de65f92787a1e (btrfs: remove cache only arguments from defrag path) Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/ctree.c |2 -- 1 file changed, 2 deletions(-) diff

[PATCH 9/9] btrfs: fix unused variables in qgroup.c

2013-11-04 Thread Valentina Giusti
Use otherwise unused local variables slot in update_qgroup_limit_item and in update_qgroup_info_item, and remove unused variable ins from btrfs_qgroup_account_ref. Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/qgroup.c | 11 ++- 1 file changed, 2

[PATCH 8/9] btrfs: replace path-slots[0] with otherwise unused variable 'slot'

2013-11-04 Thread Valentina Giusti
Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/backref.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 0552a59..5418435 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1681,8 +1681,8

[PATCH 2/9] btrfs: remove unused variable from btrfs_new_inode

2013-11-04 Thread Valentina Giusti
Variable owner in btrfs_new_inode is unused since commit d82a6f1d7e8b61ed5996334d0db66651bb43641d (Btrfs: kill BTRFS_I(inode)-block_group) Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/inode.c |6 -- 1 file changed, 6 deletions(-) diff --git a/fs/btrfs/inode.c

[PATCH 3/9] btrfs: remove unused variables from disk-io.c

2013-11-04 Thread Valentina Giusti
Remove unused variables: * tree from csum_dirty_buffer, * tree from btree_readpage_end_io_hook, * tree from btree_writepages, * bytenr from btrfs_create_tree, * fs_info from end_workqueue_fn. Signed-off-by: Valentina Giusti valentina.giu...@microon.de --- fs/btrfs/disk-io.c | 11 --- 1

OOPS on 3.11.6

2013-11-04 Thread Andy Lutomirski
(This is Fedora's kernel 3.11.6-200.fc19.x86_64) I have a file on my btrfs filesystem. Reading it results in: [ 170.261789] general protection fault: [#1] SMP [ 170.261950] Modules linked in: rfcomm fuse xt_CHECKSUM nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE

[PATCH] Block layer stuff/DIO rewrite prep for 3.14

2013-11-04 Thread Kent Overstreet
Now that immutable biovecs is in, these are the remaining patches required for my DIO rewrite, along with some related cleanup/refactoring. The key enabler is patch 4 - making generic_make_request() handle arbitary sized bios. This takes what was once bio_add_page()'s responsibility and pushes it

[PATCH 2/9] block: submit_bio_wait() conversions

2013-11-04 Thread Kent Overstreet
It was being open coded in a few places. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Joern Engel jo...@logfs.org Cc: Prasad Joshi prasadjoshi.li...@gmail.com --- block/blk-flush.c | 19 +-- fs/logfs/dev_bdev.c | 8 +--- 2 files

[PATCH 9/9] block: Add bio_get_user_pages()

2013-11-04 Thread Kent Overstreet
This replaces some of the code that was in __bio_map_user_iov(), and soon we're going to use this helper in the dio code. Note that this relies on the recent change to make generic_make_request() take arbitrary sized bios - we're not using bio_add_page() here. Signed-off-by: Kent Overstreet

[PATCH 6/9] mtip32xx: handle arbitrary size bios

2013-11-04 Thread Kent Overstreet
We get a measurable performance increase by handling this in the driver when we're already looping over the biovec, instead of handling it separately in generic_make_request() (or bio_add_page() originally) Signed-off-by: Kent Overstreet k...@daterainc.com --- drivers/block/mtip32xx/mtip32xx.c |

[PATCH 8/9] bcache: generic_make_request() handles large bios now

2013-11-04 Thread Kent Overstreet
So we get to delete our hacky workaround. Signed-off-by: Kent Overstreet k...@daterainc.com --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c |

[PATCH 7/9] blk-lib.c: generic_make_request() handles large bios now

2013-11-04 Thread Kent Overstreet
generic_make_request() will now do for us what the code in blk-lib.c was doing manually, with the bio_batch stuff - we still need some looping in case we're trying to discard/zeroout more than around a gigabyte, but when we can submit that much at a time doing the submissions in parallel really

[PATCH 1/9] block: Convert various code to bio_for_each_segment()

2013-11-04 Thread Kent Overstreet
With immutable biovecs we don't want code accessing bi_io_vec directly - the uses this patch changes weren't incorrect since they all own the bio, but it makes the code harder to audit for no good reason - also, this will help with multipage bvecs later. Signed-off-by: Kent Overstreet

[PATCH 3/9] block: Move bouncing to generic_make_request()

2013-11-04 Thread Kent Overstreet
Next patch is going to make generic_make_request() handle arbitrary sized bios by splitting them if necessary. It makes more sense to call blk_queue_bounce() first, partly so it's working on larger bios - but also the code that splits bios, and __blk_recalc_rq_segments(), won't have to take into

[PATCH 4/9] block: Make generic_make_request handle arbitrary sized bios

2013-11-04 Thread Kent Overstreet
The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split. But this approach becomes unwieldy and

Re: [dm-devel] [PATCH 4/9] block: Make generic_make_request handle arbitrary sized bios

2013-11-04 Thread Mike Christie
On 11/04/2013 03:36 PM, Kent Overstreet wrote: @@ -1822,6 +1820,14 @@ void generic_make_request(struct bio *bio) */ blk_queue_bounce(q, bio); + if (!blk_queue_largebios(q)) + split = blk_bio_segment_split(q, bio, q-bio_split);

Re: [dm-devel] [PATCH 4/9] block: Make generic_make_request handle arbitrary sized bios

2013-11-04 Thread Kent Overstreet
On Mon, Nov 04, 2013 at 03:56:52PM -0800, Mike Christie wrote: On 11/04/2013 03:36 PM, Kent Overstreet wrote: @@ -1822,6 +1820,14 @@ void generic_make_request(struct bio *bio) */ blk_queue_bounce(q, bio); + if (!blk_queue_largebios(q)) +

[BUG]:bad unlock balance detected!

2013-11-04 Thread majianpeng
On the mainline linux tree, the head of git is :be408cd3e1fef73e9408b196a7. [ 2372.462131] [ 2372.462147] = [ 2372.462171] [ BUG: bad unlock balance detected! ] [ 2372.462191] 3.12.0+ #32 Tainted: GW [ 2372.462209]

csum failure messages

2013-11-04 Thread Russell Coker
The below messages are from dmesg on a system where btrfs balance just aborted. It's running kernel 3.11.6 (the latest Debian package). This seems to be telling me that Inode 388 is involved, but there are over 300 subvols on that system which could contain such an Inode. I think that more

Re: btrfsck errors is it save to fix?

2013-11-04 Thread cwillu
On Mon, Nov 4, 2013 at 3:14 PM, Hendrik Friedel hend...@friedels.name wrote: Hello, the list was quite full with patches, so this might have been hidden. Here the complete Stack. Does this help? Is this what you needed? [95764.899294] CPU: 1 PID: 21798 Comm: umount Tainted: GFCIO

Re: [BUG]:bad unlock balance detected!

2013-11-04 Thread Liu Bo
Hi, Would you please try the following patch? -liubo From: Liu Bo bo.li@oracle.com Subject: [PATCH] Btrfs: fix to use the right trans for async commit @trans has been freed and is undefined, and we should use the trans handle created for async commit instead. Signed-off-by: Liu Bo

Re: OK to take hourly snapshots, then cull older ones?

2013-11-04 Thread Marc MERLIN
On Sun, Nov 03, 2013 at 12:50:24PM +0100, Matthias G. Eckermann wrote: Hello David and all, On Mon, Oct 14, 2013 at 21:05 David Madden wrote: I'd like to use BTRFS to do something like the old NetApp snapshot system: every hour or so, there'd be a snapshot, then the 23 of the snapshots

Re: [PATCH 7/7] Btrfs: rename btrfs_start_all_delalloc_inodes

2013-11-04 Thread Miao Xie
On mon, 4 Nov 2013 12:09:18 -0500, Josef Bacik wrote: On Mon, Nov 04, 2013 at 11:13:26PM +0800, Miao Xie wrote: rename the function -- btrfs_start_all_delalloc_inodes(), and make its name be compatible to btrfs_wait_ordered_roots(), since they are always used at the same place.

Re: [BUG]:bad unlock balance detected!

2013-11-04 Thread Liu Bo
On Tue, Nov 05, 2013 at 10:31:15AM +0800, Miao Xie wrote: Ontue, 5 Nov 2013 10:12:17 +0800, Liu Bo wrote: Hi, Would you please try the following patch? -liubo From: Liu Bo bo.li@oracle.com Subject: [PATCH] Btrfs: fix to use the right trans for async commit @trans

[PATCH v2 0/3] Bootstrap the btrfs_find_item interface

2013-11-04 Thread Kelley Nielsen
There are many btrfs functions that manually search the tree for an item. They all reimplement the same mechanism and differ in the conditions that they use to find the item. Zach Brown proposed creating a new core interface, btrfs_find_item, take the place of these functions, and standardize the

[PATCH v2 1/3] Bootstrap generic btrfs_find_item interface

2013-11-04 Thread Kelley Nielsen
There are many btrfs functions that manually search the tree for an item. They all reimplement the same mechanism and differ in the conditions that they use to find the item. __inode_info() is one such example. Zach Brown proposed creating a new interface to take the place of these functions.

[PATCH v2 2/3] expand btrfs_find_item() to include find_root_ref functionality

2013-11-04 Thread Kelley Nielsen
This patch is the second step in bootstrapping the btrfs_find_item interface. The btrfs_find_root_ref() is similar to the former __inode_info(); it accepts four of its parameters, and duplicates the first half of its functionality. Replace the one former call to btrfs_find_root_ref() with a call

[PATCH v2 3/3] expand btrfs_find_item() to include find_orphan_item functionality

2013-11-04 Thread Kelley Nielsen
This is the third step in bootstrapping the btrfs_find_item interface. The function find_orphan_item(), in orphan.c, is similar to the two functions already replaced by the new interface. It uses two parameters, which are already present in the interface, and is nearly identical to the function

[PATCH v2] Btrfs: avoid heavy operations in btrfs_commit_super

2013-11-04 Thread Liu Bo
The 'git blame' history shows that, the old transaction commit code has to do twice to ensure roots are updated and we have to flush metadata and super block manually, however, right now all of these can be handled well inside the transaction commit code without extra efforts. And the error

Bootstrap the btrfs_find_item interface

2013-11-04 Thread Kelley Nielsen
Hi Josh, Zach, and team, I went ahead and took the comment out, as can be seen in patch 3/3. I had left it there because my understanding is that this is just a proposal, and if the team likes the idea, btrfs_find_item() will be further developed so that it replace more existing functions and not

Re: csum failure messages

2013-11-04 Thread Hans-Kristian Bakke
As you were in the process of a rebalance these errors may actually be caused by this serious bug Btrfs: relocate csums properly with prealloc extents. I hit that myself with several preallocated files made by rtorrent during a rebalance and I lost several huge files as a consequence. The only

[PATCH] BTRFS: fixed coding style issues

2013-11-04 Thread Aldo Iljazi
Line 4989: Inserted a space after the comma. Lines 7986 and 8274: Inserted a space before the open parenthesis. Signed-off-by: Aldo Iljazi m...@aldo.io --- fs/btrfs/extent-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/extent-tree.c

[PATCH] BTRFS: fixed two coding style issues

2013-11-04 Thread Aldo Iljazi
Line 26 and 31: Replaced spaces with tabs at the start of the lines. Signed-off-by: Aldo Iljazi m...@aldo.io --- fs/btrfs/struct-funcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/struct-funcs.c b/fs/btrfs/struct-funcs.c index b976597..09528ec 100644 ---

[PATCH 2/2] BTRFS: fixed a coding style issue

2013-11-04 Thread Aldo Iljazi
Line 265: Inserted a space before the open parenthesis. Signed-off-by: Aldo Iljazi m...@aldo.io --- fs/btrfs/async-thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 08cc08f..8aec751 100644 ---