[PATCH] btrfs-progs: fsck-tests: Cleanup the restored image for 028

2018-02-07 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- tests/fsck-tests/028-unaligned-super-dev-sizes/test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/fsck-tests/028-unaligned-super-dev-sizes/test.sh b/tests/fsck-tests/028-unaligned-super-dev-sizes/test.sh index 3928f548c3f9..4bbcfbae662e 100755 --- a/

[PATCH] btrfs-progs: ctree: Add extra level check for read_node_slot()

2018-02-07 Thread Qu Wenruo
Strangely, we have level check in btrfs_print_tree() while we don't have the same check in read_node_slot(). That's to say, for the following corruption, btrfs_search_slot() or btrfs_next_leaf() can return invalid leaf: Parent eb: node XX level 1 ^^^ Child sh

[PATCH] btrfs: Don't hardcode the csum size in btrfs_ordered_sum_size

2018-02-07 Thread Nikolay Borisov
Currently the function uses a hardcoded value for the checksum size of a sector. This is fine, given that we currently support only a single algorithm, whose checksum is 4 bytes == sizeof(u32). Despite not having other algorithms, btrfs' design supports using a different algorithm whith different s

Re: [PATCH] btrfs-progs: fsck-tests: Cleanup the restored image for 028

2018-02-07 Thread Qu Wenruo
Please ignore this one. I just forgot to remove unrelated patch. Thanks, Qu On 2018年02月07日 17:17, Qu Wenruo wrote: > Signed-off-by: Qu Wenruo > --- > tests/fsck-tests/028-unaligned-super-dev-sizes/test.sh | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tests/fsck-tests/028-unaligne

Re: [PATCH] btrfs: Don't hardcode the csum size in btrfs_ordered_sum_size

2018-02-07 Thread Qu Wenruo
On 2018年02月07日 17:19, Nikolay Borisov wrote: > Currently the function uses a hardcoded value for the checksum size of > a sector. This is fine, given that we currently support only a single > algorithm, whose checksum is 4 bytes == sizeof(u32). Despite not > having other algorithms, btrfs' design

Re: [PATCH] btrfs: Don't hardcode the csum size in btrfs_ordered_sum_size

2018-02-07 Thread Su Yue
On 02/07/2018 05:19 PM, Nikolay Borisov wrote: Currently the function uses a hardcoded value for the checksum size of a sector. This is fine, given that we currently support only a single algorithm, whose checksum is 4 bytes == sizeof(u32). Despite not having other algorithms, btrfs' design sup

[PATCH] btrfs-progs: tests common: remove meaningless colon in extract_image()

2018-02-07 Thread Su Yue
The colon is meaningless so remove it. Signed-off-by: Su Yue --- tests/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common b/tests/common index 8e5d0cde1b7e..7f641a004661 100644 --- a/tests/common +++ b/tests/common @@ -331,7 +331,7 @@ extract_image()

[PATCH] Btrfs: send, fix issuing write op when processing hole in no data mode

2018-02-07 Thread fdmanana
From: Filipe Manana When doing an incremental send of a filesystem with the no-holes feature enabled, we end up issuing a write operation when using the no data mode send flag, instead of issuing an update extent operation. Fix this by issuing the update extent operation instead. Trivial reprodu

[PATCH] Btrfs: skip writeback of last page when truncating file to same size

2018-02-07 Thread fdmanana
From: Filipe Manana When we truncate a file to the same size and that size is not aligned with the sector size, we end up triggering writeback (and wait for it to complete) of the last page. This is unncessary as we can not have delayed allocation beyond the inode's i_size and the goal of truncat

[PATCH] Btrfs: send, do not issue unnecessary truncate operations

2018-02-07 Thread fdmanana
From: Filipe Manana When send finishes processing an inode representing a regular file, it always issues a truncate operation for that file, even if its size did not change or the last write sets the file size correctly. In the most common cases, the issued write operations set the file to correc

Re: [PATCH] btrfs-progs: tests common: remove meaningless colon in extract_image()

2018-02-07 Thread David Sterba
On Wed, Feb 07, 2018 at 05:57:43PM +0800, Su Yue wrote: > The colon is meaningless so remove it. > > Signed-off-by: Su Yue Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH] btrfs-progs: ctree: Add extra level check for read_node_slot()

