RE: [PATCH] btrfs: Remove code for no-cow in scrub/replace

2015-10-26 Thread Zhao Lei
Hi, Jeff Mahoney Thanks for review! > -Original Message- > From: Jeff Mahoney [mailto:je...@suse.com] > Sent: Friday, October 23, 2015 11:11 PM > To: Zhao Lei ; linux-btrfs@vger.kernel.org > Subject: Re: [PATCH] btrfs: Remove code for no-cow in scrub/replace > >

RE: [PATCH] btrfs: Remove code for no-cow in scrub/replace

2015-10-26 Thread Zhao Lei
Hi, Filipe Manana > -Original Message- > From: Filipe Manana [mailto:fdman...@gmail.com] > Sent: Friday, October 23, 2015 11:17 PM > To: Jeff Mahoney > Cc: Zhao Lei ; linux-btrfs@vger.kernel.org > Subject: Re: [PATCH] btrfs: Remove code for no-cow in scrub/replace &

[PATCH v2 4/5] btrfs-progs: Add missing close_ctree to btrfs-select-super.c

2015-10-26 Thread Zhao Lei
Add missing close_ctree() to btrfs-select-super.c to avoid memory leak. Signed-off-by: Zhao Lei --- btrfs-select-super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/btrfs-select-super.c b/btrfs-select-super.c index bd44978..df74153 100644 --- a/btrfs-select-super.c +++ b/btrfs-select

[PATCH v2 2/5] btrfs-progs: Remove all btrfs_close_all_devices in sub-command

2015-10-26 Thread Zhao Lei
Since we have btrfs_close_all_devices() in btrfs's main entrance, it is not necessary to call btrfs_close_all_devices() separately in each sub-command. Signed-off-by: Zhao Lei --- cmds-check.c | 1 - cmds-device.c | 3 --- cmds-replace.c | 2 -- 3 files changed, 6 deletions(-) diff --

[PATCH v2 3/5] btrfs-progs: Add all missing btrfs_close_all_devices to standalone tools

2015-10-26 Thread Zhao Lei
This patch add all missing btrfs_close_all_devices() to standalone tools in btrfs progs, to avoid memory leak. Signed-off-by: Zhao Lei --- btrfs-calc-size.c| 1 + btrfs-debug-tree.c | 5 - btrfs-find-root.c| 1 + btrfs-map-logical.c | 1 + btrfs-select-super.c | 2 ++ btrfstune.c

[PATCH v2 1/5] btrfs-progs: btrfs: Add missing btrfs_close_all_devices for btrfs command

2015-10-26 Thread Zhao Lei
Adding a btrfs_close_all_devices() after command callback in btrfs.c can force-close all opened device before program exit, to avoid memory leak in all btrfs sub-command. Suggested-by: David Sterba Signed-off-by: Zhao Lei --- btrfs.c | 9 - 1 file changed, 8 insertions(+), 1 deletion

[PATCH v2 5/5] btrfs-progs: use system's default path for math.h

2015-10-26 Thread Zhao Lei
Line of #include "math.h" in extent-tree.c using quotas is history reason, (we have cuseom math.h in source before) Now it is better to use "<>" instead of quotas for this header file. Signed-off-by: Zhao Lei --- extent-tree.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v2 0/5] btrfs-progs: Add all missing close_ctree and btrfs_close_all_devices

2015-10-26 Thread Zhao Lei
This patch add all missing close_ctree and btrfs_close_all_devices to several tools in btrfs progs, to avoid memory leak. Changelog v1->v2: Move btrfs_close_all_devices() from cmd-XXX into btrfs.c to make code simple, and avoid similar problem in cmd-XXX in future. Zhao Lei (5): btrfs-pr

RE: [PATCH] btrfs-progs: mkfs: Enable -d dup for single device

2015-10-27 Thread Zhao Lei
Hi, David Sterba > -Original Message- > From: David Sterba [mailto:dste...@suse.cz] > Sent: Tuesday, October 27, 2015 10:20 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH] btrfs-progs: mkfs: Enable -d dup for single device > > On Tu

[PATCH 4/6] btrfs-progs: Fix uninitialized key.type for btrfs_find_free_objectid

