Re: [PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue

2013-09-19 Thread Qu Wenruo
On thu, 12 Sep 2013 19:37:18 +0200, David Sterba wrote: On Thu, Sep 12, 2013 at 04:08:15PM +0800, Qu Wenruo wrote: Use kernel workqueue and kernel workqueue based new btrfs_workqueue_struct to replace the old btrfs_workers. The main goal is to reduce the redundant codes(800 lines vs 200 lines)

Re: [PATCH 2/2] Btrfs: stop caching thread if extetn_commit_sem is contended

2013-09-19 Thread Ingo Molnar
* Josef Bacik wrote: > We can starve out the transaction commit with a bunch of caching threads > all running at the same time. This is because we will only drop the > extent_commit_sem if we need_resched(), which isn't likely to happen > since we will be reading a lot from the disk so have

Re: rootfs crash

2013-09-19 Thread Jérôme Poulin
On Mon, Sep 16, 2013 at 6:48 AM, Jogi Hofmüller wrote: > After btrfs-zero-log the device > was still not mountable. Mount attempts fail with i/o erros now. ... > All this is happening on an Asus Zen book UX32V with two 128GB SSDs. Did you make sure you aren't working with a dead SSD? That wou

[PATCH] btrfs: Fix crash due to not allocating integrity data for a bioset

2013-09-19 Thread Darrick J. Wong
When btrfs creates a bioset, we must also allocate the integrity data pool. Otherwise btrfs will crash when it tries to submit a bio to a checksumming disk: BUG: unable to handle kernel NULL pointer dereference at 0018 IP: [] mempool_alloc+0x4a/0x150 PGD 2305e4067 PUD 23063d067 PMD

Re: [PATCH] Btrfs: export btrfs space shared info to userspace

2013-09-19 Thread Liu Bo
On Wed, Sep 18, 2013 at 04:53:04PM -0400, Josef Bacik wrote: > On Mon, Sep 16, 2013 at 03:40:12PM +0800, Liu Bo wrote: > > Similar to ocfs2, btrfs also supports that extents can be shared by > > different inodes, and there are some userspace tools requesting > > for this kind of 'space shared infom

Re: [PATCH 1/2] rwsem: add rwsem_is_contended V2

2013-09-19 Thread Josef Bacik
On Thu, Sep 19, 2013 at 06:57:27PM -0400, Peter Hurley wrote: > On 09/19/2013 11:48 AM, Josef Bacik wrote: > >Btrfs needs a simple way to know if it needs to let go of it's read lock on a > >rwsem. Introduce rwsem_is_contended to check to see if there are any > >waiters on > >this rwsem currently

Re: [PATCH 1/2] rwsem: add rwsem_is_contended V2

2013-09-19 Thread Peter Hurley
On 09/19/2013 11:48 AM, Josef Bacik wrote: Btrfs needs a simple way to know if it needs to let go of it's read lock on a rwsem. Introduce rwsem_is_contended to check to see if there are any waiters on this rwsem currently. This is just a hueristic, it is meant to be light and not 100% accurate

[PATCH] Btrfs: add a sanity test for btrfs_split_item V2

2013-09-19 Thread Josef Bacik
While looking at somebodys corruption I became completely convinced that btrfs_split_item was broken, so I wrote this test to verify that it was working as it was supposed to. Thankfully it appears to be working as intended, so just add this test to make sure nobody breaks it in the future. Thank

[PATCH] Btrfs: add a sanity test for btrfs_split_item

2013-09-19 Thread Josef Bacik
While looking at somebodys corruption I became completely convinced that btrfs_split_item was broken, so I wrote this test to verify that it was working as it was supposed to. Thankfully it appears to be working as intended, so just add this test to make sure nobody breaks it in the future. Thank

Issue building a file based rootfs image with mkfs.btrfs

2013-09-19 Thread Saul Wold
Hi there, I am attempting to build a rootfs image from an existing rootfs directory tree. I am using the 0.20 @ 194aa4a of Chris's git repo. The couple problem I saw was that the target image file needed to exist, although I think I can patch that then the FS size was much larger than the

Re: [PATCH] xfstests: unify apostrophes in output files

2013-09-19 Thread Eric Sandeen
On 9/19/13 11:54 AM, Ilya Dryomov wrote: ... >> diff --git a/check b/check >> index 4085eae..ba7fd21 100755 >> --- a/check >> +++ b/check >> @@ -478,6 +478,10 @@ do >> echo " - no qualified output" >> err=true >> else >> + >> + # coreutils

Re: [PATCH] xfstests: unify apostrophes in output files

2013-09-19 Thread Ilya Dryomov
On Thu, Sep 19, 2013 at 7:20 PM, Eric Sandeen wrote: > xfstests: unify apostrophes in output files > > From: Tomas Racek > > With coreutils v8.16 the style of apostrophes changed from `word' to > 'word'. This is breaking some tests which use the older form. > > This commit introduces function cha

Re: rootfs crash

2013-09-19 Thread Jogi Hofmüller
Hello Frank, Am 2013-09-19 18:18, schrieb Frank Holton: > I'm not sure what's causing the free error, I'll keep looking. So am I :) In fact I would really like to help fix the tool. I hope I can provide some suggestions for fixes, but I'm having my trouble with the code ;) All I can tell so f

[PATCH] xfstests: unify apostrophes in output files

2013-09-19 Thread Eric Sandeen
xfstests: unify apostrophes in output files From: Tomas Racek With coreutils v8.16 the style of apostrophes changed from `word' to 'word'. This is breaking some tests which use the older form. This commit introduces function changes the golden output of the affected tests and introduces a filte

Re: rootfs crash

2013-09-19 Thread Frank Holton
Hello Jogi, I'm not sure what's causing the free error, I'll keep looking. Have you tried running restore on your home subvolume yet? By default restore only works on the default subvolume which in your case is / The following command will try to restore your /home subvolume btrfs restore -i -r

[PATCH 2/2] Btrfs: stop caching thread if extetn_commit_sem is contended

2013-09-19 Thread Josef Bacik
We can starve out the transaction commit with a bunch of caching threads all running at the same time. This is because we will only drop the extent_commit_sem if we need_resched(), which isn't likely to happen since we will be reading a lot from the disk so have already schedule()'ed plenty. Alex

[PATCH 1/2] rwsem: add rwsem_is_contended V2

2013-09-19 Thread Josef Bacik
Btrfs needs a simple way to know if it needs to let go of it's read lock on a rwsem. Introduce rwsem_is_contended to check to see if there are any waiters on this rwsem currently. This is just a hueristic, it is meant to be light and not 100% accurate and called by somebody already holding on to

Re: [BULK] Re: [PATCH] xfstests: introduce _filter_backtick

2013-09-19 Thread Josef Bacik
On Thu, Sep 19, 2013 at 07:13:25AM +1000, Dave Chinner wrote: > On Wed, Sep 18, 2013 at 04:29:26PM -0400, Josef Bacik wrote: > > Apparently the GNU guys decided to change their error output from something > > like > > > > Error `Error message' > > > > To > > > > Error 'Error message' > > > > S

Re: [PATCH] xfstests: fix set-default test in btrfs/001

2013-09-19 Thread David Sterba
On Wed, Sep 18, 2013 at 04:48:27PM -0400, Josef Bacik wrote: > We were actually testing this improperly, there was a bug in the set default > code so we weren't actually honoring the 0 subvolid properly. To fix this we > need to get the subvolid for the subvol we want to set as the default and use

Is parralel device remove possible ?

2013-09-19 Thread Ondřej Kunc
Hi, I'm just removing about 8 drives from btrfs pool and I issued this command: btrfs dev del /dev/sd[bmghkqps] According to munin graphs it is removing drives sequentially and ... I can see it is reading that drive which it is actually removing ... but it is doing big writes(so it is probabl