Re: [PATCH] Btrfs: fix ASSERT(list_empty(cur_trans-dirty_bgs_list)

2015-03-04 Thread Josef Bacik
On 03/03/2015 10:12 PM, Liu Bo wrote: On Tue, Mar 03, 2015 at 05:35:33PM +0100, David Sterba wrote: On Tue, Mar 03, 2015 at 07:02:58PM +0800, Liu Bo wrote: On Mon, Mar 02, 2015 at 12:46:55PM -0500, Josef Bacik wrote: Dave could hit this assert consistently running btrfs/078. This is because

Re: [PATCH] Btrfs: fix ASSERT(list_empty(cur_trans-dirty_bgs_list)

2015-03-04 Thread Josef Bacik
On 03/03/2015 11:35 AM, David Sterba wrote: On Tue, Mar 03, 2015 at 07:02:58PM +0800, Liu Bo wrote: On Mon, Mar 02, 2015 at 12:46:55PM -0500, Josef Bacik wrote: Dave could hit this assert consistently running btrfs/078. This is because when we update the block groups we could truncate the

[PATCH 6/6] btrfs: Remove unused err = 0 line for raid_rmw_end_io()

2015-03-04 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/raid56.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 2285e78..c087870 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1464,7 +1464,6 @@

[PATCH 1/6] btrfs: Fix calculation of rbio-dbitmap's size calculation

2015-03-04 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com Current code is trying to calculate rbio-dbitmap's size to make it align to sizeof(long), but implement haven't achived this object, it is align to sizeof(char) instead. This patch fixed above calculation, and use sizeof(long) instead of fixed 8 to increate

[PATCH 4/6] btrfs: Clear PageUptodate bit in alloc_rbio_parity_pages()

2015-03-04 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/raid56.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 0d902ac..0a40d07 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1049,6 +1049,7 @@

[PATCH 3/6] btrfs: use rbio-nr_pages to reduce calculation

2015-03-04 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com We can use rbio-stripe_npages to reduce unnecessary calculation in many code place. Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/raid56.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git

Re: rsync causes kernel oops

2015-03-04 Thread Rich Gannon
Liu, I was able to use 3.18.1 to compile the revised 3.18.8 kernel with GRSecurity and your patch. I ran emerge --sync and it immediately returned Killed. Here's a link to the full dmesg output: http://richgannon.net/btrfs.dmesg.txt Again, this may be unrelated completely to the RAID-10

[PATCH 2/6] btrfs: Use unified stripe_page's index calculation

2015-03-04 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com We are using different index calculation method for stripe_page in current code: 1: (rbio-stripe_len / PAGE_CACHE_SIZE) * stripe_index + page_index 2: DIV_ROUND_UP(rbio-stripe_len, PAGE_CACHE_SIZE) * stripe_index + page_index 3: DIV_ROUND_UP(rbio-stripe_len *

[PATCH 5/6] btrfs: Use raid_write_end_io for scrub

2015-03-04 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com No need to create additional end_io function for scrub, it can use existing raid_write_end_io() instead. This patch also fixed some wrong comments. Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/raid56.c | 36

rsync vs. extent-same: this time with lock debugging (still v3.18.8)

2015-03-04 Thread Zygo Blaxell
rsync seems to get stuck just by reading the same file that extent-same is acting upon. Mar 4 21:35:08 sneezy kernel: [89798.758960] INFO: task rsync:7425 blocked for more than 1800 seconds. Mar 4 21:35:08 sneezy kernel: [89798.759007] Tainted: GW 3.18.8-zb64+ #1 Mar 4

btrfs oops while mounting fuzzed btrfs image

2015-03-04 Thread Eryu Guan
Hi, I was testing btrfs with fsfuzzer and encountered a divide error on mount, kernel version 3.19 and 4.0-rc1. I found a similar bug on kernel bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=88611 Please find the fuzzed btrfs image in the buzilla, and the following command will

[PATCH v3 1/3] Btrfs: get more accurate output in df command.

2015-03-04 Thread Dongsheng Yang
When function btrfs_statfs() calculate the tatol size of fs, it is calculating the total size of disks and then dividing it by a factor. But in some usecase, the result is not good to user. Example: # mkfs.btrfs -f /dev/vdf1 /dev/vdf2 -d raid1 # mount /dev/vdf1 /mnt # dd

[PATCH v3 2/3] Btrfs: raid56: simplify the parameter of nr_parity_stripes().

2015-03-04 Thread Dongsheng Yang
We just need the type of a chunk to calculate the number of parity stripes, but we have to pass a structure of lookup_map to it. This will prevent some callers to use it where there is no a convenient lookup_map to be passed. This patch replace the parameter of struct map_lookup * with a profile

[PATCH v3 0/3] Enhancement for df command.

2015-03-04 Thread Dongsheng Yang
Hi all, This is V3, just rebase it against 4.0-rc1. Any comment is welcome!! Thanx Dongsheng Yang (3): Btrfs: get more accurate output in df command. Btrfs: raid56: simplify the parameter of nr_parity_stripes(). Btrfs: adapt df command to RAID5/6. fs/btrfs/ctree.h | 1 -

[PATCH v3 3/3] Btrfs: adapt df command to RAID5/6.

2015-03-04 Thread Dongsheng Yang
When we use btrfs with raid5/6, the output of df is unexpected as below. Example: # mkfs.btrfs -f /dev/vdf1 /dev/vdf2 -d raid5 # mount /dev/vdf1 /mnt # dd if=/dev/zero of=/mnt/zero bs=1M count=1000 # df -h /mnt Filesystem Size Used Avail Use% Mounted on