2015-10-29 Thread Zhao Lei
To avoid using uninitialized value in btrfs_search_slot(). Signed-off-by: Zhao Lei --- inode-map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/inode-map.c b/inode-map.c index 1321bfb..346952b 100644 --- a/inode-map.c +++ b/inode-map.c @@ -44,6 +44,7 @@ int btrfs_find_free_objectid

[PATCH 3/6] btrfs-progs: free fslabel for btrfs-convert

2015-10-29 Thread Zhao Lei
fslabel need to be freed before exit. Signed-off-by: Zhao Lei --- btrfs-convert.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/btrfs-convert.c b/btrfs-convert.c index 5b9171e..1693d03 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -3027,6 +3027,9 @@ int main(int argc, char

[PATCH 2/6] btrfs-progs: Fix negative eb's ref_cnt in btrfs-calc-size

2015-10-29 Thread Zhao Lei
t_size() is only used to save node data, it don't hold ref_cnt for each eb in. Using btrfs_free_path() to free path will reduce these eb again, and cause many problems, as negative ref_cnt or invalid memory access. Signed-off-by: Zhao Lei --- btrfs-calc-size.c | 9 - 1 file

[PATCH 1/6] btrfs-progs: fix floating point exception for btrfs-calc-size

2015-10-29 Thread Zhao Lei
exception This patch add a condition check for above case. Signed-off-by: Zhao Lei --- btrfs-calc-size.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btrfs-calc-size.c b/btrfs-calc-size.c index b756693..17d44ae 100644 --- a/btrfs-calc-size.c +++ b/btrfs-calc-size.c

[PATCH 5/6] btrfs-progs: free comparer_set in cmd_qgroup_show

2015-10-29 Thread Zhao Lei
comparer_set, which was allocated by malloc(), should be free before function return. Signed-off-by: Zhao Lei --- cmds-qgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index a64b716..f069d32 100644 --- a/cmds-qgroup.c +++ b/cmds

[PATCH 6/6] btrfs-progs: Avoid use pointer in handle_options

2015-10-29 Thread Zhao Lei
for condition in handle_options() to make line short. Signed-off-by: Zhao Lei --- btrfs.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/btrfs.c b/btrfs.c index 9416a29..f881c18 100644 --- a/btrfs.c +++ b/btrfs.c @@ -172,20 +172,22 @@ static

RE: [PATCH 5/6] btrfs-progs: free comparer_set in cmd_qgroup_show

2015-11-01 Thread Zhao Lei
Hi, David Sterba > -Original Message- > From: David Sterba [mailto:dste...@suse.cz] > Sent: Friday, October 30, 2015 9:36 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 5/6] btrfs-progs: free comparer_set in cmd_qgroup_show > > On Th

[PATCH 1/2] btrfs-progs: mkfs: Round device size down to sectorsize

2015-11-02 Thread Zhao Lei
Reported-by: Qu Wenruo Signed-off-by: Zhao Lei --- utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.c b/utils.c index d17291a..b7752df 100644 --- a/utils.c +++ b/utils.c @@ -736,6 +736,8 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, u64 num_devs;

[PATCH 2/2] btrfs-progs: Rename variables in btrfs_add_to_fsid

2015-11-02 Thread Zhao Lei
tes block_count -> device_total_bytes To make code more readable. Signed-off-by: Zhao Lei --- utils.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils.c b/utils.c index b7752df..999af43 100644 --- a/utils.c +++ b/utils.c @@ -724,7 +724,7 @@ static int zero

[PATCH 2/2] btrfs-progs: mkfs: remove unused code of format uuid string

2015-11-03 Thread Zhao Lei
Variant named dev_uuid and uuid_unparse() for set its value are not used, remove it. Signed-off-by: Zhao Lei --- mkfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mkfs.c b/mkfs.c index 75fc086..d5da1fb 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1176,9 +1176,6 @@ static void

[PATCH 1/2] btrfs-progs: mkfs: output device list in sorted order

2015-11-03 Thread Zhao Lei
Signed-off-by: Zhao Lei --- mkfs.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mkfs.c b/mkfs.c index 14e7eb4..75fc086 100644 --- a/mkfs.c +++ b/mkfs.c @@ -42,6 +42,7 @@ #include "volumes.h" #include "transaction.h" #include "utils.

[PATCH] btrfs-progs: Check periodic.timer_fd's value before use

