jitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
disk-io.c | 4 +-
disk-io.h | 2 +
scrub.c | 145 ++
3 files changed, 149 insertions(+), 2 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 8cf80
ed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 148 +++-
1 file changed, 147 insertions(+), 1 deletion(-)
diff --git a/scrub.c b/scrub.c
index 5d625e6..ebdde5b 10
on, so
they don't need any extra structures for these profiles.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Makefile | 2 +-
scrub.c | 124 +++
2 files changed, 12
old mirror_num basic one can't handle well).
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
volumes.c | 181 ++
volumes.h | 78 +++
2 files
Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Su Yue <suy.f...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 212
1 file changed, 212 insertions(+)
diff --git a/scrub.c b/scrub.c
index
return 0 if no extent is found.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
ctree.h | 2 ++
extent-tree.c | 60 +++
2 files changed, 62 insertions(+)
diff --gi
ty report, while kernel will only report data stripe error.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Su <suy.f...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Documentation/btrfs-scrub.asciidoc | 9 +++
cmds-s
check
full stripe by full stripe.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 92 +
1 file changed, 92 insertions(+)
diff --git a/scrub.c b/scrub.c
inde
From: Qu Wenruo <quwen...@cn.fujitsu.com>
Introduce function, recover_from_parities(), to recover data stripes.
It just wraps raid56_recov() with extra check functions to
scrub_full_stripe structure.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu
enruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
volumes.c | 103 +-
1 file changed, 102 insertions(+), 1 deletion(-)
diff --git a/volumes.c b/volumes.c
index 3116f8c..66fe365 100644
--- a/volumes.c
++
f-by: Su Yue <suy.f...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Makefile | 2 +-
csum.c | 134 +++
ctree.h | 4 ++
kerncompat.h | 3 ++
utils.h | 6 +++
5 files changed, 148 i
csum mismatch
Best case, just check if P/Q matches.
If P/Q matches, everything is good
Else, just P/Q is screwed up, still recoverable.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 285 ++
Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 69 +
1 file changed, 69 insertions(+)
diff --git a/scrub.c b/scrub.c
index b544587..33d5ce2 100644
--- a/scrub.c
+++ b/scru
From: Qu Wenruo <quwen...@cn.fujitsu.com>
Introduce a internal helper, write_full_stripe() to calculate P/Q and
write the whole full stripe.
This is useful to recover RAID56 stripes.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.co
which is completely valid for case like nodatasum,
it will just record it, but not report as error.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 129
1 file chang
r by sector.
And make repair to be supported.
Gu Jinxiang (1):
btrfs-progs: Introduce new btrfs_map_block function which returns more
unified result.
Qu Wenruo (14):
btrfs-progs: Allow __btrfs_map_block_v2 to remove unrelated stripes
btrfs-progs: csum: Introduce function to read out d
For any one who wants to try it, it can be get from my repo:
https://github.com/gujx2017/btrfs-progs/tree/offline_scrub
In this v6, fix for make error reported by Marco Lorenzo Crociani.
Several reports on kernel scrub screwing up good data stripes are in ML
for sometime.
And since kernel scrub
which is completely valid for case like nodatasum,
it will just record it, but not report as error.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 129
1 file chang
check
full stripe by full stripe.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 92 +
1 file changed, 92 insertions(+)
diff --git a/scrub.c b/scrub.c
inde
ty report, while kernel will only report data stripe error.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Su <suy.f...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Documentation/btrfs-scrub.asciidoc | 9 +++
cmds-s
From: Qu Wenruo
Introduce function, recover_from_parities(), to recover data stripes.
It just wraps raid56_recov() with extra check functions to
scrub_full_stripe structure.
Signed-off-by: Qu Wenruo
---
scrub.c | 51
Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Su Yue <suy.f...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 212
1 file changed, 212 insertions(+)
diff --git a/scrub.c b/scrub.c
index
From: Qu Wenruo
Introduce a internal helper, write_full_stripe() to calculate P/Q and
write the whole full stripe.
This is useful to recover RAID56 stripes.
Signed-off-by: Qu Wenruo
---
scrub.c | 44
From: Qu Wenruo
Introduce a new function, scrub_one_full_stripe(), to check a full
stripe.
It handles the full stripe scrub in the following steps:
0) Check if we need to check full stripe
If full stripe contains no extent, why waste our CPU and IO?
1) Read out full
ed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 148 +++-
1 file changed, 147 insertions(+), 1 deletion(-)
diff --git a/scrub.c b/scrub.c
index 74bfe01..01e8b6b 10
Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
scrub.c | 69 +
1 file changed, 69 insertions(+)
diff --git a/scrub.c b/scrub.c
index 05f4608..513725f 100644
--- a/scrub.c
+++ b/scru
return 0 if no extent is found.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
ctree.h | 2 ++
extent-tree.c | 60 +++
2 files changed, 62 insertions(+)
diff --gi
on, so
they don't need any extra structures for these profiles.
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Makefile | 2 +-
scrub.c | 119 +++
2 files changed, 12
From: Qu Wenruo
For READ, caller normally hopes to get what they request, other than
full stripe map.
In this case, we should remove unrelated stripe map, just like the
following case:
32K 96K
|<-request range->|
0
jitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
disk-io.c | 4 +-
disk-io.h | 2 +
scrub.c | 145 ++
3 files changed, 149 insertions(+), 2 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 8cf80
nd can even handle things
like N-way RAID1 (which old mirror_num basic one can't handle well).
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
volumes.c | 181 +
f-by: Su Yue <suy.f...@cn.fujitsu.com>
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Makefile | 2 +-
csum.c | 130 +++
ctree.h | 4 ++
kerncompat.h | 3 ++
utils.h | 6 +++
5 files changed, 144 i
sts/fuzz-tests/images/bko-154961-heap-overflow-chunk-items.raw.restored
mayfail: returned code 134 (SIGABRT), not ignored
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-check.c | 32 +---
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/cmd
For code maintainability and scalability,
replace hardcoded constant with a meaningful enum.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
mkfs/common.c | 47 ---
mkfs/common.h | 14 +-
2 files changed, 37 insertions(+), 24 del
> -Original Message-
> From: David Sterba [mailto:dste...@suse.cz]
> Sent: Tuesday, August 22, 2017 10:04 PM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] btrfs-progs: mkfs: Replace number with enum
>
> On
Add some close(fd) when error occures in mkfs.
And add close(fd) when end use it.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
mkfs/main.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/mkfs/main.c b/mkfs/main.c
index 2b109a5..ec82565 100644
--- a/mkfs/main.c
+++ b/mkfs/
Parameter fd is not used in function make_image and
traverse_directory of mkfs.
Delete it.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
mkfs/main.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index ec82565..3e9c1b8
For code maintainability and scalability,
replace number with a macro of member blocks in btrfs_mkfs_config.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
mkfs/common.c | 2 +-
mkfs/common.h | 5 -
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/mkfs/common.c
For code maintainability and scalability,
replace number with a macro of member blocks in btrfs_mkfs_config.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Changes since v1:
Missing a using place. And modify it.
mkfs/common.c | 4 ++--
mkfs/common.h | 5 -
2 files chan
subscribe linux-btrfs
subscribe linux-btrfs
Add some check for sectorsize and nodesize, make it
consistent with kernel.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
convert/main.c | 6 +-
fsfeatures.h | 2 +-
mkfs/main.c| 8 +---
utils.c| 21 +++--
4 files changed, 22 insertions(
Use macro SZ_4K to replace number 4096 when define macro
BTRFS_SUPER_INFO_SIZE.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
disk-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/disk-io.h b/disk-io.h
index dfe4cf0..5c293eb 100644
--- a/disk-io.h
+++ b/dis
Use macro SZ_4K to replace number 4096 when define macro
BTRFS_SUPER_INFO_SIZE.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
disk-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/disk-io.h b/disk-io.h
index dfe4cf0..5c293eb 100644
--- a/disk-io.h
+++ b/dis
Add some check for sectorsize and nodesize, make it
consistent with kernel.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
convert/main.c | 6 +-
fsfeatures.h | 2 +-
mkfs/main.c| 8 +---
utils.c| 21 +++--
4 files changed, 22 insertions(
Resovle the inconsistent of mount option.
Btrfs use MOUNT_OPTIONS for both scrath_dev and test_dev. Change to
MOUNT_OPTIONS for scratch mount, and TEST_FS_MOUNT_OPTS for test dev
mount.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
As mentioned by https://patchwork.kernel.org/patch/9
There is message to show user the scrath mount, but no message to
point TEST_FS_MOUNT_OPTS of test mount.
Add logic to show test mount.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
check | 1 +
common/rc | 13 +
2 files changed, 14 insertions(+)
diff --git a/c
From: Gu JinXiang <g...@cn.fujitsu.com>
Fix bug of commit 74d46992e0d9
("block: replace bi_bdev with a gendisk pointer and partitions index").
In this modify, use bio_dev(bio) to find dev state in function
__btrfsic_submit_bio. But when dev_state added to hashtable, i
From: Gu JinXiang <g...@cn.fujitsu.com>
Fix missing modify of
commit f8f84b2dfda5 ("btrfs: index check-integrity state hash by a dev_t").
Function btrfsic_dev_state_hashtable_lookup use dev_t to generate hashval
when lookup a btrfsic_dev_state in hash table. So when add a
b
In btrfs_fsck_reinit_root, when btrfs_alloc_free_block fail, it will
update on original root.
Before update it, used btrfs_mark_buffer_dirty to set the flag to EXTENT_DIRTY.
So, we should call clean_tree_block to clear the flag if update fail.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.
/home/fnst/btrfs/btrfs-progs/tests/fuzz-tests/images/bko-155621-bad-block-group-offset.raw.restored
mayfail: returned code 134 (SIGABRT), not ignored
test failed for case 003-multi-check-unmounted
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
extent-tree.
From: Gu JinXiang <g...@cn.fujitsu.com>
Fix bug of
().
Signed-off-by: Gu JinXiang <g...@cn.fujitsu.com>
---
fs/btrfs/check-integrity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 9d3854839038..
From: Gu JinXiang <g...@cn.fujitsu.com>
When quota disabled, btrfs qgroup show exit with a error message,
but the allocated memory is not freed.
By the way, this bug marked as issue#20 in github.
Signed-off-by: Gu JinXiang <g...@cn.fujitsu.com>
---
cmds-qgroup.c | 17 -
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] btrfs-progs: Resolve memory-leak in btrfs qgroup show
> when quota disabled
>
> On Tue, Sep 26, 2017 at 05:28:31PM +0800, Gu Jinxiang wrote:
> > When quota disabled, btrf
When quota disabled, btrfs qgroup show exit with a error message,
but the allocated memory is not freed.
By the way, this bug marked as issue#20 in github.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-qgroup.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
Ping
-Original Message-
From: linux-btrfs-ow...@vger.kernel.org
[mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Gu Jinxiang
Sent: Tuesday, July 18, 2017 2:34 PM
To: linux-btrfs@vger.kernel.org
Cc: quwenruo.bt...@gmx.com
Subject: [PATCH 00/15] Btrfs-progs offline scrub
For any
As comment pointed out by David, make in-place exit
to a common exit block of mkfs.
v1:
Add some close(fd) when error occures in mkfs.
And add close(fd) when end use it.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
mkfs/main.
make_btrfs is too long to understand, make creatation of root tree
in a function.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
mkfs/common.c | 136 +++---
1 file changed, 64 insertions(+), 72 deletions(-)
diff --git a/mkfs/comm
urday, September 30, 2017 2:05 AM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>
> Cc: linux-btrfs@vger.kernel.org; h...@lst.de
> Subject: Re: [PATCH] btrfs: Use bd_dev to generate index when
> dev_state_hashtable add items.
>
> On Fri, Sep 29, 2017 at 04:16:35PM +0800,
From: Gu JinXiang <g...@cn.fujitsu.com>
Fix bug of
().
Description of this bug:
Use MOUNT_OPTIONS="-o check_int" when run xfstest, device can not be
mount successfully. So xfstest can not run.
Signed-off-by: Gu JinXiang <g...@cn.fujitsu.com>
---
fs/btrfs/check-inte
From: Gu JinXiang <g...@cn.fujitsu.com>
Fix bug of commit 74d46992e0d9
("block: replace bi_bdev with a gendisk pointer and partitions index").
In this modify, use bio_dev(bio) to find dev state in function
__btrfsic_submit_bio. But when dev_state added to hashtable, i
Hi,
> -Original Message-
> From: Nikolay Borisov [mailto:nbori...@suse.com]
> Sent: Tuesday, October 17, 2017 9:36 PM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org;
> h...@lst.de
> Subject: Re: [PATCH] btrfs: Fix bug for misused
led for case 003-multi-check-unmounted
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-check.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cmds-check.c b/cmds-check.c
index 49b0792b..3f4244a2 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -4070,6 +4070,8 @@ static int chec
/bko-172811.raw.restored
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-check.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmds-check.c b/cmds-check.c
index ac0375e5..49b0792b 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -3489,9 +3489,10 @@ stat
sum
/home/adam/btrfs/btrfs-progs/tests/fuzz-tests/images/bko-156731.raw.restored
mayfail: returned code 134 (SIGABRT), not ignored
test failed for case 003-multi-check-unmounted
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-check.c | 8
1 file changed, 8 insertions
-tree
/home/adam/btrfs/btrfs-progs/tests/fuzz-tests/images/bko-172811.raw.restored
mayfail: returned code 134 (SIGABRT), not ignored
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
ctree.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ctree.c b/ctree.c
failed (ignored, ret=139): /home/adam/btrfs/btrfs-progs/btrfs check
--init-csum-tree
/home/adam/btrfs/btrfs-progs/tests/fuzz-tests/images/bko-161821.raw.restored
mayfail: returned code 139 (SEGFAULT), not ignored
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-
e the csum tree's bytenr is not correct.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-inspect-dump-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c
index 4e72c08a..9ae4eb23 100644
--- a/cmds-inspect-dump-t
Add a enum for reada of btrfs_path to be consistent with kernel.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
ctree.c | 3 ++-
ctree.h | 2 +-
extent-tree.c | 12 ++--
free-space-tree.c | 2 +-
qgroup-verify.c | 2 +-
volumes.c | 4 +
Use enum READA_BACK instead of value 1 to keep source robust.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
fs/btrfs/free-space-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index a5e34de..a
Hi,
> -Original Message-
> From: Eryu Guan [mailto:eg...@redhat.com]
> Sent: Thursday, October 26, 2017 2:52 PM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>
> Cc: fste...@vger.kernel.org; linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] xfstests: Add messag
From: Gu JinXiang <g...@cn.fujitsu.com>
btrfs-progs now support FST in read-only mode, so when space_cache=v2
enabled, this test case will fail.
Add message to help user to understand this status.
Signed-off-by: Gu JinXiang <g...@cn.fujitsu.com>
---
tests/btrfs/012 | 6 ++
1 fil
ck.
>
> So open the fs RO for rollback, to avoid v2 space cache problem.
>
> Reported-by: Gu Jinxiang <g...@cn.fujitsu.com>
> Signed-off-by: Qu Wenruo <w...@suse.com>
> ---
> convert/main.c | 8 +++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff -
When EXEC parameter is set, do not build this tool.
run the test tool with a given path.(/usr/bin, /usr/local/bin)
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Makefile| 32 +++-
tests/README.md | 10 ++
2 files changed, 41 insertions
Modify script of every test case to use executable file of the
given path(EXEC), except btrfs-corrupt-block and fssum, because
they are internal tools and will not be installed.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
tests/cli-tests/001-btrfs/test.sh
which relies on header files in
btrfs-progs.
And test-misc and test-fsck depend on btrfs-corrupt-block which is
not installed after installation of btrfs-progs.
I am wondering that it is necessary or not to modify those tests to
run outside of btrfs-progs.
Gu Jinxiang (3):
btrfs-progs: Add EXEC
Use EXEC instead of TOP when judge whether where is executable files.
And set EXEC to TOP when it is not defined in top level test script.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
tests/cli-tests.sh | 2 ++
tests/common | 18 --
tests/convert-te
Some parameter of trans is not used indeed.
Let's remove them.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
cmds-check.c | 9 -
ctree.h | 3 +--
extent-tree.c | 18 --
3 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/cmds-check.c
Some variable is never used.
Remove them.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
Android.mk | 1 -
Makefile | 2 --
2 files changed, 3 deletions(-)
diff --git a/Android.mk b/Android.mk
index 958b8bd7..de71a5d1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -38,7
> -Original Message-
> From: Qu Wenruo [mailto:quwenruo.bt...@gmx.com]
> Sent: Tuesday, October 31, 2017 6:36 PM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org
> Cc: dste...@suse.cz
> Subject: Re: [RFC PATCH 0/3] btrfs-progs: Add suppo
_u64 ctransid;
> + __u64 otransid;
> + __u64 stransid;
> + __u64 rtransid;
> + /* Time corresponds to c/o/s/rtransid */
> + struct btrfs_ioctl_timespec ctime;
> + struct btrfs_ioctl_timespec otime;
> + struct btrfs_ioctl_timespec stime;
> + s
Hi, add a missed a comment.
> -Original Message-
> From: Misono Tomohiro [mailto:misono.tomoh...@jp.fujitsu.com]
> Sent: Tuesday, May 15, 2018 3:04 PM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH v4 1/3] btrfs: A
> -Original Message-
> From: linux-btrfs-ow...@vger.kernel.org
> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Tomohiro Misono
> Sent: Friday, May 11, 2018 3:26 PM
> To: linux-btrfs@vger.kernel.org
> Subject: [PATCH v4 2/3] btrfs: Add unprivileged ioctl which returns
>
off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 292266f6ab9c..1a3506a3003d 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4473,7 +4473,7 @@ int btrfs_shri
gt; + struct {
> + __u64 subvolid;
> + __u64 dirid;
> + } rootref[BTRFS_MAX_ROOTREF_BUFFER_NUM];
> + /* out, number of found items */
> + __u8 num_items;
> + __u8 align[7];
> +};
> +
> /* Error codes as r
send/receive happens */
> + __u64 ctransid;
> + __u64 otransid;
> + __u64 stransid;
> + __u64 rtransid;
> + /* Time corresponds to c/o/s/rtransid */
> + struct btrfs_ioctl_timespec ctime;
> + struct btrfs_ioctl_timespec otime;
> + struct btrfs_ioctl_t
Hi,
> -Original Message-
> From: linux-btrfs-ow...@vger.kernel.org
> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Tomohiro Misono
> Sent: Wednesday, May 16, 2018 1:50 PM
> To: linux-btrfs@vger.kernel.org
> Subject: [PATCH v5 2/3] btrfs: Add unprivileged ioctl which returns
>
From: Gu JinXiang <g...@cn.fujitsu.com>
Add DEBUG_CFLAGS_INTERNAL to LIBBTRFSUTIL_CFLAGS for libbtrfsutil's
build.
Signed-off-by: Gu JinXiang <g...@cn.fujitsu.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index cbd85533..1e38a56f 100644
--
gt; + struct {
> + __u64 subvolid;
> + __u64 dirid;
> + } rootref[BTRFS_MAX_ROOTREF_BUFFER_NUM];
> + /* out, number of found items */
> + __u8 num_items;
> + __u8 align[7];
> +};
> +
> /* Error
Since
commit 9005b603d723 ("btrfs-progs: use libbtrfsutil for subvol show"),
BTRFS_LIST_LAYOUT_RAW has no usage.
So, remove it.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
btrfs-list.c | 20
btrfs-list.h | 3 +--
2 files changed, 1 insertion(
Since add_excluded_extent always returns 0,
no need to judge ret.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 75cfb80d2551..4d876b32e136 100644
--
set_extent_bits may return 0/-EEXIST, so return the result in
add_excluded_extent.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
Function btrfs_exclude_logged_extents may call __exclude_logged_extent
which may fail.
Propagate the failures of __exclude_logged_extent to upper caller.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 9 +++--
1 file changed, 7 insertions(+), 2 del
ogged_extent to
btrfs_exclude_logged_extents.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 75cfb80d2551..28fd71579141 100644
--- a/fs/btrfs/exte
set_extent_bits may fail, return the result in add_excluded_extent.
Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com>
Changelog:
v2-v1:
1.remove goto to make the function run linearly.
2.change commit description not pointing out the failure detail,
since set_extent_bits's failure ty
called. If
> constructed path does not exist under fd's inode, -EACCES
> will be returned.
> 3. The name of bottom subvolume is also searched and filled.
>
> Note that the maximum length of path is shorter 256 (BTRFS_VOL_NAME_MAX+1)
> bytes than ino_lookup ioctl because of space of
>
send/receive happens */
> + __u64 ctransid;
> + __u64 otransid;
> + __u64 stransid;
> + __u64 rtransid;
> + /* Time corresponds to c/o/s/rtransid */
> + struct btrfs_ioctl_timespec ctime;
> + struct btrfs_ioctl_timespec otime;
> + struct btrfs_ioctl_timespec s
efine BTRFS_INO_LOOKUP_USER_PATH_MAX (4080-BTRFS_VOL_NAME_MAX-1)
> +struct btrfs_ioctl_ino_lookup_user_args {
> + /* in, inode number containing the subvolume of 'subvolid' */
> + __u64 dirid;
> + /* in */
> + __u64 subvolid;
> + /* out, name of the subvolume of 'subvolid' */
> + char name
_uuid[BTRFS_UUID_SIZE];
> +
> + /* Transaction id indicates when change/create/send/receive happens */
> + __u64 ctransid;
> + __u64 otransid;
> + __u64 stransid;
> + __u64 rtransid;
> + /* Time corresponds to c/o/s/rtransid */
> + struct btrfs_ioctl_timespec c
From: Gu JinXiang
patch for commit 921518924084
("btrfs: handle dynamically reappearing missing device").
Since BTRFS_DEV_STATE_IN_FS_METADATA will be clear in
btrfs_open_one_device, and when alloc a new chunk in
__btrfs_alloc_chunk, device with BTRFS_DEV_STATE_IN_FS_METADATA
1 - 100 of 224 matches
Mail list logo