[PATCH v2] Btrfs: don't ignore errors from btrfs_run_delayed_items

2013-08-05 Thread Filipe David Borba Manana
tree-log.c was ignoring the return value from btrfs_run_delayed_items() in several places. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- V2: Ensure no line exceeds 80 characters. fs/btrfs/tree-log.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff

Re: [PATCH v2] Btrfs: don't ignore errors from btrfs_run_delayed_items

2013-08-05 Thread Miao Xie
On mon, 5 Aug 2013 09:25:47 +0100, Filipe David Borba Manana wrote: tree-log.c was ignoring the return value from btrfs_run_delayed_items() in several places. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- V2: Ensure no line exceeds 80 characters. Looks good to me.

Re: [PATCH v2] btrfs: add mount option to set commit interval

2013-08-05 Thread Mike Audia
 Add the official kernel repo as a remote to the same git repo (with git remote add), fetch that repo, create a new branch to work in, based on the btrfs-next branch, then merge in the other branch (or vice-versa).  Note that btrfs-next is usually based on the latest released kernel

Re: [RFC PATCH v5 4/5] Btrfs: disable qgroups accounting when quota is off

2013-08-05 Thread Jan Schmidt
Nice try hiding this one in a dedup patch set, but I finally found it :-) On Wed, July 31, 2013 at 17:37 (+0200), Liu Bo wrote: So we don't need to do qgroups accounting trick without enabling quota. This reduces my tester's costing time from ~28s to ~23s. Signed-off-by: Liu Bo

Re: [RFC PATCH v5 4/5] Btrfs: disable qgroups accounting when quota is off

2013-08-05 Thread Liu Bo
On Mon, Aug 05, 2013 at 02:34:30PM +0200, Jan Schmidt wrote: Nice try hiding this one in a dedup patch set, but I finally found it :-) A, I didn't mean to ;-) On Wed, July 31, 2013 at 17:37 (+0200), Liu Bo wrote: So we don't need to do qgroups accounting trick without enabling quota.

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

2013-08-05 Thread Josef Bacik
On Thu, Aug 01, 2013 at 05:05:35PM +0300, Alex Lyakas wrote: Hi Josef, On Thu, May 30, 2013 at 11:58 PM, Josef Bacik jba...@fusionio.com wrote: Dave reported a panic because the extent_root-commit_root was NULL in the caching kthread. That is because we just unset it in

Re: [RFC PATCH v5 4/5] Btrfs: disable qgroups accounting when quota is off

2013-08-05 Thread Jan Schmidt
On Mon, August 05, 2013 at 16:18 (+0200), Liu Bo wrote: On Mon, Aug 05, 2013 at 02:34:30PM +0200, Jan Schmidt wrote: Nice try hiding this one in a dedup patch set, but I finally found it :-) A, I didn't mean to ;-) On Wed, July 31, 2013 at 17:37 (+0200), Liu Bo wrote: So we don't

[PATCH] Btrfs: handle errors when doing slow caching

2013-08-05 Thread Josef Bacik
Alex Lyakas reported a bug where wait_block_group_cache_progress() would wait forever if a drive failed. This is because we just bail out if there is an error while trying to cache a block group, we don't update anybody who may be waiting. So this introduces a new enum for the cache state in

[PATCH] Btrfs: return ENOSPC when target space is full

2013-08-05 Thread Filipe David Borba Manana
In extent-tree.c:do_chunk_alloc(), early on we returned 0 (success) when the target space was full and when chunk allocation is needed. However, later on in that same function we return ENOSPC if btrfs_alloc_chunk() fails (and chunk allocation was needed) and set the space's full flag. This was

Re: Recovery advice

2013-08-05 Thread Sandy McArthur
FYI: I ended up wipefs'ing the drive and adding it back in. I also has to abort the residual balance process to get the filesystem back to a state where I could add disk. I didn't realize this until after wiping the drive. Maybe if I'd known to look for that I could have recovered the drive before

Re: Heavy memory leak when using quota groups

2013-08-05 Thread Tomasz Chmielewski
I am trying to use qgroups functionality with a basic random-write workload, it constantly keeps leaking memory within few minutes of IO, there is either out-of-memory killer trying to kill some tasks or there are page-allocation failures that btrfs or other kernel module experiences.

Re: [PATCH 06/11] btrfs-progs: scan /dev/mapper in filesystem show and device scan