2018-02-07 Thread David Sterba
On Wed, Feb 07, 2018 at 05:18:25PM +0800, Qu Wenruo wrote: > Strangely, we have level check in btrfs_print_tree() while we don't have > the same check in read_node_slot(). > > That's to say, for the following corruption, btrfs_search_slot() or > btrfs_next_leaf() can return invalid leaf: > > Pare

Re: [PATCH] btrfs-progs: ctree: Add extra level check for read_node_slot()

2018-02-07 Thread Qu Wenruo
On 2018年02月07日 22:35, David Sterba wrote: > On Wed, Feb 07, 2018 at 05:18:25PM +0800, Qu Wenruo wrote: >> Strangely, we have level check in btrfs_print_tree() while we don't have >> the same check in read_node_slot(). >> >> That's to say, for the following corruption, btrfs_search_slot() or >> bt

[PATCH 02/14] btrfs: Open code btrfs_write_and_wait_marked_extents

2018-02-07 Thread Nikolay Borisov
btrfs_write_and_wait_transaction is essentially a wrapper of btrfs_write_and_wait_marked_extents with the addition of calling clear_btree_io_tree. Having the code split doesn't really bring any benefit. Open code the later into the former and add proper documentation header. Signed-off-by: Nikolay

[PATCH 00/14] Misc transaction cleanups

2018-02-07 Thread Nikolay Borisov
Here are a bunch of transaction-related cleanups all of them present no functional changes. The first 2 patches could be more interesting - the first one moves trans_release_metadata to transaction.c and makes it static and the second one opencodes btrfs_write_and_wait_marked_extents in its sole

[PATCH 11/14] btrfs: Remove fs_info argument from switch_commit_roots

2018-02-07 Thread Nikolay Borisov
We already have the fs_info from the passed transaction so use it directly. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index b8fd9fe8a9

[PATCH 14/14] btrfs: Remove fs_info argument of btrfs_write_and_wait_transaction

2018-02-07 Thread Nikolay Borisov
We already pass btrfs_trans_handle which contains a reference to the fs_info so use that. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c in

[PATCH 13/14] btrfs: Remove fs_info argument from btrfs_update_commit_device_bytes_used

2018-02-07 Thread Nikolay Borisov
We already pass the btrfs_transaction which references fs_info so no need to pass the later as an argument. Also use the opportunity to shorten transaction->trans. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 2 +- fs/btrfs/volumes.c | 10 +- fs/

[PATCH 10/14] btrfs: Remove root argument of cleanup_transaction

2018-02-07 Thread Nikolay Borisov
The only thing the passed root is used for is: 1. get a reference to the fs_info and to 2. call trace_btrfs_transaction_commit. We can achieve 1) by simply referring to the fs_info from passed trans object. As far as 2) is concerned cleanup_transaction is called from only one place and the 'root'

[PATCH 08/14] btrfs: Don't pass fs_info to commit_fs_roots

2018-02-07 Thread Nikolay Borisov
We already pass the transaction handle which has a reference to the fs_info. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index f24f05fb5

[PATCH 01/14] btrfs: Make btrfs_trans_release_metadata private to transaction.c

2018-02-07 Thread Nikolay Borisov
This function is only ever used in __btrfs_end_transaction and btrfs_commit_transaction so there is no need to export it via header. Let's move it closer to where it's used, make it static and remove it from the header. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/ctree.h

[PATCH 07/14] btrfs: Don't pass fs_info to btrfs_run_delayed_items/_nr

2018-02-07 Thread Nikolay Borisov
We already pass the transaction which has a reference to the fs_info, so use that. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/delayed-inode.c | 6 ++ fs/btrfs/delayed-inode.h | 6 ++ fs/btrfs/extent-tree.c | 2 +- fs/btrfs/transaction.c | 8 fs/btr

[PATCH 05/14] btrfs: Don't pass fs_info arg to btrfs_start_dirty_block_groups

2018-02-07 Thread Nikolay Borisov
It can be referenced from the passed transaction so no point in passing it as a function argument. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/transaction.c | 2 +- 3 files changed, 4 insertions(+), 5 deletion

[PATCH 09/14] btrfs: Don't pass fs_info to commit_cowonly_roots

2018-02-07 Thread Nikolay Borisov
We already pass a transaction handle which refrences the fs_info so we can grab it from there. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction

[PATCH 12/14] btrfs: Remove fs_info argument from create_pending_snapshots/create_pending_snapshot

2018-02-07 Thread Nikolay Borisov
We already pass the trans handle which has a reference to fs_info to create_pending_snapshot so we can refer to it directly. Doing this obviates the need to pass the fs_info to create_pending_snapshots as well. No functional changes. Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 10

[PATCH 06/14] btrfs: Don't pass fs_info to __btrfs_run_delayed_items

2018-02-07 Thread Nikolay Borisov
We already pass the transactino handle, which contains a refrence to the fs_info so grab it from there. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/delayed-inode.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrf

[PATCH 04/14] btrfs: Remove fs_info argument from btrfs_create_pending_block_groups

2018-02-07 Thread Nikolay Borisov
It can be referenced from the passed transaciton so no point in passing it as function argument. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 10 +- fs/btrfs/transaction.c | 6 +++--- 3 files changed, 9 insertions(+),

[PATCH 03/14] btrfs: Remove fs_info argument from btrfs_trans_release_metadata

2018-02-07 Thread Nikolay Borisov
All current callers of this function just get a reference to the trans->fs_info member and pass it as the second argument. Collapse this into the function itself. No functional changes Signed-off-by: Nikolay Borisov --- fs/btrfs/transaction.c | 14 -- 1 file changed, 8 insertions(+),

Re: [PATCH v4 2/3] btrfs-progs: introduce TEST_TOP for resources except binaries

2018-02-07 Thread David Sterba
On Tue, Feb 06, 2018 at 01:37:24PM +0800, Gu Jinxiang wrote: > Use TEST_TOP for tests/common, Documentation, images, and internal > binaries. Well, the point of TEST_TOP was also to remove the /tests/ subdirectory from the paths if it's inside git and to set it to the top directory where the expor

Crash when unraring large archives on btrfs-filesystem

2018-02-07 Thread Stefan Malte Schumacher
Hello, I have encountered what I think is a problem with btrfs, which causes my file server to become unresponsive. But let‘s start with the basic information: uname -a = Linux mars 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux btrfs –version = btrfs-progs v4.7.3 L

[josef-btrfs:current-work 3/3] block/blk-wbt.c:1005:33: error: 'struct blkcg' has no member named 'css'

2018-02-07 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git current-work head: 71fe7e0ab249e42c17f387951aa09de7cb362d35 commit: 71fe7e0ab249e42c17f387951aa09de7cb362d35 [3/3] current-work config: i386-randconfig-x010-201805 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1)

[josef-btrfs:current-work 3/3] block/bio.c:1801:2: error: implicit declaration of function 'rq_qos_done_bio'; did you mean 'rq_qos_id'?

2018-02-07 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git current-work head: 71fe7e0ab249e42c17f387951aa09de7cb362d35 commit: 71fe7e0ab249e42c17f387951aa09de7cb362d35 [3/3] current-work config: x86_64-randconfig-x008-201805 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1

[PATCH v2] btrfs-progs: ctree: Add extra level check for read_node_slot()

2018-02-07 Thread Qu Wenruo
Strangely, we have level check in btrfs_print_tree() while we don't have the same check in read_node_slot(). That's to say, for the following corruption, btrfs_search_slot() or btrfs_next_leaf() can return invalid leaf: Parent eb: node XX level 1 ^^^ Child sh

IO Error (.snapshots is not a btrfs subvolume)

2018-02-07 Thread Nick Gilmour
Hi all, I have successfully restored a snapshot of root but now when I try to make a new snapshot I get this error: IO Error (.snapshots is not a btrfs subvolume). My snapshots were within @ which I renamed to @_old. What can I do now? How can I move the snapshots from @_old/ into @ and be able to

Re: [PATCH RFC] Btrfs: expose bad chunks in sysfs

2018-02-07 Thread Liu Bo
On Tue, Feb 06, 2018 at 09:28:14AM +0800, Qu Wenruo wrote: > > > On 2018年02月06日 07:15, Liu Bo wrote: > > Btrfs tries its best to tolerate write errors, but kind of silently > > (except some messages in kernel log). > > > > For raid1 and raid10, this is usually not a problem because there is a >

Re: [PATCH RFC] Btrfs: expose bad chunks in sysfs

