[PATCH 0/3] xfstests: test btrfs replace on RAID 5/6

2015-07-23 Thread Omar Sandoval
Btrfs has supported replace on RAID 5 and 6 since 3.19, but xfstests hasn't been updated to reflect that. Patches 1 and 2 in this series fix that. Additionally, I'm including Wang Yanfeng's test for my patch series Btrfs: RAID 5/6 missing device scrub+replace, updated to use the infrastructure

[PATCH 1/3] btrfs/011: test replace on RAID 5/6 now that it's supported

2015-07-23 Thread Omar Sandoval
btrfs replace has been supported on RAID 5/6 since Linux 3.19. Signed-off-by: Omar Sandoval osan...@fb.com --- tests/btrfs/011 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/btrfs/011 b/tests/btrfs/011 index f4f2fbed68d8..c7d35fa46062 100755 --- a/tests/btrfs/011

[PATCH 2/3] btrfs: add replace missing and replace RAID 5/6 to profile configs

2015-07-23 Thread Omar Sandoval
Replacing and scrubbing RAID 5/6 is now supported on Btrfs. Enable it in _btrfs_get_profile_configs while making it more generic to also support replace missing. Signed-off-by: Omar Sandoval osan...@fb.com --- common/rc | 96 --- 1 file

[PATCH 3/3] btrfs: add a test of replace missing dev in diff raid

2015-07-23 Thread Omar Sandoval
From: Wang Yanfeng wangyf-f...@cn.fujitsu.com Test of missing device replace in different raid modes. This test requires SCRATCH_DEV_POOL contain 5 same size devices. This issue has been fixed by Omar's patch: Btrfs: RAID 5/6 missing device scrub+replace Signed-off-by: Wang Yanfeng

Re: Can't mount btrfs volume on rbd

2015-07-23 Thread Austin S Hemmelgarn
On 2015-07-22 10:13, Gregory Farnum wrote: On Wed, Jul 22, 2015 at 12:16 PM, Austin S Hemmelgarn ahferro...@gmail.com wrote: On 2015-07-21 22:01, Qu Wenruo wrote: Steve Dainard wrote on 2015/07/21 14:07 -0700: I don't know if this has any bearing on the failure case, but the filesystem that

Re: Btrfs progs release 4.1.2 (urgent fix, do not use 4.1.1)

2015-07-23 Thread David Sterba
On Sun, Jul 19, 2015 at 07:07:40PM -0700, Suman Chakravartula wrote: We are using 4.1 progs and 4.1 kernel on Rockstor currently and what I see is that btrfs check says device is not currently mounted. Is 4.1 effected? Do you recommend we update to 4.1.2 anyway? [root@RockStor ~]# btrfs fi

Re: [PATCH] btrfs: Fix scrub panic when leaf accross stripes

2015-07-23 Thread Chris Mason
On Thu, Jul 23, 2015 at 12:29:49PM +0800, Zhaolei wrote: From: Zhao Lei zhao...@cn.fujitsu.com Scrub panic in following operation: mkfs.ext4 /dev/vdh btrfs-convert /dev/vdh mount /dev/vdh /mnt/tmp1 btrfs scrub start -B /dev/vdh (panic) Reason: 1: In some case, leaf created

Re: Btrfs progs release 4.1.1

2015-07-23 Thread David Sterba
On Sat, Jul 11, 2015 at 06:02:29PM -0700, Marc MERLIN wrote: Are you interested in crash reports for fsck? If so, see my recent message: On Mon, Jul 06, 2015 at 02:21:56PM -0700, Marc MERLIN wrote: myth:~# btrfs check --repair /dev/mapper/crypt_sdd1 enabling repair mode Checking

Re: [GIT PULL] Fix for btrfs/070 checksum error

2015-07-23 Thread Qu Wenruo
Thanks Chris We will investigate it with highest priority. Thanks, Qu Chris Mason wrote on 2015/07/23 16:21 -0400: On Wed, Jul 22, 2015 at 05:28:48PM +0800, Qu Wenruo wrote: Hi Chris, Is there anything wrong with it? It has been 2 weeks, and it's still not in your for linus branch. Is

Re: [GIT PULL] Fix for btrfs/070 checksum error

2015-07-23 Thread Qu Wenruo
Chris Mason wrote on 2015/07/23 21:57 -0400: On Fri, Jul 24, 2015 at 08:29:05AM +0800, Qu Wenruo wrote: [ deadlock with the 070 patches ] Thanks Chris We will investigate it with highest priority. Thanks, Qu Thanks! I'm doing a few more runs to make sure the lockup is new with these

Re: [GIT PULL] Fix for btrfs/070 checksum error

2015-07-23 Thread Chris Mason
On Fri, Jul 24, 2015 at 08:29:05AM +0800, Qu Wenruo wrote: [ deadlock with the 070 patches ] Thanks Chris We will investigate it with highest priority. Thanks, Qu Thanks! I'm doing a few more runs to make sure the lockup is new with these patches. -chris -- To unsubscribe from this

Re: [PATCH 2/3] btrfs: add replace missing and replace RAID 5/6 to profile configs