2013-08-05 Thread David Sterba
On Mon, Jul 15, 2013 at 01:30:52PM +0800, Anand Jain wrote: This patch adds --mapper option to btrfs device scan and btrfs filesystem show cli, when used will look for btrfs devs under /dev/mapper and will use the links provided under the /dev/mapper. In the long run I want the usage of

Re: [PATCH 00/11 v2 (resend)] btrfs-progs: coalesce of patches

2013-08-05 Thread David Sterba
On Mon, Jul 15, 2013 at 01:30:46PM +0800, Anand Jain wrote: Anand Jain (11): btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments btrfs-progs: label option in btrfs filesystem show is not coded btrfs-progs: update device scan usage btrfs-progs: congregate dev scan

Re: [PATCH v2] btrfs: add mount option to set commit interval

2013-08-05 Thread David Sterba
On Fri, Aug 02, 2013 at 05:12:49PM -0400, Mike Audia wrote: v2: * Stefan pointed out a missing break and that /proc/mounts does not show  the option. * fixed missing goto and extra printk parameter after failed match_int Forgive my naive question: I am using gmx's webclient which

[PATCH] btrfs-progs: fix definition of struct btrfs_extent_inline_ref

2013-08-05 Thread Eric Sandeen
Port kernel commit 1bec1aed to userspace. use __le64 instead of u64 in on-disk structure definition. Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/ctree.h b/ctree.h index 4f602d4..257396d 100644 --- a/ctree.h +++ b/ctree.h @@ -593,7 +593,7 @@ struct btrfs_shared_data_ref {

[PATCH] btrfs-progs: make set/get functions for the super compat_ro flags use compat_ro

2013-08-05 Thread Eric Sandeen
Port of commit 12534832 to userspace: commit 12534832cb7b0abc7369298246e8b7af03b863ca Author: Josef Bacik jo...@redhat.com Date: Thu Dec 17 21:32:27 2009 + Btrfs: make set/get functions for the super compat_ro flags use compat_ro Our set/get functions for compat_ro_flags

Re: [PATCH] Btrfs: race free update of super flags

2013-08-05 Thread Zach Brown
On Sat, Aug 03, 2013 at 07:43:17PM +0100, Filipe David Borba Manana wrote: Before updating the super block's flags, which is a non-atomic operation, grab the super_lock in the fs_info structure. At the moment only 2 different code paths can update these flags in parallel: Hmm. You say the

Re: [PATCH] Btrfs: race free update of super flags

2013-08-05 Thread Filipe David Manana
On Mon, Aug 5, 2013 at 11:10 PM, Zach Brown z...@redhat.com wrote: On Sat, Aug 03, 2013 at 07:43:17PM +0100, Filipe David Borba Manana wrote: Before updating the super block's flags, which is a non-atomic operation, grab the super_lock in the fs_info structure. At the moment only 2 different

Re: [PATCH] Btrfs: race free update of super flags

2013-08-05 Thread Zach Brown
I guess got confused, must have thought both referred to root-fs_info-super_copy. No worries. I honestly wasn't sure if I was just missing something :) - z (you are in a maze of twisty little super blocks, all alike) -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in

Re: Heavy memory leak when using quota groups

2013-08-05 Thread Wang Shilong
Hello. I am trying to use qgroups functionality with a basic random-write workload, it constantly keeps leaking memory within few minutes of IO, there is either out-of-memory killer trying to kill some tasks or there are page-allocation failures that btrfs or other kernel module

Re: [PATCH 2/2] btrfs-progs: Update the man page of btrfs

2013-08-05 Thread David Sterba
On Tue, Jul 23, 2013 at 10:43:22AM +0800, Qu Wenruo wrote: Update the man page of btrfs command to keep up with new commands. Thanks. Please check if I haven't missed anything, I've used 'wiggle' to guess-apply the patch and fixed a few conflicts myself. david -- To unsubscribe from this list:

Re: [PATCH] btrfs-progs: mkfs.btrfs documentation: clarify current restrictions of sectorsize, nodesize and leafsize

2013-08-05 Thread David Sterba
On Thu, Jul 11, 2013 at 10:56:17PM +0200, Koen De Wit wrote: Commit 8d082fb727ac11930ea20bf1612e334ea7c2b697 (Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE) requires the sectorsize to be equal to the pagesize for the filesystem to be mountable. The nodesize and leafsize

Re: [RFC PATCH v5 4/5] Btrfs: disable qgroups accounting when quota is off

2013-08-05 Thread Liu Bo
On Mon, Aug 05, 2013 at 05:10:58PM +0200, Jan Schmidt wrote: On Mon, August 05, 2013 at 16:18 (+0200), Liu Bo wrote: On Mon, Aug 05, 2013 at 02:34:30PM +0200, Jan Schmidt wrote: Nice try hiding this one in a dedup patch set, but I finally found it :-) A, I didn't mean to ;-)