2018-02-07 Thread Qu Wenruo
On 2018年02月08日 06:57, Liu Bo wrote: > On Tue, Feb 06, 2018 at 09:28:14AM +0800, Qu Wenruo wrote: >> >> >> On 2018年02月06日 07:15, Liu Bo wrote: >>> Btrfs tries its best to tolerate write errors, but kind of silently >>> (except some messages in kernel log). >>> >>> For raid1 and raid10, this is usu

Re: Crash when unraring large archives on btrfs-filesystem

2018-02-07 Thread Chris Murphy
On Wed, Feb 7, 2018 at 12:57 PM, Stefan Malte Schumacher < s.schumac...@netcologne.de> wrote: > > > Feb 5 21:25:12 mars kernel: [250116.605471] Node 0 active_anon:176kB > inactive_anon:276kB active_file:14228752kB inactive_file:1631728kB > unevictable:0kB isolated(anon):0kB isolated(file):4096kB m

Re: IO Error (.snapshots is not a btrfs subvolume)

2018-02-07 Thread Chris Murphy
On Wed, Feb 7, 2018 at 6:26 PM, Nick Gilmour wrote: > Hi all, > > I have successfully restored a snapshot of root but now when I try to > make a new snapshot I get this error: > IO Error (.snapshots is not a btrfs subvolume). > My snapshots were within @ which I renamed to @_old. > What can I do n

Re: Crash when unraring large archives on btrfs-filesystem

2018-02-07 Thread Chris Murphy
Another way to test for this problem is one of the responses in that lkml thread by Btrfs list regular Duncan, about tweaking the knobs that handle dirty write caching. So you could try those suggested tweaks first, rather than changing kernels. https://lkml.org/lkml/2016/12/13/753 Chris Murphy

[PATCH v4 01/18] btrfs-progs: lowmem check: release path in repair_extent_data_item()

2018-02-07 Thread Su Yue
In repair_extent_data_item(), path is not be released if some errors occurs which causes extent buffer leak. So release path in end of the function. Reviewed-by: Qu Wenruo Signed-off-by: Su Yue --- check/mode-lowmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/check/mode-lowmem.c b/ch

[PATCH v4 02/18] btrfs-progs: lowmem check: record returned errors after walk_down_tree_v2()

2018-02-07 Thread Su Yue
In lowmem mode with '--repair', check_chunks_and_extents_v2() will fix accounting in block groups and clear the error bit BG_ACCOUNTING_ERROR. However, return value of check_btrfs_root() doesn't contain error bits. If extent tree is on error, lowmem repair always prints error and returns nonzero v

[PATCH v4 00/18] btrfs-progs: lowmem check: avoid extents overwrite

2018-02-07 Thread Su Yue
This patchset can be fetched from my github: https://github.com/Damenly/btrfs-progs/tree/lowmem based on unmerged patchset whose cover: [PATCH 0/3] btrfs-progs: Split original mode check to its own Author: Qu Wenruo I'm sorry to send patches based on unmerged patch if it let you

[PATCH v4 04/18] btrfs-progs: lowmem check: exclude extents of metadata blocks

2018-02-07 Thread Su Yue
Commit d17d6663c99c ("btrfs-progs: lowmem check: Fix regression which screws up extent allocator") removes pin_metadata_blocks() from lowmem repair. So we have to find another way to exclude extents which should be occupied by tree blocks. Introduce exclude_metadata_blocks() to mark extents of all

[PATCH v4 03/18] btrfs-progs: lowmem check: assign @parent early in repair_extent_data_item()

2018-02-07 Thread Su Yue
The variable @eb is assigned to leaf in fs_tree before insertion of backref. It will causes wrong parent of new inserted backref. Set @parent at beginning solves the problem. Reviewed-by: Qu Wenruo Signed-off-by: Su Yue --- check/mode-lowmem.c | 10 +- 1 file changed, 5 insertions(+),

[PATCH v4 07/18] btrfs-progs: lowmem check: introduce avoid_extents_overwrite()