2015-11-09 Thread Zhao Lei
periodic.timer_fd's value is 0 on inititlize-failed case, if no value-checking before read(), the code will run as read(STDIN). This patch fixed above case. Signed-off-by: Zhao Lei --- task-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/task-utils.c b/task-utils.c index a4

[PATCH 3/3] btrfs-progs: Remove noused path argument in _cmd_device_usage

2015-11-09 Thread Zhao Lei
Argument of char *path in _cmd_device_usage() is not necessary, remove it. Signed-off-by: Zhao Lei --- cmds-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-device.c b/cmds-device.c index 739405b..190bed6 100644 --- a/cmds-device.c +++ b/cmds-device.c

[PATCH 1/3] btrfs-progs: cmds-device: use warning/error for error message

2015-11-09 Thread Zhao Lei
Switch to common warning()/error() for cmds-device.c. Signed-off-by: Zhao Lei --- cmds-device.c | 57 +++-- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/cmds-device.c b/cmds-device.c index 2ed32a2..e23ea61 100644 --- a/cmds

[PATCH 2/3] btrfs-progs: cleanup cmd_device_usage

2015-11-09 Thread Zhao Lei
1: Remove more_than_one variant, use iterator's value instead 2: Remove "out" mark, use break instead. Signed-off-by: Zhao Lei --- cmds-device.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cmds-device.c b/cmds-device.c index e23ea61..739405b 10

[GIT PULL] Fujitsu for 4.4

2015-11-09 Thread Zhao Lei
le", and I have queued xfstests(btrfs/generic with all mountopt) for this branch, (need about 4~5 days), and no error found until now(1 days). -- Zhao Lei (9): btrfs: scrub: set error stats when tree block spanning stripes btrfs: scrub: setup all fields for sblock_to_check btrfs: Reset sbl

RE: [PATCH 1/3] btrfs-progs: cmds-device: use warning/error for error message

2015-11-10 Thread Zhao Lei
Hi, Anand Jain > -Original Message- > From: Anand Jain [mailto:anand.j...@oracle.com] > Sent: Monday, November 09, 2015 6:34 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org; dste...@suse.cz > Subject: Re: [PATCH 1/3] btrfs-progs: cmds-device: use warning/error f

RE: [PATCH v2] fix "utility required warning" with empty utility name

2015-03-29 Thread Zhao Lei
; Subject: Re: [PATCH v2] fix "utility required warning" with empty utility name > > On Mon, Mar 16, 2015 at 9:14 AM, Zhaolei wrote: > > From: Zhao Lei > > > > In generic/019, if we hadn't install fio, we will get following output: > > FSTYP

RE: [PATCH 8/9] btrfs: wait for delayed iputs on no space

2015-04-13 Thread Zhao Lei
Hi, Chris > -Original Message- > From: Chris Mason [mailto:c...@fb.com] > Sent: Monday, April 13, 2015 10:55 PM > To: Zhaolei; linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 8/9] btrfs: wait for delayed iputs on no space > > On 04/09/2015 12:34 AM, Zhaolei wrot

RE: [PATCH 0/4] Btrfs: RAID 5/6 missing device replace

2015-06-10 Thread Zhao Lei
Hi, Omar Sandoval I tested this patchset with my script, but see general protection fault again. NODE: kvm with virtio disk ROOTFS: RHEL6 with btrfs-progs v4.0 KERNEL: v4.1-rc6 with 4 patchs in this patchset Maybe my test have small different with yours, but it seems is similar bug, could you che

RE: [PATCH 4/4] Btrfs: fix device replace of a missing RAID 5/6 device

2015-06-11 Thread Zhao Lei
Hi, Omar Sandoval > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Omar Sandoval > Sent: Monday, May 11, 2015 3:58 PM > To: linux-btrfs@vger.kernel.org > Cc: Miao Xie; Philip; Omar Sandoval > Subject: [PATCH 4/4] Btrfs

RE: [PATCH 4/4] Btrfs: fix device replace of a missing RAID 5/6 device

2015-06-12 Thread Zhao Lei
Hi, Omar Sandoval > -Original Message- > From: Omar Sandoval [mailto:osan...@osandov.com] > Sent: Friday, June 12, 2015 4:12 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org; 'Miao Xie'; 'Philip' > Subject: Re: [PATCH 4/4] Btrfs: fix device r