[PATCH] Btrfs: pass gfp_t to __add_prelim_ref() to avoid always using GFP_ATOMIC

2013-08-05 Thread Wang Shilong
Currently, only add_delayed_refs have to allocate with GFP_ATOMIC, So just pass arg 'gfp_t' to decide which allocation mode. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/backref.c | 30 +++--- 1 file

[PATCH] btrfs-progs: don't overrun answer array in cmds-chunk.c

2013-08-05 Thread Eric Sandeen
If an array is 5 chars in size: char answer[5]; and we write the 6th char (counting from 0)... answer[5] = '\0'; we get problems: cmds-chunk.c: In function 'ask_user.clone.0': cmds-chunk.c:1343: warning: array subscript is above array bounds Fix it... Signed-off-by: Eric

Re: Heavy memory leak when using quota groups

2013-08-05 Thread Tomasz Chmielewski
On Tue, 6 Aug 2013 07:29:03 +0800 Wang Shilong wangshilong1...@gmail.com wrote: Hello. I am trying to use qgroups functionality with a basic random-write workload, it constantly keeps leaking memory within few minutes of IO, there is either out-of-memory killer trying to kill some

Re: [PATCH] btrfs-progs: don't overrun answer array in cmds-chunk.c

2013-08-05 Thread Miao Xie
On mon, 05 Aug 2013 21:52:57 -0500, Eric Sandeen wrote: If an array is 5 chars in size: char answer[5]; and we write the 6th char (counting from 0)... answer[5] = '\0'; we get problems: cmds-chunk.c: In function 'ask_user.clone.0': cmds-chunk.c:1343: warning:

Re: [PATCH] btrfs-progs: don't overrun answer array in cmds-chunk.c

2013-08-05 Thread Zach Brown
On Mon, Aug 05, 2013 at 09:52:57PM -0500, Eric Sandeen wrote: If an array is 5 chars in size: char answer[5]; and we write the 6th char (counting from 0)... answer[5] = '\0'; *high fives* - answer[5] = '\0'; + answer[4] = '\0'; I went to see which way of

Re: [PATCH] btrfs-progs: don't overrun answer array in cmds-chunk.c

2013-08-05 Thread Eric Sandeen
On 8/5/13 10:57 PM, Zach Brown wrote: On Mon, Aug 05, 2013 at 09:52:57PM -0500, Eric Sandeen wrote: If an array is 5 chars in size: char answer[5]; and we write the 6th char (counting from 0)... answer[5] = '\0'; *high fives* -answer[5] = '\0'; +answer[4] =

btrfs mounts as read-only

2013-08-05 Thread Sobhan Mohammadpour
yesterday btrfs was complaining about empty space so i booted into a livecd removed some pkgmanager cache and some snapshots and rebooted but while rebooting the init couldn't unmount the filesystem (it tried for some minutes) so it just ignored it now when i boot i get

Re: Heavy memory leak when using quota groups

2013-08-05 Thread Arne Jansen
On 05.08.2013 18:35, Tomasz Chmielewski wrote: I am trying to use qgroups functionality with a basic random-write workload, it constantly keeps leaking memory within few minutes of IO, there is either out-of-memory killer trying to kill some tasks or there are page-allocation failures that

Re: [PATCH] btrfs-progs: don't overrun answer array in cmds-chunk.c

2013-08-05 Thread Miao Xie
On Mon, 5 Aug 2013 20:57:57 -0700, Zach Brown wrote: On Mon, Aug 05, 2013 at 09:52:57PM -0500, Eric Sandeen wrote: If an array is 5 chars in size: char answer[5]; and we write the 6th char (counting from 0)... answer[5] = '\0'; *high fives* -answer[5] = '\0'; +