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
-search_commit_root = 1 in find_free_dev_extent().
Tested by above script, and confirmed action with many printk.
Reported-by: Tsutomu Itoh t-i...@jp.fujitsu.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs
Itoh t-i...@jp.fujitsu.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/extent-tree.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a684086..67c85ff 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs
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, this is
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 zhao...@cn.fujitsu.com
If we have any chance to make
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
utility required warning with empty utility name
On Mon, Mar 16, 2015 at 9:14 AM, Zhaolei zhao...@cn.fujitsu.com wrote:
From: Zhao Lei zhao...@cn.fujitsu.com
In generic/019, if we hadn't install fio, we will get following output:
FSTYP -- btrfs
PLATFORM -- Linux/x86_64
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 array be inlined
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
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_range()
On Wed, Feb 25
Hi, Filipe
From: Filipe David Manana [mailto:fdman...@gmail.com]
On Tue, Feb 24, 2015 at 3:37 PM, Zhaolei zhao...@cn.fujitsu.com wrote:
From: Zhao Lei zhao...@cn.fujitsu.com
Above BUG_ON() was triggered only one time in my test, but hadn't
happened again in same env.
The reason
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:
---
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 wrote:
From: Zhao Lei zhao
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: fix
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 replace of a missing RAID 5/6
device
Hi
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
, Zhaolei wrote:
From: Zhao Lei zhao...@cn.fujitsu.com
Steps to reproduce:
while true; do
dd if=/dev/zero of=/btrfs_dir/file count=[fs_size * 75%]
rm /btrfs_dir/file
sync
done
And we'll see dd failed because btrfs return NO_SPACE.
Reason:
Normally
and make code more readable.
Reported-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/tree-log.c | 43 +--
1 file changed, 17 insertions(+), 26 deletions(-)
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree
Following arguments are not used in tree-log.c:
insert_one_name(): path, type
wait_log_commit(): trans
wait_for_writer(): trans
This patch remove them.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/tree-log.c | 25 +++--
1 file changed, 11 insertions(+), 14
-scrub.c
I'll convert others these days, and new code can use these function
directly.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
cmds-scrub.c | 171 +--
utils.c | 20 +++
utils.h | 12 +
3 files changed, 117 insertions
rec-crossing_stripes is not initialized in allocate place,
and have possibility causing wrong report for normal tree block.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
cmds-check.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmds-check.c b/cmds-check.c
index 4f18e45..2e6dc68
, it makes other
code simple(done in [PATCH 2..5]).
Zhao Lei (5):
btrfs: scrub: setup all fields for sblock_to_check
btrfs: Reset sblock-xxx_error stats before calling
scrub_recheck_block_checksum
btrfs: Use scrub_checksum_data and scrub_checksum_tree_block
We should reset sblock-xxx_error stats before calling
scrub_recheck_block_checksum().
Current code run correctly because all sblock are allocated by
k[cz]alloc(), and the error stats are not got changed.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 4
1 file
We can use existing scrub_checksum_data() and scrub_checksum_tree_block()
for scrub_recheck_block_checksum(), instead of write duplicated code.
It is base on patch of:
setup all fields for sblock_to_check
which make this merge possible.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs
in
scrub_setup_recheck_block(), for:
1: more cleanup for function arg, local variable
2: to make sblock_to_check complete, then we can use sblock_to_check
without concern about some uninitialized member.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 12
1
We don't need pass so many arguments for recheck sblock now,
this patch cleans them.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 28
1 file changed, 8 insertions(+), 20 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index
It is useless.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index bdf44c9..daf75ac 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2459,8 +2459,7
Hi, Byongho Lee
-Original Message-
From: linux-btrfs-ow...@vger.kernel.org
[mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Byongho Lee
Sent: Friday, August 21, 2015 11:10 AM
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: fix memory leaks in error path
This
Reviewed-by: Zhao Lei zhao...@cn.fujitsu.com
-Original Message-
From: linux-btrfs-ow...@vger.kernel.org
[mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Byongho Lee
Sent: Friday, August 21, 2015 4:52 PM
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2] btrfs-progs: fix
Hi, Dan Carpenter
Thanks for reporting this problem.
Keeping code in good logic can reduce bug and make it easy to maintenance.
-Original Message-
From: linux-btrfs-ow...@vger.kernel.org
[mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Dan Carpenter
Sent: Friday, August 14,
in other tools, for ex:
cmd-check.c: the function is:
cmd_check()-check_mounted()- ... - btrfs_scan_one_device()
...
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
cmds-check.c | 1 +
cmds-device.c | 4
cmds-replace.c | 2 ++
mkfs.c | 1 +
4 files changed, 8 insertions
If more than one fs_devices in fs_uuids list(as mkfs.btrfs), we need
close them all before exit.
This function is for above propose.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
volumes.c | 11 +++
volumes.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/volumes.c b
Hi, Jonathan Panozzo,
-Original Message-
From: linux-btrfs-ow...@vger.kernel.org
[mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Chris Murphy
Sent: Thursday, August 20, 2015 9:56 AM
To: Jonathan Panozzo j...@lime-technology.com; Btrfs BTRFS
linux-btrfs@vger.kernel.org
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
to:
ERROR: scrubbing /var/ltf/tester/scratch_mnt failed for device id 5, ret=1,
errno=0(Success)
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
cmds-scrub.c | 34 +++---
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index
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 ++-
1 file changed, 10
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 b/fs/btrfs/scrub.c
index cbfb8c7..a882a34
...@cn.fujitsu.com
Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
)
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 Sterba dste...@suse.cz
Zhao Lei
to
inc_block_group_ro/dec_block_group_ro.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
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 zhao...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff
objectid's init-value is not used in any case, remove it.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
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 zhao...@cn.fujitsu.com
---
fs/btrfs/relocation.c | 4
1 file changed, 4
Reviewed-by: Zhao Lei zhao...@cn.fujitsu.com
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 messages
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_block_group()
On Wed, Aug 05
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] btrfs-progs: add newline to some
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 message in scrub
On Wed
switch statement is more suitable for outputing currsponding message
for errno.
Suggested-by: David Sterba dste...@suse.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
cmds-scrub.c | 33 ++---
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/cmds
to:
ERROR: scrubbing /var/ltf/tester/scratch_mnt failed for device id 5, ret=1,
errno=0(Success)
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
These arguments are not used in functions, remove them for cleanup
and make kernel stack happy.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
fs/btrfs/ctree.h | 3 +--
fs/btrfs/relocation.c | 13 +
fs/btrfs/transaction.c | 2 +-
3 files changed, 7 insertions(+), 11
These wrong comment was copyed from another function(expired) from
init, this patch fixed them.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
Because it is never used.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
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
Added
some.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
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
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 when resize
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 either
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:1956!,
in btrfs_balance()
nice clean up thanks. but... more below.
On 07/16/2015 08:15 PM, Zhaolei wrote:
From: Zhao Lei zhao...@cn.fujitsu.com
Code for updating fs_info-num_tolerated_disk_barrier_failures in
btrfs_balance() lacks raid56 support.
Reason:
Above code was wroten in 2012
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] btrfs: Add raid56 support for updating
small logic cleanup.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
---
cmds-replace.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index ce91787..134addf 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -405,7 +405,6
Hi, Filipe Manana
> -Original Message-
> From: Filipe Manana [mailto:fdman...@gmail.com]
> Sent: Friday, October 23, 2015 11:17 PM
> To: Jeff Mahoney <je...@suse.com>
> Cc: Zhao Lei <zhao...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH]
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 <zhao...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] btrfs: Remove code for no
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
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 <dste...@suse.cz>
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
btrfs.c | 9
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 <zhao...@cn.fujitsu.com>
---
extent-tree.c | 2 +-
1
Add missing close_ctree() to btrfs-select-super.c to avoid memory leak.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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-
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 <zhao...@cn.fujitsu.com>
---
cmds-check.c | 1 -
cmds-device.c | 3 ---
cmds-replace.c | 2 --
3 files chan
This patch add all missing btrfs_close_all_devices() to standalone
tools in btrfs progs, to avoid memory leak.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
btrfs-calc-size.c| 1 +
btrfs-debug-tree.c | 5 -
btrfs-find-root.c| 1 +
btrfs-map-logical.c | 1 +
btrfs-
To avoid using uninitialized value in btrfs_search_slot().
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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
fslabel need to be freed before exit.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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
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 <zhao...@cn.fujitsu.com>
---
btrfs-cal
exception
This patch add a condition check for above case.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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
comparer_set, which was allocated by malloc(), should be free before
function return.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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
---
for condition in handle_options() to make line short.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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/b
with 10 mount options include nodatacow.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/scrub.c | 669 ---
2 files changed, 670 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 9
ailed because no space in device.
Fix:
When set_block_ro failed for metadata chunk, it is not a problem
because scrub_lock forbids commit_trancaction.
Let replace continue in this case is no problem.
Tested by above script, and xfstests/011, plus 100 times xfstests/070.
Signed-off-by: Zhao Lei <zhao...@
Hi, Filipe Manana
> -Original Message-
> From: Filipe Manana [mailto:fdman...@gmail.com]
> Sent: Monday, November 16, 2015 6:57 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] btrfs: Continue replace when set_blo
Hi, Filipe Manana
Thanks for review.
> -Original Message-
> From: Filipe Manana [mailto:fdman...@gmail.com]
> Sent: Friday, November 13, 2015 8:02 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] btrfs: Continue r
Hi, Filipe Manana
> -Original Message-
> From: linux-btrfs-ow...@vger.kernel.org
> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Filipe Manana
> Sent: Monday, November 16, 2015 6:27 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.
Let replace continue in this case is no problem.
Tested by above script, and xfstests/011, plus 100 times xfstests/070.
Changelog v1->v2:
1: Add detail comments in source and commit-message.
2: Add dmesg detail into commit-message.
3: Limit return value of -ENOSPC to be passed.
All suggested
Hi, Anand Jain
> -Original Message-
> From: Anand Jain [mailto:anand.j...@oracle.com]
> Sent: Monday, November 09, 2015 6:34 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org; dste...@suse.cz
> Subject: Re: [PATCH 1/3] btrfs-progs: cmds-d
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 sblock->xx
Argument of char *path in _cmd_device_usage() is not necessary,
remove it.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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-de
Switch to common warning()/error() for cmds-device.c.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-device.c | 57 +++--
1 file changed, 23 insertions(+), 34 deletions(-)
diff --git a/cmds-device.c b/cmds-device.c
index 2
1: Remove more_than_one variant, use iterator's value instead
2: Remove "out" mark, use break instead.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-device.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/cmds-device.c b/cmds-device
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 <zhao...@cn.fujitsu.com>
---
task-utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/task-uti
_count -> device_total_bytes
To make code more readable.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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,
Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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_h
Variant named dev_uuid and uuid_unparse() for set its value are
not used, remove it.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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 +
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
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.
Hi, David Sterba
> -Original Message-
> From: David Sterba [mailto:dste...@suse.cz]
> Sent: Friday, October 30, 2015 9:36 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH 5/6] btrfs-progs: free comparer_set in cmd
v
Suggested-by: Jeff Mahoney <je...@suse.com>
Changelog v1->v2:
1: Put code of checking block_group->list into
semaphore of space_info->groups_sem.
Noticed-by: Filipe Manana <fdman...@gmail.com>
Reviewed-by: Filipe Manana <fdman...@suse.com>
Signed-off-by: Z
>v2:
1: Update patch description of "Fix" field
2: Use BTRFS_BLOCK_GROUP_DATA for btrfs_force_chunk_alloc instead
of 1
3: Only reserve chunk when doing balance on data chunk.
All suggested-by: Filipe Manana <fdman...@gmail.com>
Reviewed-by: Filipe Manana <fdman...@suse.com
No need to use root->fs_info in btrfs_delete_unused_bgs(),
use fs_info directly instead.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tre
Hi, Anna Schumaker
This patchset compile ok in x86 and x86_64 target,
But failed in arm when compiling btrfs dir, and output following error message:
:1304:2: warning: #warning syscall copy_file_range not implemented
[-Wcpp]
Reproduce:
merge commands:
cd /mnt/big1/linux
git fetch -q --all
This patch add all missing close_ctree and btrfs_close_all_devices
to several tools in btrfs progs, to avoid memory leak.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
btrfs-calc-size.c| 1 +
btrfs-debug-tree.c | 5 -
btrfs-find-root.c| 1 +
btrfs-map-logical.c
/tmp/123'
ERROR: cannot create subvolume - Inappropriate ioctl for device
#
After patch:
# btrfs subvolume create /mnt/tmp/123
ERROR: not btrfs filesystem: /mnt/tmp
#
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-subvolume.
# ./btrfs qgroup show /mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
# ./btrfs qgroup limit 1G 1/5 /mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-qgroup.c | 24
1 file changed, 8 insertions(
ts /mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
# ./btrfs replace start /dev/vdd /dev/vde /mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-device.c | 13 ++---
cmds-replace.c | 13 ++--
1 - 100 of 263 matches
Mail list logo