Hi, Sean Fu
> -Original Message-
> From: Sean Fu [mailto:fxinr...@gmail.com]
> Sent: Tuesday, September 06, 2016 11:51 AM
> To: dste...@suse.com
> Cc: c...@fb.com; anand.j...@oracle.com; fdman...@suse.com;
> zhao...@cn.fujitsu.com; linux-ker...@vger.kernel.org;
>
Hi, Qu Wenruo
> From: Qu Wenruo [mailto:quwen...@cn.fujitsu.com]
> Sent: Monday, September 05, 2016 3:57 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>; 'Sean Fu' <fxinr...@gmail.com>;
> dste...@suse.com
> Cc: c...@fb.com; anand.j...@oracle.com; fdman...@suse.com;
> linu
Hi, Sean Fu
> From: Sean Fu [mailto:fxinr...@gmail.com]
> Sent: Sunday, September 04, 2016 7:54 PM
> To: dste...@suse.com
> Cc: c...@fb.com; anand.j...@oracle.com; fdman...@suse.com;
> zhao...@cn.fujitsu.com; linux-btrfs@vger.kernel.org;
> linux-ker...@vger.kernel.org; Sean Fu
, 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 <zhao...@cn.fujitsu.com>
---
fs/btrfs/scrub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/scrub.c b/fs
Hi, Scott Talbert
> From: Zhao Lei [mailto:zhao...@cn.fujitsu.com]
> Sent: Friday, May 13, 2016 6:31 PM
> To: 'dste...@suse.cz' <dste...@suse.cz>; 'Scott Talbert'
> <scott.talb...@hgst.com>
> Cc: 'linux-btrfs@vger.kernel.org' <linux-btrfs@vger.kernel.org>
> Su
Hi, Scott Talbert
* From: David Sterba [mailto:dste...@suse.cz]
> Sent: Tuesday, May 10, 2016 1:32 AM
> To: Scott Talbert <scott.talb...@hgst.com>
> Cc: linux-btrfs@vger.kernel.org; Zhao Lei <zhao...@cn.fujitsu.com>
> Subject: Re: [PATCH] btrfs: fix memory leak during RAI
' and 'make' to compile.
#
Fixed by check return value of autoconf.
After patch:
# ./autogen.sh
...
configure.ac:132: error: possibly undefined macro: PKG_CHECK_VAR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
#
Signed-off-by: Zhao
Changelog v1->v2:
1: Add AC_SUBST(UDEVDIR)
Suggested by: Jeff Mahoney <je...@suse.com>
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4688bc7..c79472c 100644
---
Changelog v1->v2:
1: btrfs-progs: autogen: Make build success in CentOS 6 and 7
Add AC_SUBST(UDEVDIR), suggested by: Jeff Mahoney <je...@suse.com>
Zhao Lei (3):
btrfs-progs: autogen: Avoid chdir fail on dirname with blank
btrfs-progs: autogen: Make build success in CentOS 6 and
If source put in dir with blanks, as:
/var/lib/jenkins/workspace/btrfs progs
autogen will failed:
./autogen.sh: line 95: cd: /var/lib/jenkins/workspace/btrfs: No such file or
directory
Can be fixed by adding quotes into cd command.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4688bc7..a754990 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,7 @@ PKG_STATIC(UUID_LIBS_STATIC,
If source put in dir with blanks, as:
/var/lib/jenkins/workspace/btrfs progs
autogen will failed:
./autogen.sh: line 95: cd: /var/lib/jenkins/workspace/btrfs: No such file or
directory
Can be fixed by adding quotes into cd command.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.
' and 'make' to compile.
#
Fixed by check return value of autoconf.
After patch:
# ./autogen.sh
...
configure.ac:132: error: possibly undefined macro: PKG_CHECK_VAR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
#
Signed-off-by: Zhao
Hi, Dan Carpenter
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Thursday, February 18, 2016 3:02 AM
> To: zhao...@cn.fujitsu.com
> Cc: linux-btrfs@vger.kernel.org
> Subject: re: btrfs: reada: simplify dev->reada_in_flight processing
>
> Hello
Hi, David Sterba
Thanks for notice me, sorry for reply late.
> From: David Sterba [mailto:dste...@suse.cz]
> Sent: Wednesday, February 10, 2016 6:14 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: 'Chris Mason' <c...@fb.com>; 'btrfs' <linux-btrfs@vger.kernel.or
code only continue write on first case,
the second case happened in doing subvolume.
Fix:
Continue write when check_can_nocow() return 0 and <0.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/file.c | 37 +
1 file changed, 17 insertion
size_t write_bytes is not necessary for btrfs_copy_from_user(),
delete it.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/file.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 11fd981..e4f287c 100644
--- a/fs
wait_for_snapshot_creation() is in same group with oher two:
btrfs_start_write_no_snapshoting()
btrfs_end_write_no_snapshoting()
Rename wait_for_snapshot_creation() and move it into same place
with other two.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/ctree.h
This is some cleanup, bugfix and enhance for reada, tested by a
script running scrub and relatice trace log.
Zhao Lei (10):
btrfs: reada: Avoid many times of empty loop
btrfs: reada: Move is_need_to_readahead contition earlier
btrfs: reada: add all reachable mirrors into reada device list
If some device is not reachable, we should bypass and continus addingb
next, instead of break on bad device.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs
Current code set nritems to 0 to make for_loop useless to bypass it,
and set generation's value which is not necessary.
Jump into cleanup directly is better choise.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 40 +---
1 file c
level is not used in severial functions, remove them from arguments,
and remove relative code for get its value.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs
Move is_need_to_readahead contition earlier to avoid useless loop
to get relative data for readahead.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs
reada_start_machine_dev() already have reada_extent pointer, pass
it into __readahead_hook() directly instead of search radix_tree
will make code run faster.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 45 -
1 file c
When failed adding all dev_zones for a reada_extent, the extent
will have no chance to be selected to run, and keep in memory
for ever.
We should bypass this extent to avoid above case.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 5 +
1 file changed, 5 inse
will be selected in __reada_start_machine() for 1
times(total times in __reada_start_machine()).
Fix:
For a reada_extent without job, we don't need to run it, just return
0 to let caller break.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 2 +-
1 file c
at least one reada_extctl,
which keeps additional one refcnt for reada_extent.
But we still need this patch to make the code in pretty logic.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/r
What __readahead_hook() need exactly is fs_info, no need to convert
fs_info to root in caller and convert back in __readahead_hook()
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/ctree.h | 4 ++--
fs/btrfs/disk-io.c | 22 +++---
fs/btrfs/reada.c
Remove one copy of loop to fix the typo of iterate zones.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 902f899..53ee7b1 100644
--- a/fs/btrfs/r
We can avoid additional locking-acquirment and one pair of
kref_get/put by combine two condition.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
In rechecking zone-in-tree, we still need to check zone include
our logical address.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index d8116fe..c65b42f
code
right in logic.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 7bbd656..6fb9c37 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -265,7 +265,7 @@
'll fix raid56 readahead next.
Zhao Lei (4):
btrfs: Disable raid56 readahead
btrfs: return all mirror whether need_raid_map set or not
btrfs: Small cleanup for get index_srcdev loop
btrfs: Use direct way to determine raid56 write/recover mode
fs/btrfs/reada.c | 5 +
fs/btrfs/volume
1: Adjust condition in loop to make less TAB
2: Move btrfs_put_bbio()'s line for combine, and makes logic clean.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 42 --
1 file changed, 20 insertions(+), 22 deletions(-)
diff
hich make raid56 readahead do nothing.
Before we will fix bug in __btrfs_map_block(), we need to disable
raid56 temporary, to avoid above warning.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/reada.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fs/btrfs/rea
ed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 367e8ec..d411444 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6056,7 +6056,8 @@ int btrfs_ma
ead, and this function happened
to bypass on less mirror.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index a6df8fd..4ee429b 100644
--- a/fs/btrfs/volumes.c
ts: Fix generic/102 fail for btrfs
>
> On Thu, Dec 03, 2015 at 06:08:36PM +0800, Zhaolei wrote:
> > From: Zhao Lei <zhao...@cn.fujitsu.com>
> >
> > generic/102 sometimes fails in newest btrfs toolchain, because it use
> > non-mixed mode in default, which reques
, I'll fix it in xfstests.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index acf3ed1..ab85393 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btr
"$TEST_DIR" ||
return 1
}
umount "$TEST_DIR" || return 1
./btrfsck "$TEST_DEV" || return 1
echo
return 0
}
test_all()
{
for m_from in single dup; do
for d_from in single dup; do
for m_to in single dup; do
for d_to in singl
test_all()
{
for m_from in single dup; do
for d_from in single dup; do
for m_to in single dup; do
for d_to in single dup; do
do_dup_test "$m_from" "$d_from" "$m_to" "$d_to" || return 1
done
done
done
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, 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.
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...@
all source are modified.
4: Use this raid type manually, do some operations in fs,
no error found in command and dmesg.
Changelog v1->v2:
Fix a bug in v1 which cause no dup chunk created, found by above
check command.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
mkfs.c | 4
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
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.
_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
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
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
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-
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
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
profile.
4: We have a workaround: Create multi-partition in single device,
and btefs will treat them as multi device.
Instead of refuse -d dup, we have a better choise:
Give user a chance to select, and output a warning to notice above
problem.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.
Hi, David Sterba
> -Original Message-
> From: David Sterba [mailto:dste...@suse.cz]
> Sent: Tuesday, October 13, 2015 8:36 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: dste...@suse.cz; linux-btrfs@vger.kernel.org; c...@fb.com
> Subject: Re: [PATCH] btrfs-pr
Hi, David Sterba
Thanks for review.
> -Original Message-
> From: David Sterba [mailto:dste...@suse.cz]
> Sent: Tuesday, October 13, 2015 7:29 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org; c...@fb.com
> Subject: Re: [PATCH] btrfs-pr
Given a 200G vdd1 and 1G vdd2:
In current code:
mkfs.btrfs -f /dev/vdd1 /dev/vdd2
and
mkfs.btrfs -f /dev/vdd2 /dev/vdd1
will create different "mixed" type.
See [PATCH 2/3] for detail.
This patchset also include some small fixs.
Zhao Lei (3):
btrfs-progs: mkfs: Remove sa
No need to use complex logic for iter devs in mkfs.c,
as backup optind, increase/decrease optind and reset dev_cnt.
A simple for() loop is enough for above request.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
mkfs.c | 25 +++--
1 file changed, 7 insertions(
e.
Reason:
Current code determine "is to use mixed-type" only by
first device.
Fix:
Use mixed-type only if all device are small.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
mkfs.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/mkf
In current code, with a "BIG VOLUME" /dev/vdd2:
# ./mkfs.btrfs -f -M /dev/vdd2
SMALL VOLUME: forcing mixed metadata/data groups
...
This patch changed above output to:
Using mixed metadata/data groups
And the "SMALL VOLUME" output only when we exactly using
SMALL VOLUME.
/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 ++--
No need to cleanup fd in open_fail case, because it is not opened.
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-inspect.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cmds-inspect.c b/cmds-inspect.c
index fc3db99..879fd43 100644
--- a/cmds-inspect.c
info - Inappropriate ioctl for device
ERROR: get_df failed Inappropriate ioctl for device
#
After patch:
# ./btrfs filesystem df /mnt/tmp
ERROR: not btrfs filesystem: /mnt/tmp
#
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-fi-usage.c | 4 +---
cmds-filesystem.
disable /mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
# ./btrfs quota rescan /mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
#
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-quota.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git
-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-inspect.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/cmds-inspect.c b/cmds-inspect.c
index a13a170..40ab49b 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -116,11 +116,9 @@ stat
ERROR: not a btrfs filesystem: /mnt/tmp1
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-replace.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index 385b764..9596f2a 100644
--- a/cmds-replace.c
+++ b/cmds-
for device
There may be more info in syslog - try dmesg | tail
#
After patch:
# btrfs balance start /mnt/tmp
ERROR: not btrfs filesystem: /mnt/tmp
#
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
cmds-balance.c | 30 ++
1 file changed, 10 insertions(
/mnt/tmp1
ERROR: not a btrfs filesystem: /mnt/tmp1
Signed-off-by: Zhao Lei <zhao...@cn.fujitsu.com>
---
btrfs-fragments.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/btrfs-fragments.c b/btrfs-fragments.c
index d742f60..17768c3 100644
--- a/btrfs-fragments.c
+++ b
: It is used to open dir or file, can not use btrfs_open_dir()
instead.
Zhao Lei (11):
btrfs-progs: subvolume: use btrfs_open_dir for btrfs subvolume command
btrfs-progs: filesystem: use btrfs_open_dir for btrfs filesystem
command
btrfs-progs: balance: use btrfs_open_dir for btrfs balance
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
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
>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 if balance data chunk.
All suggested-by: Filipe Manana <fdman...@gmail.com>
Reviewed-by: Filipe Manana <fdman...@suse.com>
Signed-off
k_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: Zhao Lei <zhao...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 12 +++-
1 file changed, 11 insertions(+),
honey <je...@suse.com>
2: Add Reviewed-by: Filipe Manana <fdman...@suse.com>
Zhao Lei (2):
btrfs: Fix lost-data-profile caused by auto removing bg
btrfs: Fix lost-data-profile caused by balance bg
fs/btrfs/extent-tree.c | 12 +++-
fs/btrfs/volumes.c | 24
Hi, Filipe Manana
> -Original Message-
> From: Filipe Manana [mailto:fdman...@gmail.com]
> Sent: Wednesday, September 30, 2015 3:41 PM
> To: Zhao Lei <zhao...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH 2/2] btrfs: Fix lost-data-prof
1 - 100 of 263 matches
Mail list logo