RE: [PATCH 6/9] btrfs: Fix NO_SPACE bug caused by delayed-iput

2015-07-07 Thread Zhao Lei
hu, Apr 09, 2015 at 12:34:41PM +0800, Zhaolei wrote: > > From: Zhao Lei > > > > Steps to reproduce: > > while true; do > > dd if=/dev/zero of=/btrfs_dir/file count=[fs_size * 75%] > > rm /btrfs_dir/file > > sync > > done > > > &g

RE: [PATCH 6/9] btrfs: Fix NO_SPACE bug caused by delayed-iput

2015-07-07 Thread Zhao Lei
Hi, Liubo > -Original Message- > From: Liu Bo [mailto:bo.li@oracle.com] > Sent: Tuesday, July 07, 2015 5:27 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 6/9] btrfs: Fix NO_SPACE bug caused by delayed-iput > > On Tue, Jul 07, 2015 a

RE: [PATCH] btrfs: Add raid56 support for updating num_tolerated_disk_barrier_failures in btrfs_balance()

2015-07-17 Thread Zhao Lei
k_barrier_failures in btrfs_balance() > > > > nice clean up thanks. but... more below. > > On 07/16/2015 08:15 PM, Zhaolei wrote: > > From: Zhao Lei > > > > Code for updating fs_info->num_tolerated_disk_barrier_failures in > > btrfs_balance() lacks

RE: [PATCH] btrfs: Add raid56 support for updating num_tolerated_disk_barrier_failures in btrfs_balance()

2015-07-20 Thread Zhao Lei
Hi, Anand Jain > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Zhao Lei > Sent: Friday, July 17, 2015 5:39 PM > To: 'Anand Jain'; linux-btrfs@vger.kernel.org > Subject: RE: [PATCH] b

RE: resize: File too large

2015-07-22 Thread Zhao Lei
Hi, Taeha Kim > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Taeha Kim > Sent: Wednesday, July 22, 2015 1:20 PM > To: linux-btrfs@vger.kernel.org > Subject: resize: File too large > > Hello, > > I met a problem whe

RE: stack trace (free_fs_root) with either fallocate + mv-across-subvolumes, or mount-wth-compress + dd

2015-07-22 Thread Zhao Lei
Hi, Sasà Vita Thanks for reporting! > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Sasà Vita > Sent: Wednesday, July 22, 2015 1:52 PM > To: linux-btrfs@vger.kernel.org > Subject: stack trace (free_fs_root) with eit

RE: [BUG] kernel BUG at fs/btrfs/scrub.c:1956!, when scrubbing freshly converted ext4

2015-07-22 Thread Zhao Lei
Hi, Chris Murphy Thanks for report this bug. > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Chris Murphy > Sent: Thursday, July 09, 2015 11:16 AM > To: Btrfs BTRFS > Subject: [BUG] kernel BUG at fs/btrfs/scrub.c:195

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

2015-07-29 Thread Zhao Lei
Hi, Chris > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Qu Wenruo > Sent: Tuesday, July 28, 2015 3:11 PM > To: Chris Mason; btrfs > Subject: Re: [GIT PULL] Fix for btrfs/070 checksum error > > Chris Mason wrote on

[PATCH] btrfs-progs: Modify confuse error message in scrub

2015-08-05 Thread Zhao Lei
message to: ERROR: scrubbing /var/ltf/tester/scratch_mnt failed for device id 5, ret=1, errno=0(Success) Signed-off-by: Zhao Lei --- cmds-scrub.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/cmds-scrub.c b/cmds-scrub.c index 7c9318

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

2015-08-05 Thread Zhao Lei
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 --- fs/btrfs/scrub.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion

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

2015-08-05 Thread Zhao Lei
Use new intruduced scrub_pause_on/off() can make this code block clean and more readable. Signed-off-by: Zhao Lei --- fs/btrfs/scrub.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index cbfb8c7..a882a34 100644 --- a/fs/btrfs

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

2015-08-05 Thread Zhao Lei
ff-by: Qu Wenruo Signed-off-by: Zhao Lei --- Changelog v3->v4: Patch v3 cause xfstests/061 failed in some case, because btrfs_inc_block_group_ro() include a btrfs_end_transaction() option, which will change datas in reloc_ctl->data_inode, and cause deadlock in reloc

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

