Re: Heavy memory leak when using quota groups

2013-02-27 Thread Arne Jansen
On 02/15/13 05:34, shyam btrfs wrote: Hi Arne, Yes this addresses the crash during mount. Thanks. But still I have the consistent out-of-memory issue when running random 4K writes with qgroup enabled. I will see if I can get some steps for you to recreate the problem. Can you please try

Re: lvm volume like support

2013-02-27 Thread Martin Steigerwald
Am Mittwoch, 27. Februar 2013 schrieb Roman Mamedov: On Wed, 27 Feb 2013 13:23:23 +1100 Fajar A. Nugraha l...@fajar.net wrote: Not to mention the hassle in accessing the data if it resides on a partition inside the file (e.g. you need losetup + kpartx to access it, and you must remember

Re: lvm volume like support

2013-02-27 Thread Roman Mamedov
On Wed, 27 Feb 2013 09:42:02 +0100 Martin Steigerwald mar...@lichtvoll.de wrote: Are you sure about the partition support? I thought something related to loop partition support has gone into some not so recent kernel. Sorry, you are correct, this was in fact added since 2.6.26. Just tried

Re: lvm volume like support

2013-02-27 Thread Alex Elsayed
Alex Elsayed wrote: Roman Mamedov wrote: On Wed, 27 Feb 2013 13:23:23 +1100 Fajar A. Nugraha l...@fajar.net wrote: snip This could be pretty easily put into a shell script that uses du -b and manually pokes configfs instead of calling tcm_node, and it'd be able to run without any

Re: lvm volume like support

2013-02-27 Thread Alex Elsayed
Alex Elsayed wrote: ...and a second version, because I forgot to actually remove the calls to tcm_node in favor of poking configfs like I said. ---cut--- #!/bin/bash gen_naa() { local UUID=$( uuidgen -r ) UUID=${UUID//-/} UUID=${UUID:0:9} echo naa.6001405${UUID} } setup() {

Re: btrfs crash when low on memory.

2013-02-27 Thread Martin Steigerwald
Am Mittwoch, 27. Februar 2013 schrieb Dave Jones: Something I've yet to repeat managed to leak a whole bunch of memory while I was travelling, and locked up my workstation. When I got home, this was the last thing printed out before it locked up (it did make it into the logs thankfully)

[PATCH 1/2] Btrfs-progs: let the error message outputed only once

2013-02-27 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com If we fail to execute the command: btrfs qgroup show mnt It will output the follow messages: ERROR: can't perform the search - Inappropriate ioctl for device ERROR: can't list qgroups The error is outputed twice, this

[PATCH 2/2] Btrfs-progs: output the error reason when qgroup_show fails

2013-02-27 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com The original code forgot to output the reason why the commands failed, fix it. Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com --- cmds-qgroup.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cmds-qgroup.c

[PATCH 1/3] Btrfs: fix missing deleted items in btrfs_clean_quota_tree

2013-02-27 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com Steps to reproduce: i=0 ncases=100 mkfs.btrfs disk mount disk mnt btrfs quota enable mnt btrfs qgroup create 2/1 mnt while [ $i -le $ncases ] do btrfs qgroup create 1/$i

[PATCH 2/3] Btrfs: return ENOMEM rather than use BUG_ON when btrfs_alloc_path fails

2013-02-27 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com Return ENOMEM rather trigger BUG_ON, fix it. Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com Reviewed-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/qgroup.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git

[PATCH 3/3] Btrfs: remove reduplicate check about root in the function btrfs_clean_quota_tree

2013-02-27 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com The check work has been done just before the function btrfs_clean_quota_tree is called, it is not necessary to check it again, remove it. Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com --- fs/btrfs/qgroup.c |3 --- 1 files changed, 0

Re: [POSSIBLE SPAM] Re: Hybrid Storage proposal

2013-02-27 Thread Zhi Yong Wu
On Tue, Feb 26, 2013 at 9:08 PM, Matias Bjørling m...@itu.dk wrote: On 02/26/2013 12:04 PM, Zhi Yong Wu wrote: HI, It's a bit long so that i haven't read its whole, but i want to know if it has any collision with my ongoing feature btrfs hot relocation/migration? It will utilize the hot

Re: [PATCH] btrfs: cleanup for open-coded alignment

2013-02-27 Thread David Sterba
On Tue, Feb 26, 2013 at 04:10:22PM +0800, Qu Wenruo wrote: Though most of the btrfs codes are using ALIGN macro for page alignment, there are still some codes using open-coded alignment like the following: -- u64 mask = ((u64)root-stripesize - 1); u64 ret = (val + mask)

Re: [PATCH 16/17] btrfs-progs: fix fd leak in cmd_subvol_set_default

2013-02-27 Thread David Sterba
On Tue, Feb 26, 2013 at 10:04:04PM +0100, Goffredo Baroncelli wrote: On 02/26/2013 09:10 PM, Eric Sandeen wrote: IMHO this would be simple enough to be done in one shot. However this problem exists also in other points. May be that for now your patch is ok. But then we should start another

Re: [PATCH 14/17] btrfs-progs: fix mem leak in resolve_root

2013-02-27 Thread David Sterba
On Mon, Feb 25, 2013 at 10:36:41PM -0600, Eric Sandeen wrote: On 2/25/13 6:36 PM, Shilong Wang wrote: --- a/btrfs-list.c +++ b/btrfs-list.c @@ -568,8 +568,10 @@ static int resolve_root(struct root_lookup *rl, struct root_info *ri, * ref_tree = 0 indicates the subvolumes

Re: Writing a wtapper for BTRFS

2013-02-27 Thread Hugo Mills
On Wed, Feb 27, 2013 at 01:53:17PM +0100, pen...@gmx.com wrote: where can I find some documentation that will help me in writing language bindings for BTRFS? You may want to look at the btrfs-progs libify patches (posted to this list in the last couple of months), which try to pull out the

Re: [PATCH 14/17] btrfs-progs: fix mem leak in resolve_root

2013-02-27 Thread Shilong Wang
Hello, Eric, David 2013/2/27 David Sterba dste...@suse.cz: On Mon, Feb 25, 2013 at 10:36:41PM -0600, Eric Sandeen wrote: On 2/25/13 6:36 PM, Shilong Wang wrote: --- a/btrfs-list.c +++ b/btrfs-list.c @@ -568,8 +568,10 @@ static int resolve_root(struct root_lookup *rl, struct root_info

Re: Running Apache Derby on 3.8 and BTRFS cause kernel oops

2013-02-27 Thread Josef Bacik
On Wed, Feb 27, 2013 at 06:20:16AM -0700, Daniel Kozák wrote: Hello, On my both machine I have ArchLinux with recent kernel 3.8.0 btrfs as a filesystem (with lzo compression). When I try use Apache derby (create database), I almost every time get this kernel oops: Sweet somebody else is

Re: btrfs crash when low on memory.

2013-02-27 Thread Josef Bacik
On Tue, Feb 26, 2013 at 10:22:47PM -0700, Dave Jones wrote: Something I've yet to repeat managed to leak a whole bunch of memory while I was travelling, and locked up my workstation. When I got home, this was the last thing printed out before it locked up (it did make it into the logs

[PATCH 0/2] bug fixes for error handling

2013-02-27 Thread Liu Bo
These two fixes are for error handling after we abort a transaction. One is a memory leak fix, and the other one is a NULL pointer fix. Liu Bo (2): Btrfs: fix memory leak of log roots Btrfs: fix NULL pointer after aborting a transaction fs/btrfs/disk-io.c |5 +

[PATCH 1/2] Btrfs: fix memory leak of log roots

2013-02-27 Thread Liu Bo
When we abort a transaction while fsyncing, we'll skip freeing log roots part of committing a transaction, which leads to memory leak. This adds a 'free log roots' in putting super when no more users hold references on log roots, so it's safe and clean. Signed-off-by: Liu Bo bo.li@oracle.com

[PATCH 2/2] Btrfs: fix NULL pointer after aborting a transaction

2013-02-27 Thread Liu Bo
While doing cleanup work on an aborted transaction, we've set the global running transaction pointer to NULL _before_ waiting all other transaction handles to finish, so others'd hit NULL pointer crash when referencing the global running transaction pointer. This first sets a hint to avoid new

Re: [PATCH 00/17] btrfs-progs: More misc fixes cleanups

2013-02-27 Thread David Sterba
On Mon, Feb 25, 2013 at 04:54:33PM -0600, Eric Sandeen wrote: A bunch of Coverity static analysis checker fixes, including a couple actual bugfixes. This gets it down from around 80 defects to about 50; I have a couple other patches I need to clean up which quiets it even more. By getting

Re: btrfs crash when low on memory.

2013-02-27 Thread Ahmet Inan
Yeah we have a lot of ptr = kmalloc(); BUG_ON(ptr); everywhere. I'll fix this one up but I really need to sit down and go through all of them and make sure we do the right thing in all these places. Thanks, But what would be the right thing to do when you got no memory? Spinlock until

Re: [PATCH 1/2] Btrfs-progs: let the error message outputed only once

2013-02-27 Thread David Sterba
On Wed, Feb 27, 2013 at 07:03:21PM +0800, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com If we fail to execute the command: btrfs qgroup show mnt It will output the follow messages: ERROR: can't perform the search - Inappropriate ioctl for device

Re: Writing a wtapper for BTRFS

2013-02-27 Thread David Sterba
On Wed, Feb 27, 2013 at 01:08:46PM +, Hugo Mills wrote: You may want to look at the btrfs-progs libify patches (posted to this list in the last couple of months), which try to pull out the more useful bits of btrfs-progs as a userspace C API. FYI, libify patch will be in the next

Re: [PATCH] Btrfs-progs: add correct indentation

2013-02-27 Thread David Sterba
On Fri, Feb 22, 2013 at 02:59:24PM +0800, Anand Jain wrote: --- a/utils.c +++ b/utils.c @@ -1192,12 +1192,13 @@ scan_again: return -ENOENT; } /* skip the header */ - for(i=0; i 2 ; i++) - if(!fgets(buf, 1023, proc_partitions)){ -

Re: [PATCH] Btrfs-progs: fix parse_limit function to return errors when parsing unit

2013-02-27 Thread David Sterba
On Thu, Feb 21, 2013 at 08:26:15PM +0800, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com Steps to reproduce: btrfs qgroup limit m mnt/subv Here, unit(k/K/g/G/m/M/t/T) all will trigger the problem. For the above command, the original code will parse the limit value

Re: Diff using send-receive code

2013-02-27 Thread nafisa mandliwala
Sir, Our implementation differs from that of Mark's. According to Mark- send works quite nicely except that it always reads changed file data from disk and puts it in the stream - snapper doesn't want this overhead and would prefer to produce the changed data itself. Thus, the first patch by

Re: [PATCH] Btrfs-progs: fix parse_limit function to return errors when parsing unit

2013-02-27 Thread Eric Sandeen
On 2/27/13 9:52 AM, David Sterba wrote: On Thu, Feb 21, 2013 at 08:26:15PM +0800, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com Steps to reproduce: btrfs qgroup limit m mnt/subv Here, unit(k/K/g/G/m/M/t/T) all will trigger the problem. For the above command, the

Re: [PATCH] Btrfs-progs: add UUID switches to mkfs and convert

2013-02-27 Thread David Sterba
On Sun, Jan 06, 2013 at 04:32:11PM +0100, Florian Albrechtskirchinger wrote: Add the following switches to mkfs.btrfs and update man page: * -U UUID, --uuid UUID Add the following switches to btrfs-convert: * -U UUID * -U new Generates a random UUID (default behavior). * -U copy

Integration branch of btrfs-progs 2013-02-27

2013-02-27 Thread David Sterba
Hi, this time it's the label set/get patches to match ioctl added into 3.9-pre, the initial libify support and small fixes recently sent to the mailinglist. git://repo.or.cz/btrfs-progs-unstable/devel.git integration-20130227 For those who haven't noticed, the previous integration branch has

Re: Swapfile on btrfs

2013-02-27 Thread David Sterba
On Tue, Feb 26, 2013 at 01:45:12PM -0800, Alex Elsayed wrote: Hey, I was looking at the wiki 'unclaimed projects' list and I thought I'd take a look at what might be needed to use the swap-over-n{fs,bd} functionality in order to implement swapfile support. It *looks* like it's surprisingly

Re: Running Apache Derby on 3.8 and BTRFS cause kernel oops

2013-02-27 Thread Daniel Kozák
[kozzi@KozziFX ~]$ mkdir derby [kozzi@KozziFX ~]$ cd derby/ [kozzi@KozziFX derby]$ wget -c -q http://mirror.hosting90.cz/apache//db/derby/db-derby-10.9.1.0/db-derby-10.9.1.0-bin.zip [kozzi@KozziFX derby]$ unzip -qq db-derby-10.9.1.0-bin.zip [kozzi@KozziFX derby]$ cd db-derby-10.9.1.0-bin/

Re: btrfs crash when low on memory.

2013-02-27 Thread Josef Bacik
On Wed, Feb 27, 2013 at 07:31:11AM -0700, Ahmet Inan wrote: Yeah we have a lot of ptr = kmalloc(); BUG_ON(ptr); everywhere. I'll fix this one up but I really need to sit down and go through all of them and make sure we do the right thing in all these places. Thanks, But

Re: btrfs crash when low on memory.

2013-02-27 Thread Ahmet Inan
On Wed, Feb 27, 2013 at 7:26 PM, Josef Bacik jba...@fusionio.com wrote: On Wed, Feb 27, 2013 at 07:31:11AM -0700, Ahmet Inan wrote: Yeah we have a lot of ptr = kmalloc(); BUG_ON(ptr); everywhere. I'll fix this one up but I really need to sit down and go through all of them and

Re: WARNING: at fs/btrfs/extent_io.c:4718 map_private_extent_buffer+0xd4/0xe0 [btrfs]()

2013-02-27 Thread Mace Moneta
On Mon, Feb 25, 2013 at 2:46 PM, Josef Bacik jba...@fusionio.com wrote: On Mon, Feb 25, 2013 at 12:21:30PM -0700, Mace Moneta wrote: On Mon, Feb 25, 2013 at 2:12 PM, Josef Bacik jba...@fusionio.com wrote: Is there any chance you got the line above [ cut here ]? (I hate that stupid [

Re: Swapfile on btrfs

2013-02-27 Thread Alex Elsayed
David Sterba wrote: On Tue, Feb 26, 2013 at 01:45:12PM -0800, Alex Elsayed wrote: Hey, I was looking at the wiki 'unclaimed projects' list and I thought I'd take a look at what might be needed to use the swap-over-n{fs,bd} functionality in order to implement swapfile support. It *looks* like

Re: btrfs crash when low on memory.

2013-02-27 Thread Josef Bacik
On Wed, Feb 27, 2013 at 3:10 PM, Ahmet Inan ai...@mathematik.uni-freiburg.de wrote: On Wed, Feb 27, 2013 at 7:26 PM, Josef Bacik jba...@fusionio.com wrote: On Wed, Feb 27, 2013 at 07:31:11AM -0700, Ahmet Inan wrote: Yeah we have a lot of ptr = kmalloc(); BUG_ON(ptr); everywhere.

Re: btrfs crash when low on memory.

2013-02-27 Thread Ahmet Inan
If we're corrupting on abort that is a bug too that needs to be fixed too. I've banged on the abort stuff a lot recently when trying to make it not panic the box and it appears to work fine. Obviously that kind of stuff needs to be tested as well, but so far I haven't seen abort corrupt the

Re: [PATCH 2/3] Btrfs: return ENOMEM rather than use BUG_ON when btrfs_alloc_path fails

2013-02-27 Thread Zach Brown
Return ENOMEM rather trigger BUG_ON, fix it. These changes look good. The resulting surrounding state buildup and cleanup paths look correct. Thanks for helping remove a few more BUG_ON()s :). Reviewed-by: Zach Brown z...@redhat.com -- To unsubscribe from this list: send the line unsubscribe

Re: Writing a wtapper for BTRFS

2013-02-27 Thread Zach Brown
On Wed, Feb 27, 2013 at 04:19:57PM +0100, David Sterba wrote: On Wed, Feb 27, 2013 at 01:08:46PM +, Hugo Mills wrote: You may want to look at the btrfs-progs libify patches (posted to this list in the last couple of months), which try to pull out the more useful bits of btrfs-progs

Re: Running Apache Derby on 3.8 and BTRFS cause kernel oops

2013-02-27 Thread Josef Bacik
On Wed, Feb 27, 2013 at 1:19 PM, Daniel Kozák kozz...@gmail.com wrote: [kozzi@KozziFX ~]$ mkdir derby [kozzi@KozziFX ~]$ cd derby/ [kozzi@KozziFX derby]$ wget -c -q http://mirror.hosting90.cz/apache//db/derby/db-derby-10.9.1.0/db-derby-10.9.1.0-bin.zip [kozzi@KozziFX derby]$ unzip -qq

Re: Writing a wtapper for BTRFS

2013-02-27 Thread Andy Grover
On 02/27/2013 01:34 PM, Zach Brown wrote: On Wed, Feb 27, 2013 at 04:19:57PM +0100, David Sterba wrote: On Wed, Feb 27, 2013 at 01:08:46PM +, Hugo Mills wrote: You may want to look at the btrfs-progs libify patches (posted to this list in the last couple of months), which try to pull

Re: Running Apache Derby on 3.8 and BTRFS cause kernel oops

2013-02-27 Thread Blair Zajac
On 02/27/2013 02:08 PM, Josef Bacik wrote: On Wed, Feb 27, 2013 at 1:19 PM, Daniel Kozák kozz...@gmail.com wrote: [kozzi@KozziFX ~]$ mkdir derby [kozzi@KozziFX ~]$ cd derby/ [kozzi@KozziFX derby]$ wget -c -q

Re: [PATCH] xfstests 276: fix error 'FIBMAP: Invalid argument'

2013-02-27 Thread Dave Chinner
On Wed, Feb 27, 2013 at 03:15:16PM +0800, Wang Sheng-Hui wrote: Btrfs doesn't support FIEMAP_FLAG_XATTR, which is enabled by -x option of filefrag, and will fail with 'FIBMAP: Invalid argument' for 'filefrag -vx'. 'filefrag -vx' fails on btrfs with 'FIEMAP failed with unsupported

Re: [PATCH] xfstests 276: fix error 'FIBMAP: Invalid argument'

2013-02-27 Thread Eric Sandeen
On 2/27/13 5:04 PM, Dave Chinner wrote: On Wed, Feb 27, 2013 at 03:15:16PM +0800, Wang Sheng-Hui wrote: Btrfs doesn't support FIEMAP_FLAG_XATTR, which is enabled by -x option of filefrag, and will fail with 'FIBMAP: Invalid argument' for 'filefrag -vx'. 'filefrag -vx' fails on btrfs with

[PATCH] btrfs: remove a printk from scan_one_device

2013-02-27 Thread David Sterba
Dave pointed out that he saw messages from btrfs although there was no such filesystem on his computers. The automatic device scan is called on every new blockdevice if the usual distro udev rule set is used. The printk introduced in 6f60cbd3ae442c was a remainder from copying portions of code

Re: [PATCH] xfstests 276: fix error 'FIBMAP: Invalid argument'

2013-02-27 Thread Wang Sheng-Hui
On 2013年02月28日 07:04, Dave Chinner wrote: On Wed, Feb 27, 2013 at 03:15:16PM +0800, Wang Sheng-Hui wrote: Btrfs doesn't support FIEMAP_FLAG_XATTR, which is enabled by -x option of filefrag, and will fail with 'FIBMAP: Invalid argument' for 'filefrag -vx'. 'filefrag -vx' fails on btrfs

Re: [PATCH] xfstests 276: fix error 'FIBMAP: Invalid argument'

2013-02-27 Thread Dave Chinner
On Thu, Feb 28, 2013 at 08:02:52AM +0800, Wang Sheng-Hui wrote: On 2013年02月28日 07:04, Dave Chinner wrote: On Wed, Feb 27, 2013 at 03:15:16PM +0800, Wang Sheng-Hui wrote: Btrfs doesn't support FIEMAP_FLAG_XATTR, which is enabled by -x option of filefrag, and will fail with 'FIBMAP: Invalid

Re: [PATCH] btrfs: cleanup for open-coded alignment

2013-02-27 Thread Qu Wenruo
于 2013年02月27日 19:59, David Sterba 写道: On Tue, Feb 26, 2013 at 04:10:22PM +0800, Qu Wenruo wrote: Though most of the btrfs codes are using ALIGN macro for page alignment, there are still some codes using open-coded alignment like the following: -- u64 mask = ((u64)root-stripesize -

Re: [PATCH] Btrfs-progs: add correct indentation

2013-02-27 Thread Anand Jain
On 02/27/2013 11:45 PM, David Sterba wrote: On Fri, Feb 22, 2013 at 02:59:24PM +0800, Anand Jain wrote: --- a/utils.c +++ b/utils.c @@ -1192,12 +1192,13 @@ scan_again: return -ENOENT; } /* skip the header */ - for(i=0; i 2 ; i++) -

Re: [PATCH] xfstests 276: fix error 'FIBMAP: Invalid argument'

2013-02-27 Thread Wang Sheng-Hui
On 2013年02月28日 08:25, Dave Chinner wrote: On Thu, Feb 28, 2013 at 08:02:52AM +0800, Wang Sheng-Hui wrote: On 2013年02月28日 07:04, Dave Chinner wrote: On Wed, Feb 27, 2013 at 03:15:16PM +0800, Wang Sheng-Hui wrote: Btrfs doesn't support FIEMAP_FLAG_XATTR, which is enabled by -x option of