[PATCH] btrfs: Change the expanding write sequence to fix snapshot related bug.

2014-03-26 Thread quwen...@cn.fujitsu.com
which will first punch a hole covering the write end if a hole is needed. Reported-by: Gui Hecheng guihc.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/file.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c

[PATCH 3/3] btrfs-progs: Modify the help string to keep consistent with man page.

2014-03-19 Thread quwen...@cn.fujitsu.com
Help string of btrfs dev scan is inconsistent with man page, which lacks the fact that -d|--all-device is conflict with device. This patch fixes the description Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- cmds-device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 1/3] btrfs-progs: Fix memleak in get_raid56_used()

2014-03-19 Thread quwen...@cn.fujitsu.com
Fix memleak in get_raid56_used(). Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- cmds-fi-disk_usage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c index a3b06be..2bd591d 100644 --- a/cmds-fi-disk_usage.c +++ b/cmds-fi-disk_usage.c

[PATCH 2/3] btrfs-progs: Fix minor problems in man page of btrfs

2014-03-19 Thread quwen...@cn.fujitsu.com
Man page of btrfs has some minor problem like: 1. Duplicant entry for filesystem df 2. Inconsistent parameters 3. Non-paired parens 4. Missing options 5. Wrong parameters This patch fixes these minor bug. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- man/btrfs.8.in | 184

[PATCH 2/2] btrfs-progs: Fix a memleak in btrfs_scan_lblkid().

2014-03-13 Thread quwen...@cn.fujitsu.com
In btrfs_scan_lblkid(), blkid_get_cache() is called but cache not freed. This patch adds blkid_put_cache() to free it. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.c b/utils.c index 93cf9ac..b809bc5 100644 --- a/utils.c

[PATCH 1/2] btrfs-progs: Fix a memleak in btrfs_scan_one_device.

2014-03-13 Thread quwen...@cn.fujitsu.com
-by: Qu Wenruo quwen...@cn.fujitsu.com --- cmds-filesystem.c | 6 ++ volumes.c | 13 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index f02e871..c9e27fc 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -651,6

[PATCH] btrfs: Add trace for btrfs_workqueue alloc/destroy

2014-03-12 Thread quwen...@cn.fujitsu.com
Since most of the btrfs_workqueue is printed as pointer address, for easier analysis, add trace for btrfs_workqueue alloc/destroy. So it is possible to determine the workqueue that a given work belongs to(by comparing the wq pointer address with alloc trace event). Signed-off-by: Qu Wenruo

Re: Building a brtfs filesystem 70M?

2014-03-11 Thread quwen...@cn.fujitsu.com
On Tue, 11 Mar 2014 09:37:00 -0700, Zach Brown wrote: There seems to be an issue if we try to build a btrfs based FS that is less than 70M, we get the following assertion failure: mkfs.btrfs: extent-tree.c:2682: btrfs_reserve_extent: Assertion `!(ret)' failed. mkfs.btrfs -b 104857600 -r

Re: [PATCH] Btrfs: add missing kfree in btrfs_destroy_workqueue

2014-03-11 Thread quwen...@cn.fujitsu.com
On Tue, 11 Mar 2014 14:31:44 +, Filipe David Borba Manana wrote: Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- fs/btrfs/async-thread.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 00623dd..66532b8 100644

Re: Kernel BUG: btrfs send - Incremental backup

2014-03-10 Thread quwen...@cn.fujitsu.com
On Mon, 10 Mar 2014 08:25:26 +0100, Swâmi Petaramesh wrote: Le lundi 10 mars 2014 02:16:01 vous avez écrit : Does the filesystem pass the btrfsck? If not, would you please try btrfsck first? It passes scrub with 0 errors... Do I need to bring it offline to pass btrfsck anyway ? Better check

Re: Kernel BUG: btrfs send - Incremental backup

2014-03-09 Thread quwen...@cn.fujitsu.com
On Sat, 8 Mar 2014 08:35:17 +0100, Swâmi Petaramesh wrote: Hi there, I tried to perform an incremental backup as described in https://btrfs.wiki.kernel.org/index.php/Incremental_Backup between 2 external USB drives, The 1st btrfs send foo/snap1 | btrfs receive bar went well, although it

[PATCH 2/2] btrfs: Add ftrace for btrfs_workqueue

2014-03-05 Thread quwen...@cn.fujitsu.com
Add ftrace for btrfs_workqueue for further workqueue tunning. This patch needs to applied after the workqueue replace patchset. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/async-thread.c | 7 include/trace/events/btrfs.h | 82

[PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type

2014-03-05 Thread quwen...@cn.fujitsu.com
The new btrfs_workqueue still use open-coded function defition, this patch will change them into btrfs_func_t type which is much the same as kernel workqueue. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/async-thread.c | 6 +++--- fs/btrfs/async-thread.h | 20

[PATCH 2/2] btrfs: Add ftrace for btrfs_workqueue

2014-03-05 Thread quwen...@cn.fujitsu.com
Add ftrace for btrfs_workqueue for further workqueue tunning. This patch needs to applied after the workqueue replace patchset. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/async-thread.c | 7 include/trace/events/btrfs.h | 82

[PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type

2014-03-05 Thread quwen...@cn.fujitsu.com
The new btrfs_workqueue still use open-coded function defition, this patch will change them into btrfs_func_t type which is much the same as kernel workqueue. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/async-thread.c | 6 +++--- fs/btrfs/async-thread.h | 20