[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 --- fs/btrfs/async-thread.c | 7 include/trace/events/btrfs.h | 82 2 files changed, 89

[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 --- fs/btrfs/async-thread.c | 6 +++--- fs/btrfs/async-thread.h | 20 +++- 2 files changed, 14

[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 --- fs/btrfs/async-thread.c | 7 include/trace/events/btrfs.h | 82 2 files changed, 89

[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 --- fs/btrfs/async-thread.c | 6 +++--- fs/btrfs/async-thread.h | 20 +++- 2 files changed, 14

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, althou

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

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 104857

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 > --- > 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 > --- a/fs/

[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 --- f

[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 --- utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.c b/utils.c index 93cf9ac..b809bc5 100644 --- a/utils.c +++ b/utils.c @@ -2067,6 +

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

2014-03-13 Thread quwen...@cn.fujitsu.com
Valgrind reports memleak in btrfs_scan_one_device() about allocating btrfs_device but on btrfs_close_devices() they are not reclaimed. Although not a bug since after btrfs_close_devices() btrfs will exit so memory will be reclaimed by system anyway, it's better to fix it anyway. Signed-off-by: Qu

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

2014-03-15 Thread quwen...@cn.fujitsu.com
On Fri, 14 Mar 2014 15:39:03 +0100, David Sterba wrote: > On Thu, Mar 06, 2014 at 04:19:50AM +0000, quwen...@cn.fujitsu.com wrote: >> @@ -23,11 +23,13 @@ >> struct btrfs_workqueue; >> /* Internal use only */ >> struct __btrfs_workqueue; >> +struct btrfs_work

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

2014-03-18 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 . This patch fixes the description Signed-off-by: Qu Wenruo --- cmds-device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmds-device.c b/cmds-devic

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

2014-03-18 Thread quwen...@cn.fujitsu.com
Fix memleak in get_raid56_used(). Signed-off-by: Qu Wenruo --- 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 @@ -352,6 +352,7 @@ static int g

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

2014-03-18 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 --- man/btrfs.8.in | 184 ---

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

2014-03-26 Thread quwen...@cn.fujitsu.com
When testing fsstress with snapshot making background, some snapshot following problem. Snapshot 270: inode 323: size 0 Snapshot 271: inode 323: size 349145 |---Hole---|-Empty gap---|---Hole-| 0 122880 172032349145 Snapshot 272: inod