[PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load.

2015-05-29 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com xfstests btrfs/070 sometimes failed. In my test machine, its fail rate is about 30%. In another vm(vmware), its fail rate is about 50%. Reason: btrfs/070 do replace and defrag with fsstress simultaneously, after above operation, checksum error is found

[PATCH 1/4] btrfs: Use ref_cnt for set_block_group_ro()

2015-05-29 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com More than one code call set_block_group_ro() and restore rw in fail. Old code use bool bit to save blockgroup's ro state, it can not support parallel case(it is confirmd exist in my debug log). This patch use ref count to store ro state, and rename

[PATCH 3/4] btrfs: use scrub_pause_on/off() to reduce code in scrub_enumerate_chunks()

2015-05-29 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com Use new intruduced scrub_pause_on/off() can make this code block clean and more readable. Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/scrub.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/scrub.c

[PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off()

2015-05-29 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com It can reduce current duplicated code which is similar to scrub_blocked_if_needed() but can not call it because little different. It also used by my next patch which is in same case. Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/scrub.c | 11

Re: Plans for a library for btrfs?

2015-05-29 Thread David Sterba
On Wed, May 27, 2015 at 05:39:34PM +, Duncan wrote: Stef Bon posted on Wed, 27 May 2015 14:31:28 +0200 as excerpted: I'm working on a program (using sqlite, FUSE and btrfs) to provide backup and version managment for users. They can enable the backup service for folders they own, and

Re: Plans for a library for btrfs?

2015-05-29 Thread Goffredo Baroncelli
On 2015-05-29 16:31, Roman Mamedov wrote: On Wed, 27 May 2015 14:31:28 +0200 Stef Bon stef...@gmail.com wrote: This program, which I've called fuse-backup, creates backup subvolumes and snapshots by calling an extrenal script, which does something like: btrfs subvolume snapshot -r

Re: Plans for a library for btrfs?

2015-05-29 Thread Juan Orti Alcaine
I'm not a developer, but I read this a days ago. Could it be helpful? https://blog-vpodzime.rhcloud.com/?p=61 https://github.com/rhinstaller/libblockdev 2015-05-27 14:31 GMT+02:00 Stef Bon stef...@gmail.com: Hi, I'm working on a program (using sqlite, FUSE and btrfs) to provide backup and

Re: [PATCH 3/4] btrfs: use scrub_pause_on/off() to reduce code in scrub_enumerate_chunks()

2015-05-29 Thread Omar Sandoval
On Fri, May 29, 2015 at 07:55:34PM +0800, Zhaolei wrote: From: Zhao Lei zhao...@cn.fujitsu.com Use new intruduced scrub_pause_on/off() can make this code block clean and more readable. Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com Reviewed-by: Omar Sandoval osan...@osandov.com -- Omar

Re: [PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off()

2015-05-29 Thread Omar Sandoval
On Fri, May 29, 2015 at 07:55:33PM +0800, Zhaolei wrote: From: Zhao Lei zhao...@cn.fujitsu.com It can reduce current duplicated code which is similar to scrub_blocked_if_needed() but can not call it because little different. It also used by my next patch which is in same case.

Re: Plans for a library for btrfs?

2015-05-29 Thread Roman Mamedov
On Wed, 27 May 2015 14:31:28 +0200 Stef Bon stef...@gmail.com wrote: This program, which I've called fuse-backup, creates backup subvolumes and snapshots by calling an extrenal script, which does something like: btrfs subvolume snapshot -r %PathToBackup%/ %PathToSnapshot% This works

BTRFS issue: deleting default snapshot causes kernel oops

2015-05-29 Thread Markus Schauler
Hi, I'm having an issue with Btrfs on an opensuse Tumbleweed system using kernel 4.0.4-1 Here's what happened: I use the snapper tool to create periodic snapshots of the root FS After having problems with an update, I rolled back my system by seting the default subvolume for / to snapshot 398