2015-08-05 Thread Zhao Lei
10 mount options) Changelog v1->v2: 1: Update subject to reflect the problem being fixed. 2: Update description to say reason why set read-only can fix the problem. 3: Use a helper function to avoid duplicated code block for set chunk ro. All of above are suggested by: David

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

2015-08-05 Thread Zhao Lei
rw to inc_block_group_ro/dec_block_group_ro. Signed-off-by: Zhao Lei --- fs/btrfs/ctree.h | 6 +++--- fs/btrfs/extent-tree.c | 42 +- fs/btrfs/relocation.c | 14 ++ 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/fs/btrfs/ctre

[PATCH 3/3] btrfs: Cleanup: Remove chunk_objectid argument from btrfs_relocate_chunk()

2015-08-05 Thread Zhao Lei
Remove chunk_objectid argument from btrfs_relocate_chunk() because it is not necessary, it can also cleanup some code in caller for prepare its value. Signed-off-by: Zhao Lei --- fs/btrfs/volumes.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/volumes.c

[PATCH 2/3] btrfs: Cleanup: Remove objectid's init-value in create_reloc_inode()

2015-08-05 Thread Zhao Lei
objectid's init-value is not used in any case, remove it. Signed-off-by: Zhao Lei --- fs/btrfs/relocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 1659c94..4698928 100644 --- a/fs/btrfs/relocation.c +++ b/fs/

[PATCH 1/3] btrfs: Error handle for get_ref_objectid_v0() in relocate_block_group()

2015-08-05 Thread Zhao Lei
We need error checking code for get_ref_objectid_v0() in relocate_block_group(), to avoid unpredictable result, especially for accessing uninitialized value(when function failed) after this line. Signed-off-by: Zhao Lei --- fs/btrfs/relocation.c | 4 1 file changed, 4 insertions(+) diff

RE: [PATCH] btrfs-progs: Modify confuse error message in scrub

2015-08-05 Thread Zhao Lei
Hi, David Sterba Thanks for review this patch. > -Original Message- > From: David Sterba [mailto:dste...@suse.com] > Sent: Thursday, August 06, 2015 12:51 AM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH] btrfs-progs: Modify confuse error messag

RE: [PATCH 1/3] btrfs: Error handle for get_ref_objectid_v0() in relocate_block_group()

2015-08-05 Thread Zhao Lei
Hi, David Sterba > -Original Message- > From: David Sterba [mailto:dste...@suse.com] > Sent: Thursday, August 06, 2015 1:03 AM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 1/3] btrfs: Error handle for get_ref_objectid_v0() in > relocate_bloc

[PATCH v2 1/2] btrfs-progs: use switch instead of a series of ifs for output errormsg

2015-08-05 Thread Zhao Lei
switch statement is more suitable for outputing currsponding message for errno. Suggested-by: David Sterba Signed-off-by: Zhao Lei --- cmds-scrub.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/cmds-scrub.c b/cmds-scrub.c index 7c9318e

[PATCH v2 2/2] btrfs-progs: Modify confuse error message in scrub

2015-08-05 Thread Zhao Lei
message to: ERROR: scrubbing /var/ltf/tester/scratch_mnt failed for device id 5, ret=1, errno=0(Success) Signed-off-by: Zhao Lei --- cmds-scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds-scrub.c b/cmds-scrub.c index a40eecf..2529956 100644 --- a/cmds-scrub.c

RE: [PATCH] btrfs-progs: add newline to some error messages

2015-08-05 Thread Zhao Lei
Hi, Itoh > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Tsutomu Itoh > Sent: Thursday, August 06, 2015 11:06 AM > To: linux-btrfs@vger.kernel.org > Subject: [PATCH] btrfs-progs: add newline to some error messages >

RE: [PATCH] btrfs-progs: add newline to some error messages

2015-08-05 Thread Zhao Lei
Hi, Itoh-san > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Zhao Lei > Sent: Thursday, August 06, 2015 11:51 AM > To: 'Tsutomu Itoh'; linux-btrfs@vger.kernel.org > Subject: RE: [PATCH]

RE: [PATCH] btrfs-progs: add newline to some error messages

