Re: One random read streaming is fast (~1200MB/s), but two or more are slower (~750MB/s)?

2013-04-17 Thread Sander
Matt Pursley wrote (ao): I have an LSI HBA card (LSI SAS 9207-8i) with 12 7200rpm SAS drives attached. When it's formated with mdraid6+ext4 I get about 1200MB/s for multiple streaming random reads with iozone. With btrfs in 3.9.0-rc4 I can also get about 1200MB/s, but only with one stream at

[PATCH] Btrfs: clear received_uuid field for new writable snapshots

2013-04-17 Thread Stefan Behrens
For created snapshots, the full root_item is copied from the source root and afterwards selectively modified. The current code forgets to clear the field received_uuid. The only problem is that it is confusing when you look at it with 'btrfs subv list', since for writable snapshots, the contents

[PATCH V2] Btrfs: fix missing check about ulist_add() in qgroup.c

2013-04-17 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com ulist_add() may return -ENOMEM, fix missing check about return value. Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com --- Changelog v1-v2: ulist_add() may return 1, and this is ok. For this case, btrfs_qgroup_reserve() should

Re: [PATCH V2] Btrfs: fix missing check about ulist_add() in qgroup.c

2013-04-17 Thread Wang Shilong
Hello Josef, It really takes me the whole day to tack such strange regression down! In fact, i should test every patch even for a cleanup patch carefully…. Sorry for inconvenience to you. Wang From: Wang Shilong wangsl-f...@cn.fujitsu.com ulist_add() may return -ENOMEM, fix missing

[PATCH] Btrfs: don't force pages under writeback to finish when aborting

2013-04-17 Thread Josef Bacik
Dave reported a BUG_ON() that happened in end_page_writeback() after an abort. This happened because we unconditionally call end_page_writeback() in the endio case, which is right. However when we abort the transaction we will call end_page_writeback() on any writeback pages we find, which is

[PATCH] Btrfs: add all ioctl checks before user change for quota operations

2013-04-17 Thread Wang Shilong
From: Wang Shilong wangsl-f...@cn.fujitsu.com Since all the quota configurations are loaded in memory, and we can have ioctl checks before operating in the disk. It is safe to do such things because qgroup_ioctl_lock is held outside. Without these extra checks firstly, it should be ok to do user

Re: [PATCH v2 2/3] Btrfs: rescan for qgroups

2013-04-17 Thread Jan Schmidt
On Tue, April 16, 2013 at 14:22 (+0200), Wang Shilong wrote: Hello Jan, more comments below.. [...snip..] + +static long btrfs_ioctl_quota_rescan_status(struct file *file, void __user *arg) +{ +struct btrfs_root *root = BTRFS_I(fdentry(file)-d_inode)-root; +struct

[PATCH] Btrfs: fix lockdep warning

2013-04-17 Thread Josef Bacik
The locking order for stuff is __sb_start_write ordered_mutex but with sync() we don't do __sb_start_write for some strange reason, which means that our iput in wait_ordered_extents could start a transaction which does the __sb_start_write while we're holding the ordered_mutex. Fix this by

Re: [PATCH] Btrfs: fix lockdep warning

2013-04-17 Thread David Sterba
On Wed, Apr 17, 2013 at 12:19:16PM -0400, Josef Bacik wrote: The locking order for stuff is __sb_start_write ordered_mutex but with sync() we don't do __sb_start_write for some strange reason, which means that our iput in wait_ordered_extents could start a transaction which does the

Re: One random read streaming is fast (~1200MB/s), but two or more are slower (~750MB/s)?

2013-04-17 Thread Matt Pursley
On Tue, Apr 16, 2013 at 11:55 PM, Sander san...@humilis.net wrote: Matt Pursley wrote (ao): I have an LSI HBA card (LSI SAS 9207-8i) with 12 7200rpm SAS drives attached. When it's formated with mdraid6+ext4 I get about 1200MB/s for multiple streaming random reads with iozone. With btrfs in

[PATCH] Btrfs: fix reada debug code compilation

2013-04-17 Thread Vincent
This fixes the following errors: fs/btrfs/reada.c: In function ‘btrfs_reada_wait’: fs/btrfs/reada.c:958:42: error: invalid operands to binary (have ‘atomic_t’ and ‘int’) fs/btrfs/reada.c:961:41: error: invalid operands to binary (have ‘atomic_t’ and ‘int’) Signed-off-by: Vincent Stehlé

Re: [PATCH] Btrfs: fix reada debug code compilation

2013-04-17 Thread David Sterba
On Wed, Apr 17, 2013 at 10:45:18PM +0200, Vincent wrote: Thanks for your review; here is a resend with your 'Reviewed-by'. No need to do that, reviewed-by or the other tags are picked by maintainers, see

Re: [PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block

2013-04-17 Thread David Sterba
On Thu, Apr 11, 2013 at 06:30:16PM +0800, Miao Xie wrote: In order to avoid this problem, we introduce a lock named super_lock into the btrfs_fs_info structure. If we want to update incompat/compat flags of the super block, we must hold it. + /* + * Used to protect the

Re: [PATCH] Btrfs: do not continue if out of memory happens

2013-04-17 Thread David Sterba
On Mon, Apr 15, 2013 at 06:26:38PM +0800, Wang Shilong wrote: If out of memory happens, we should return -ENOMEM directly to the caller rather than continue the work. Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of