[PATCH] Btrfs: do not use extent commit root for sending

2014-01-12 Thread Wang Shilong
From: Wang Shilong Now we have kicked off transaction from btrfs send, it is not safe that we use extent commit root to search. I happended to catch this problem when running sending and snapshot in my desktop. Signed-off-by: Wang Shilong --- fs/btrfs/send.c | 2 +- 1 file changed, 1 insertio

[PATCH 2/3] Btrfs: fix to search previous metadata extent item since skinny metadata

2014-01-12 Thread Wang Shilong
From: Wang Shilong There is a bug that using btrfs_previous_item() to search metadata extent item. This is because in btrfs_previous_item(), we need type match, however, since skinny metada was introduced by josef, we may mix this two types. So just use btrfs_previous_item() is not working right.

[PATCH 3/3] Btrfs: fix missing inline refs when walking backrefs

2014-01-12 Thread Wang Shilong
From: Wang Shilong If @slot=0, we may have an expected item in the previous leaf, So we should handle that case, otherwise, we will miss inline refs ,fix it. Signed-off-by: Wang Shilong --- fs/btrfs/backref.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/

[PATCH 1/3] Btrfs: fix missing skinny metadata check in scrub_stripe()

2014-01-12 Thread Wang Shilong
From: Wang Shilong Check if we support skinny metadata firstly and fix to use right type to search. Signed-off-by: Wang Shilong --- fs/btrfs/scrub.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 7806e2c..e0677e4 100644 --- a/f

ENOSPC during balance

2014-01-12 Thread Remco Hosman - Yerf IT
HI, I am trying to convert my array from raid10 to 1, and its partially completed, but at the moment i am getting a '59366.459092] btrfs: 185 enospc errors during balance’ when i try to balance anything more with `btrfs bal start -dconvert=raid1,soft /mountpoint` I have already scanned for fil

Re: [PATCH 3/3] Btrfs: fix missing inline refs when walking backrefs

2014-01-12 Thread Filipe David Manana
On Sun, Jan 12, 2014 at 1:38 PM, Wang Shilong wrote: > From: Wang Shilong > > If @slot=0, we may have an expected item in the previous leaf, > So we should handle that case, otherwise, we will miss inline refs > ,fix it. Hi Shilong. How can this happen exactly? So the search key, regardless of

RAID 1 with no data on it when accidentally switched HDD

2014-01-12 Thread Ingo Ebel
Hi, I'm not sure whether it's a bug in btrfs or my distro but I discovered an odd behavior today. My Setup: * Btrfs v3.12+20131125 * /dev/sda – Boot OS - opensuse 13.1 * Btrfs RAID 1 on /dev/sdb1 and /dev/sdc1 I added an extra HDD with an other OS and Data on it witch accidentally became /d

Issues with "no space left on device" maybe related to 3.13 and/or kvm disk image fragmentation

2014-01-12 Thread Thomas Kuther
Hello, I'm experiencing an interesting issue with the BTRFS filesystem on my SSD drive. It first occured some time after the upgrade to kernel 3.13-rc (-rc3 was my first 3.13-rc) but I'm not sure if it is related. The obvious symptoms are that services on my system started crashing with "no space

Re: RAID 1 with no data on it when accidentally switched HDD

2014-01-12 Thread Chris Murphy
On Jan 12, 2014, at 12:35 PM, Ingo Ebel wrote: > Hi, > > I'm not sure whether it's a bug in btrfs or my distro but I discovered an odd > behavior today. > > My Setup: > > * Btrfs v3.12+20131125 > * /dev/sda – Boot OS - opensuse 13.1 > * Btrfs RAID 1 on /dev/sdb1 and /dev/sdc1 > > I added an

Re: RAID 1 with no data on it when accidentally switched HDD

2014-01-12 Thread Ingo Ebel
Hi, I don't understand the exact sequence. How does a 3rd drive appear as sdc when the 2nd drive is sdc and sdc1 is part of a Btrfs file system already? Did you reboot and the 3rd drive became sdc? This needs to be explained better, including the exact commands you used. Ok i try to. I mad

Moving subvolumes across disks

2014-01-12 Thread Michael Welsh Duggan
I currently have a disk with a btrfs volume dedicated to backups. All of these backups are snapshotted volumes that were sent to this disk via btrfs send/receive). Moreover the disk has had deduplication processes run on it a time or two. I wish to re-format this disk using a larger metadata blo

Re: RAID 1 with no data on it when accidentally switched HDD