2015-08-05 Thread Zhao Lei
Hi, Itho-san > -Original Message- > From: Tsutomu Itoh [mailto:t-i...@jp.fujitsu.com] > Sent: Thursday, August 06, 2015 12:01 PM > To: Zhao Lei; linux-btrfs@vger.kernel.org > Subject: Re: [PATCH] btrfs-progs: add newline to some error messages > > On 2015/08/06

[PATCH] btrfs: Remove unnecessary variants in relocation.c

2015-08-06 Thread Zhao Lei
These arguments are not used in functions, remove them for cleanup and make kernel stack happy. Signed-off-by: Zhao Lei --- fs/btrfs/ctree.h | 3 +-- fs/btrfs/relocation.c | 13 + fs/btrfs/transaction.c | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a

[PATCH] btrfs: abort transaction on btrfs_reloc_cow_block()

2015-08-06 Thread Zhao Lei
: Zhao Lei --- fs/btrfs/ctree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 54114b4..5f745ea 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1159,8 +1159,10 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle

[PATCH 1/2] btrfs: Fix wrong comment of btrfs_alloc_tree_block()

2015-08-06 Thread Zhao Lei
These wrong comment was copyed from another function(expired) from init, this patch fixed them. Signed-off-by: Zhao Lei --- fs/btrfs/extent-tree.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a436bd5..792247f 100644 --- a/fs/btrfs

[PATCH 2/2] btrfs: Remove root argument in extent_data_ref_count()

2015-08-06 Thread Zhao Lei
Because it is never used. Signed-off-by: Zhao Lei --- fs/btrfs/extent-tree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 792247f..5f7cbd7 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c

[PATCH] btrfs: Add WARN_ON() for double lock in btrfs_tree_lock()

2015-08-06 Thread Zhao Lei
t helps us some. Signed-off-by: Zhao Lei --- fs/btrfs/locking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index f8229ef..d7e6baf 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -241,6 +241,7 @@ void btrfs_tree_read_unlock_block

RE: [PATCH V2] btrfs-progs: add newline to some error messages

2015-08-06 Thread Zhao Lei
Reviewed-by: Zhao Lei Thanks Zhaolei > -Original Message- > From: Tsutomu Itoh [mailto:t-i...@jp.fujitsu.com] > Sent: Friday, August 07, 2015 8:20 AM > To: linux-btrfs@vger.kernel.org > Cc: Zhao Lei > Subject: [PATCH V2] btrfs-progs: add newline to some error mes