2015-07-23 Thread Eryu Guan
On Thu, Jul 23, 2015 at 01:51:50PM -0700, Omar Sandoval wrote: Replacing and scrubbing RAID 5/6 is now supported on Btrfs. Enable it in _btrfs_get_profile_configs while making it more generic to also support replace missing. Signed-off-by: Omar Sandoval osan...@fb.com Looks great! Tested

Re: [PATCH 3/3] btrfs: add a test of replace missing dev in diff raid

2015-07-23 Thread Eryu Guan
On Thu, Jul 23, 2015 at 01:51:51PM -0700, Omar Sandoval wrote: From: Wang Yanfeng wangyf-f...@cn.fujitsu.com Test of missing device replace in different raid modes. This test requires SCRATCH_DEV_POOL contain 5 same size devices. This issue has been fixed by Omar's patch: Btrfs:

Re: INFO: task btrfs-transacti:204 blocked for more than 120 seconds. (more like 8+min)

2015-07-23 Thread Duncan
james harvey posted on Thu, 23 Jul 2015 19:12:38 + as excerpted: Up to date Arch. linux kernel 4.1.2-2. Fresh O/S install 12 days ago. No where near full - 34G used on a 4.6T drive. 32GB memory. Installed bonnie++ 1.97-1. $ bonnie++ -d bonnie -m btrfs-disk -f -b I started

Re: [PATCH 1/3] btrfs/011: test replace on RAID 5/6 now that it's supported

2015-07-23 Thread Eryu Guan
On Thu, Jul 23, 2015 at 01:51:49PM -0700, Omar Sandoval wrote: btrfs replace has been supported on RAID 5/6 since Linux 3.19. Signed-off-by: Omar Sandoval osan...@fb.com Reviewed-by: Eryu Guan eg...@redhat.com --- tests/btrfs/011 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: INFO: task btrfs-transacti:204 blocked for more than 120 seconds. (more like 8+min)

2015-07-23 Thread Austin S Hemmelgarn
On 2015-07-23 15:12, james harvey wrote: Up to date Arch. linux kernel 4.1.2-2. Fresh O/S install 12 days ago. No where near full - 34G used on a 4.6T drive. 32GB memory. Installed bonnie++ 1.97-1. $ bonnie++ -d bonnie -m btrfs-disk -f -b I started trying to run with a -s 4G option, to

Re: [GIT PULL] Fix for btrfs/070 checksum error

2015-07-23 Thread Chris Mason
On Wed, Jul 22, 2015 at 05:28:48PM +0800, Qu Wenruo wrote: Hi Chris, Is there anything wrong with it? It has been 2 weeks, and it's still not in your for linus branch. Is there anything wrong? I ran this through xfstests again, and got tasks deadlocked during btrfs/061. Looks like

INFO: task btrfs-transacti:204 blocked for more than 120 seconds. (more like 8+min)

2015-07-23 Thread james harvey
Up to date Arch. linux kernel 4.1.2-2. Fresh O/S install 12 days ago. No where near full - 34G used on a 4.6T drive. 32GB memory. Installed bonnie++ 1.97-1. $ bonnie++ -d bonnie -m btrfs-disk -f -b I started trying to run with a -s 4G option, to use 4GB files for performance measuring. It

[PATCH 2/4] btrfs: fsck: Check if a metadata tree block crossing stripe boundary

2015-07-23 Thread Qu Wenruo
Kernel btrfs_map_block() function has a limitation that it can only map BTRFS_STRIPE_LEN size. That will cause scrub fails to scrub tree block which crosses strip boundary, causing BUG_ON(). Normally, it's OK as metadata is always in metadata chunk and BTRFS_STRIPE_LEN can always be divided by

[PATCH 0/4] Metadata crossing stripe boundary fixes

2015-07-23 Thread Qu Wenruo
The problem is originally reported by Chris Murphyli...@colorremedies.com, and Zhao Lei digs out the root cause: Metadata extent in mixed block group may cross stripe boundary, causing scrub can't handle them. For normal data/metadata separated case, as BTRFS_STRIPE_LEN(64K) can always be divided

[PATCH 3/4] btrfs: extent-tree: Avoid allocating tree block that cross stripe boundary

2015-07-23 Thread Qu Wenruo
Now find_free_extent() function won't return a metadata extent that cross stripe boundary. Reported-by: Chris Murphy li...@colorremedies.com Reported-by: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com ---

[PATCH 4/4] btrfs: convert: Avoid allocating metadata extent crossing stripe boundary

2015-07-23 Thread Qu Wenruo
As convert implement its own alloc extent, avoid such metadata problem too. Reported-by: Chris Murphy li...@colorremedies.com Reported-by: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- btrfs-convert.c | 15

[PATCH 1/4] btrfs: print-tree: print stripe len of a chunk

2015-07-23 Thread Qu Wenruo
Although it is fixed to BTRFS_STRIPE_LEN(64K) now, it's still used in a lot of codes, just output it for user who want to trace the source of stripe_len in btrfs_map_bio() codes. Reported-by: Chris Murphy li...@colorremedies.com Reported-by: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Zhao Lei

[PATCH v2] Btrfs: fix stale directory entries after fsync log replay

2015-07-23 Thread fdmanana
From: Filipe Manana fdman...@suse.com We have another case where after an fsync log replay we get an inode with a wrong link count (smaller than it should be) and a number of directory entries greater than its link count. This happens when we add a new link hard link to our inode A and then we