2014-01-12 Thread Chris Murphy
On Jan 12, 2014, at 2:40 PM, Ingo Ebel wrote: > Hi, > >> I don't understand the exact sequence. How does a 3rd drive appear as sdc >> when >> the 2nd drive is sdc and sdc1 is part of a Btrfs file system already? Did you >> reboot and the 3rd drive became sdc? This needs to be explained better,

Re: btrfsck does not fix

2014-01-12 Thread Hendrik Friedel
Hello, Kernel version? 3.12.0-031200-generic It mounts OK with no kernel messages? Yes. Here I mount the three subvolumes: dmesg: [105152.392900] btrfs: device fsid 989306aa-d291-4752-8477-0baf94f8c42f devid 1 transid 164942 /dev/sdb1 [105152.394332] btrfs: device

kernel BUG at fs/btrfs/inode.c:1593! with 3.13.0-rc7

2014-01-12 Thread Tomasz Chmielewski
Just had this on a btrfs filesystem running 3.13-rc7. The filesystem was working fine till now and was passing balance and scrub properly without any issues a couple of days ago: [273059.042280] [ cut here ] [273059.042369] WARNING: CPU: 6 PID: 20754 at fs/btrfs/inode.c:47

Re: Issues with "no space left on device" maybe related to 3.13 and/or kvm disk image fragmentation

2014-01-12 Thread Thomas Kuther
I did some more digging, and I think I have two maybe unrelated issues here. The "no space left on device" could be caused by the amount of metadata used. I defragmented the KVM image and other parts, ran a "balance start -dusage=5", and now it looks like └» btrfs fi df / Data, single: total=113.

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Qu Wenruo
On fri, 10 Jan 2014 10:15:37 -0600, Eric Sandeen wrote: On 1/8/14, 12:30 AM, Qu Wenruo wrote: Test remount btrfs with different pairing options like barrier and no barrier. It seems that while this tests that the remount succeeds, and that the option string is present in /proc/mounts, it does n

Re: kernel BUG at fs/btrfs/inode.c:1593! with 3.13.0-rc7

2014-01-12 Thread Gui Hecheng
Hi Tomasz, Similar bug has been reported by Pedro Fonseca before, how do you trigger this or what operations are you doing? Thanks, Gui On Sun, 2014-01-12 at 23:47 +0100, Tomasz Chmielewski wrote: > Just had this on a btrfs filesystem running 3.13-rc7. > > The filesystem was working fine till n

Re: [PATCH 3/3] Btrfs: fix missing inline refs when walking backrefs

2014-01-12 Thread Wang Shilong
Hi Filipe, On 01/12/2014 11:36 PM, Filipe David Manana wrote: On Sun, Jan 12, 2014 at 1:38 PM, Wang Shilong wrote: From: Wang Shilong If @slot=0, we may have an expected item in the previous leaf, So we should handle that case, otherwise, we will miss inline refs ,fix it. Hi Shilong. How c

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Eric Sandeen
On 1/12/14, 7:21 PM, Qu Wenruo wrote: > On fri, 10 Jan 2014 10:15:37 -0600, Eric Sandeen wrote: >> On 1/8/14, 12:30 AM, Qu Wenruo wrote: >>> Test remount btrfs with different pairing options like barrier and no >>> barrier. >> It seems that while this tests that the remount succeeds, and that >> t

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Dave Chinner
On Sun, Jan 12, 2014 at 07:35:44PM -0600, Eric Sandeen wrote: > On 1/12/14, 7:21 PM, Qu Wenruo wrote: > > On fri, 10 Jan 2014 10:15:37 -0600, Eric Sandeen wrote: > >> On 1/8/14, 12:30 AM, Qu Wenruo wrote: > >>> Test remount btrfs with different pairing options like barrier and no > >>> barrier. >

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Qu Wenruo
On Sun, 12 Jan 2014 19:35:44 -0600, Eric Sandeen wrote: On 1/12/14, 7:21 PM, Qu Wenruo wrote: On fri, 10 Jan 2014 10:15:37 -0600, Eric Sandeen wrote: On 1/8/14, 12:30 AM, Qu Wenruo wrote: Test remount btrfs with different pairing options like barrier and no barrier. It seems that while this t

Re: [PATCH] xfstests: kill lib/random.c