2018-02-07 Thread Su Yue
Another global u64 last_allocated_chunk records the last chunk start allocated by lowmem repair. Although global variable is not so graceful, it simplifies codes much. avoid_extents_overwrite() prefer to allocates new chunk first. If it failed because of no space or wrong used bytes(fsck-tests/004

[PATCH v4 18/18] btrfs-progs: fsck-tests: add image no extent with normal device size

2018-02-07 Thread Su Yue
This new image only misses one extent which leads lowmem mode to allocate new chunk in repair. Original image renamed to no_extent_bad_dev.img should let lowmem mode exclude blocks in repair. Due to problems of btrfs-image, choose xz as compression tool. Signed-off-by: Su Yue --- tests/fsck-tes

[PATCH v4 08/18] btrfs-progs: lowmem check: exclude extents if init-extent-tree in lowmem

2018-02-07 Thread Su Yue
If options '--init-extent-tree' and '--mode=lowmem' are both input, all metadata blocks will be traversed twice. First one is done by pin_metadata_blocks() in reinit_extent_tree(). Second one is in check_chunks_and_extents_v2(). Excluding instead of pining metadata blocks before reinit extent tree

[PATCH v4 09/18] btrfs-progs: lowmem check: start to remove parameters @trans in lowmem

2018-02-07 Thread Su Yue
Since extents can be avoid overwrite by excluding or new chunk allocation. It's unnessesary to do all repairs in one transaction. This patch removes parameter @trans of repair_extent_data_item(). repair_extent_data_item() calls try_avoid_extents_overwrite() and starts a transaction by itself. Not

[PATCH v4 10/18] btrfs-progs: lowmem check: remove parameter @trans of delete_extent_item()

2018-02-07 Thread Su Yue
This patch removes the parameter @trans of delete_extent_item(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". This error will disappear aft

[PATCH v4 13/18] btrfs-progs: lowmem check: remove parameter @trans of check_leaf_items()

2018-02-07 Thread Su Yue
This patch removes parameter @trans of check_leaf_items(). Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". This error will disappear after removing @trans finished. Signed-off-by: Su Yue --- check/mode-lowmem.c | 5

[PATCH v4 11/18] btrfs-progs: lowmem check: remove parameter @trans of repair_chunk_item()

2018-02-07 Thread Su Yue
This patch removes parameter @trans of repair_chunk_item(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". This error will disappear after re

[PATCH v4 06/18] btrfs-progs: lowmem check: introduce try_force_cow_in_new_chunk()

2018-02-07 Thread Su Yue
Introduce create_chunk_and_block_block_group() to allocate new chunk and corresponding block group. The new function force_cow_in_new_chunk() first allocates new chunk and records its start. Then it modifies all metadata block groups cached and full. Finally it marks the new block group uncached a

[PATCH v4 14/18] btrfs-progs: lowmem check: remove parameter @trans of repair_tree_back_ref()

2018-02-07 Thread Su Yue
This patch removes parameter @trans of repair_tree_back_ref(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". This error will disappear after

[PATCH v4 17/18] btrfs-progs: lowmem check: end of removing parameters @trans in lowmem

2018-02-07 Thread Su Yue
Remove @trans in check_chunks_and_extents(). This patch let lowmem repair work again. Signed-off-by: Su Yue --- check/mode-lowmem.c | 13 - 1 file changed, 13 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 40a179f75319..4aad69fc9eb1 100644 --- a/check/mod

[PATCH v4 15/18] btrfs-progs: lowmem check: remove parameter @trans of check_btrfs_root()

2018-02-07 Thread Su Yue
Remove parameters @trans of delete_extent_item() and walk_down_tree_v2(). Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". This error will disappear after removing @trans finished. Signed-off-by: Su Yue --- check/mo

[PATCH v4 05/18] btrfs-progs: lowmem check: introduce mark/clear_block_groups_full()

2018-02-07 Thread Su Yue
Excluding or pining all metadata blocks is not time-efficient for large storage filesystems. Here is another way to mark all metadata block groups full and allocate a new chunk for CoW. So new reservered extents never overwrite extents. Introduce modify_block_groups_cache() to modify all blocks gr

[PATCH v4 16/18] btrfs-progs: lowmem check: introduce repair_block_accounting()

2018-02-07 Thread Su Yue
Introduce repair_block_accounting() which calls btrfs_fix_block_accounting() to repair block group accouting. Replace btrfs_fix_block_accounting() with the new function. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction"

[PATCH v4 12/18] btrfs-progs: lowmem check: remove parameter @trans of repair_extent_item()

2018-02-07 Thread Su Yue
This patch removes parameter @trans of repair_extent_item(). It calls try_avoid_extents_overwrite() and starts a transaction by itself. Note: This patch and next patches cause error in lowmem repair like: "Error: Commit_root already set when starting transaction". This error will disappear after r

Re: IO Error (.snapshots is not a btrfs subvolume)

2018-02-07 Thread Andrei Borzenkov
08.02.2018 06:03, Chris Murphy пишет: > On Wed, Feb 7, 2018 at 6:26 PM, Nick Gilmour wrote: >> Hi all, >> >> I have successfully restored a snapshot of root but now when I try to How exactly was it done? >> make a new snapshot I get this error: >> IO Error (.snapshots is not a btrfs subvolume).

[PATCH 2/3] btrfs-progs: add prerequisite btrfs-image for test-fuzz

2018-02-07 Thread Gu Jinxiang
Since tests/fuzz-tests/002-simple-image/test.sh need the btrfs-image for prerequisite. So add the dependency in Makefile. Signed-off-by: Gu Jinxiang --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 034c943..9299411 100644 ---

[PATCH 1/3] btrfs-progs: add prerequisite mkfs.btrfs for test-cli

2018-02-07 Thread Gu Jinxiang
Since tests/cli-tests/002-balance-full-no-filters/test.sh need the mkfs.btrfs for prerequisite. So add the dependency in Makefile. Signed-off-by: Gu Jinxiang --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 00e2137..034c943 100644 --- a/M

[PATCH 3/3] btrfs-progs: add prerequisite btrfs-convert for test-misc

2018-02-07 Thread Gu Jinxiang
Since tests/misc-tests/005-convert-progress-thread-crash/test.sh need the btrfs-convert for prerequisite. So add the dependency in Makefile. Signed-off-by: Gu Jinxiang --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9299411..7ccba62 1006

[PATCH v5 1/3] btrfs-progs: Add make testsuite command for export tests

2018-02-07 Thread Gu Jinxiang
Export the testsuite files to a separate tar. Since fsck tests depend on btrfs-corrupt-block, and misc tests depends on both btrfs-corrupt-block and fssum, so set it as prerequisites for package commad. Because, althougth fssum can be generated by source that are all in tests directory, and has no

[PATCH v5 0/3] Add support for export testsuits

2018-02-07 Thread Gu Jinxiang
Achieved: 1. export testsuite by: $ make testsuite files list in testsuites-list will be added into tarball btrfs-progs-tests.tar.gz. 2. after decompress btrfs-progs-tests.tar.gz, run test by: $ TEST=`MASK` ./tests/mkfs-tests.sh and, without MASK also be ok. replenish: $ tar -xzvf ./btrfs-prog

[PATCH v5 2/3] btrfs-progs: introduce TEST_TOP and INTERNAL_BIN for tests directory and internal binaries

2018-02-07 Thread Gu Jinxiang
Use TEST_TOP for tests directory. And INTERNAL_BIN for internal binaries. Signed-off-by: Gu Jinxiang --- tests/cli-tests.sh | 15 ++- tests/cli-tests/001-btrfs/test.sh | 2 +- tests/cli-tests/002-balance-full-no-filters/test

[PATCH v5 3/3] btrfs-progs: Add readme for export testsuits

2018-02-07 Thread Gu Jinxiang
Add the readme of command for export testsuits. And add the excute method of exported testsuits. Signed-off-by: Gu Jinxiang --- tests/README.md | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/README.md b/tests/README.md index 04d2ce2a..23f35cfc 100644 --- a/tests/README.

Re: [PATCH] btrfs: delete function btrfs_close_extra_devices()

2018-02-07 Thread Anand Jain
ping ? Thanks, Anand -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] btrfs-progs: ctree: Add extra level check for read_node_slot()

2018-02-07 Thread Nikolay Borisov
On 8.02.2018 02:59, Qu Wenruo wrote: > Strangely, we have level check in btrfs_print_tree() while we don't have > the same check in read_node_slot(). > > That's to say, for the following corruption, btrfs_search_slot() or > btrfs_next_leaf() can return invalid leaf: > > Parent eb: > node XXX

Re: Crash when unraring large archives on btrfs-filesystem

2018-02-07 Thread Nikolay Borisov
On 7.02.2018 21:57, Stefan Malte Schumacher wrote: > Hello, > > > I have encountered what I think is a problem with btrfs, which causes > my file server to become unresponsive. But let‘s start with the basic > information: > > uname -a = Linux mars 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2