RE: [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement

2016-05-16 Thread Zhao Lei
Hi, Scott Talbert > From: Zhao Lei [mailto:zhao...@cn.fujitsu.com] > Sent: Friday, May 13, 2016 6:31 PM > To: 'dste...@suse.cz' ; 'Scott Talbert' > > Cc: 'linux-btrfs@vger.kernel.org' > Subject: RE: [PATCH] btrfs: fix memory leak during RA

[PATCH] btrfs: scrub: Set bbio to NULL before calling btrfs_map_block

2016-05-17 Thread Zhao Lei
, invalid memory accessing will happened. Above case is in scrub_missing_raid56_pages(), and similar case in scrub_raid56_parity(). Signed-off-by: Zhao Lei --- fs/btrfs/scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 4678f03

RE: [PATCH 04/15] Btrfs: add ref_count and free function for btrfs_bio

2015-01-15 Thread Zhao Lei
Hi, David Sterba * From: David Sterba [mailto:dste...@suse.cz] > The cleanups look good in general, some minor nitpicks below. > > On Tue, Jan 13, 2015 at 08:34:37PM +0800, Zhaolei wrote: > > - kfree(bbio); > > + put_btrfs_bio(bbio); > > Please rename it to btrfs_put_bbio, th

RE: [PATCH 10/16] Btrfs: Avoid trustless page-level-repair in dev-replace

2015-01-19 Thread Zhao Lei
Hi, Stefan Behrens Thanks for review these patch. * From: Stefan Behrens [mailto:sbehr...@giantdisaster.de] > Sent: Monday, January 19, 2015 8:26 PM > On Mon, 19 Jan 2015 19:20:59 +0800, Zhaolei wrote: > > From: Zhao Lei > > > > Current code of page level repair for dev-

RE: [PATCH 1/2] btrfs: Fix out-of-space bug caused by searching commit_root in find_free_dev_extent()

2015-02-06 Thread Zhao Lei
'll test this way and resend. Thanks Zhaolei > That said, unless I missed something, I disagree with this patch. > > > > > Fix: > > Remove "path->search_commit_root = 1" in find_free_dev_extent(). > > > > Tested by above script, and confi

RE: [PATCH 2/2] btrfs: Set hole_size to free space in case of contains_pending_extent

2015-02-06 Thread Zhao Lei
Hi, Filipe > This was already fixed by Forrest recently. See: > https://patchwork.kernel.org/patch/5776231/ > Thanks for notice, I overlooked the second half of his patch... Please ignore it. Thanks Zhaolei > > --- > > fs/btrfs/volumes.c | 8 ++-- > > 1 file changed, 6 insertions(+), 2 de

RE: [PATCH v2] btrfs: Fix out-of-space bug

2015-02-08 Thread Zhao Lei
Yes, wil change above description. > > > > Tested for severial times by above script. > > > > Reported-by: Tsutomu Itoh > > Signed-off-by: Zhao Lei > > --- > > fs/btrfs/extent-tree.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/f

RE: [PATCH v2] Btrfs: fix BUG_ON in btrfs_orphan_add() when delete unused block group

2015-02-10 Thread Zhao Lei
Hi, Liu > Removing large amount of block group in a transaction may encounters > BUG_ON() in btrfs_orphan_add(). That is becuase > btrfs_orphan_reserve_metadata() Not big matter, s/becuase/because Thanks Zhaolei > will grab metadata reservation from transaction handle, and > btrfs_delete_unused

RE: [PATCH 01/10] btrfs: Adjust commit-transaction condition to avoid NO_SPACE more

2015-02-17 Thread Zhao Lei
Hi, > From: Zhaolei [mailto:zhao...@cn.fujitsu.com] > Subject: [PATCH 01/10] btrfs: Adjust commit-transaction condition to avoid > NO_SPACE more Sorry for title, it is only one patch. Will resend. Thanks Zhaolei > > From: Zhao Lei > > If we have any chance to make a

RE: [PATCH] Btrfs: fix allocation size calculations in alloc_btrfs_bio

2015-02-22 Thread Zhao Lei
Hi, Chris Mason * From: Chris Mason [mailto:c...@fb.com] > Sent: Friday, February 20, 2015 10:00 AM > To: linux-btrfs; Zhao Lei; dste...@suse.cz > Subject: [PATCH] Btrfs: fix allocation size calculations in alloc_btrfs_bio > > Since commit 8e5cfb55d3f (Btrfs: Make raid_map arra

RE: [PATCH 3/3] btrfs: Remove BUG_ON() when failed searching block_group_cache in unpin_extent_range()

2015-02-24 Thread Zhao Lei
Hi, Filipe > From: Filipe David Manana [mailto:fdman...@gmail.com] > > On Tue, Feb 24, 2015 at 3:37 PM, Zhaolei wrote: > > From: Zhao Lei > > > > Above BUG_ON() was triggered only one time in my test, but hadn't > > happened again in same env. > > &

RE: [PULL] [PATCH 00/11] Cleanups for 4.1

2015-02-25 Thread Zhao Lei
Hi, David * From: linux-btrfs-ow...@vger.kernel.org > Subject: [PULL] [PATCH 00/11] Cleanups for 4.1 > > Hi, > > a few cleanups that accumulated over time. No real fixes but there are changes > that may touch functionality (no fstests complaints though). > I like these cleanups. But it cause f

RE: [PATCH 3/3] btrfs: Remove BUG_ON() when failed searching block_group_cache in unpin_extent_range()

2015-02-26 Thread Zhao Lei
Hi, David Manana * From: Filipe David Manana [mailto:fdman...@gmail.com] > Sent: Thursday, February 26, 2015 5:55 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 3/3] btrfs: Remove BUG_ON() when failed searching > block_group_cache in unpin_extent_rang

RE: [PATCH 1/1] btrfs: Fix NO_SPACE bug caused by delayed-iput

2015-02-26 Thread Zhao Lei
Hi, David Sterba * From: David Sterba [mailto:dste...@suse.cz] > Sent: Friday, February 27, 2015 6:29 AM > To: Zhaolei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 1/1] btrfs: Fix NO_SPACE bug caused by delayed-iput > > On Thu, Feb 26, 2015 at 11:20:23AM +0800, Zhaolei wrote: > > --- a

<    1   2   3