2014-01-12 Thread Dave Chinner
On Tue, Jan 07, 2014 at 09:20:12PM +, Chris Mason wrote: > On Tue, 2014-01-07 at 16:17 -0500, Josef Bacik wrote: > > On 01/07/2014 03:40 PM, Ben Myers wrote: > > > On Tue, Jan 07, 2014 at 02:10:15PM -0600, Eric Sandeen wrote: > > >> On 1/7/14, 2:01 PM, Ben Myers wrote: > > >>> Hey Gents, > > >>

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Qu Wenruo
On mon, 13 Jan 2014 12:52:39 +1100, Dave Chinner wrote: On Sun, Jan 12, 2014 at 07:35:44PM -0600, Eric Sandeen wrote: On 1/12/14, 7:21 PM, Qu Wenruo wrote: On fri, 10 Jan 2014 10:15:37 -0600, Eric Sandeen wrote: On 1/8/14, 12:30 AM, Qu Wenruo wrote: Test remount btrfs with different pairing o

Re: [PATCH] Btrfs: optimize to remove unnecessary removal with ulist reallocation

2014-01-12 Thread Liu Bo
On Fri, Jan 10, 2014 at 09:25:46PM +0800, Wang Shilong wrote: > Here we are not going to free memory, no need to remove every node > one by one, just init root node here is ok. Looks fine, but we need to make sure that it passes the regression test since you're working on an old bug. -liubo >

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Dave Chinner
On Mon, Jan 13, 2014 at 10:26:05AM +0800, Qu Wenruo wrote: > On mon, 13 Jan 2014 12:52:39 +1100, Dave Chinner wrote: > >On Sun, Jan 12, 2014 at 07:35:44PM -0600, Eric Sandeen wrote: > >>I won't say no to this, but it seems to be of somewhat limited use. > >What happens to the test when mount option

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Qu Wenruo
On Mon, 13 Jan 2014 14:26:50 +1100, Dave Chinner wrote: On Mon, Jan 13, 2014 at 10:26:05AM +0800, Qu Wenruo wrote: On mon, 13 Jan 2014 12:52:39 +1100, Dave Chinner wrote: On Sun, Jan 12, 2014 at 07:35:44PM -0600, Eric Sandeen wrote: I won't say no to this, but it seems to be of somewhat limite

Re: [PATCH] xfstests: Add pairing mount options test

2014-01-12 Thread Eric Sandeen
On 1/12/14, 10:00 PM, Qu Wenruo wrote: > Now I'm interested in how other filesystems like xfs makes sure that every > pairing > mount options are tested. For starters, xfs actually doesn't handle very many options during remount. Many of them are quite tricky to do, which made me wonder if they

[PATCH 2/2] btrfs: Cleanup the btrfs_parse_options for remount.

2014-01-12 Thread Qu Wenruo
Since remount will pending the new mount options to the original mount options, which will make btrfs_parse_options check the old options then new options, causing some stupid output like "enabling XXX" following by "disable XXX". This patch will add extra check before every btrfs_info to skip the

[PATCH 1/2] btrfs: Add noinode_cache mount option

2014-01-12 Thread Qu Wenruo
Add noinode_cache mount option for btrfs. Since inode map cache involves all the btrfs_find_free_ino/return_ino things and if just trigger the mount_opt, an inode number get from inode map cache will not returned to inode map cache. To keep the find and return inode both in the same behavior, a n

Re: kernel BUG at fs/btrfs/inode.c:1593! with 3.13.0-rc7

2014-01-12 Thread Wang Shilong
On 01/13/2014 06:47 AM, Tomasz Chmielewski wrote: Hello Tomasz, Chris recently sent a patch that addressed a race condition with loading inode, i think it might be related to your first dmesg warning. Chris' patch url can be seen: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg3033

Re: ENOSPC during balance

2014-01-12 Thread Wang Shilong
On 01/12/2014 10:49 PM, Remco Hosman - Yerf IT wrote: HI, I am trying to convert my array from raid10 to 1, and its partially completed, but at the moment i am getting a '59366.459092] btrfs: 185 enospc errors during balance’ when i try to balance anything more with `btrfs bal start -dconvert

Re: Issues with "no space left on device" maybe related to 3.13 and/or kvm disk image fragmentation

2014-01-12 Thread Duncan
Thomas Kuther posted on Mon, 13 Jan 2014 00:05:25 +0100 as excerpted: > [ Rearranged to standard quote/reply order so replies are in context. Top-posting is irritating to try to reply to.] > Am 12.01.2014 21:24, schrieb Thomas Kuther: >> >> I'm experiencing an interesting issue with the BTRFS