New hang (Re: Kernel traces), sysreq+w output

2019-01-25 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>Qu Wenruo wrote: > It's caused by qgroup, and a dead lock on btrfs_drop_snapshot(). > Please either disable qgroup or apply this patch to solve it: > https://patchwork.kernel.org/patch/10725371/ >>Ok, booting the system

Re: New hang (Re: Kernel traces), sysreq+w output

2019-01-25 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >Stephen R. van den Berg wrote: >>Stephen R. van den Berg wrote: >>>Qu Wenruo wrote: >> It's caused by qgroup, and a dead lock on btrfs_drop_snapshot(). >> Please either disable qgroup or apply this patch to solve it: >> https://patchwork.kernel.org/patch

Re: kernel calltraces with btrfs and bonnie++

2019-01-25 Thread Stefan K
so a simple btrfs fi resize -4k / do that trick? On Friday, January 25, 2019 3:51:12 PM CET Qu Wenruo wrote: > > On 2019/1/25 下午3:44, Stefan K wrote: > > since it is my /-root FS its not possible to do that online? > > > > > > > >> You could resize the fs by -4K and it should make the warni

Re: [PATCH v4 01/12] btrfs: Always output error message when key/level verification fails

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 03/12] btrfs: disk-io: Show the timing of corrupted tree block explicitly

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 04/12] btrfs: extent_io: Move the BUG_ON() in flush_write_bio() one level up

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 05/12] btrfs: extent_io: Kill the BUG_ON() in extent_write_full_page()

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 06/12] btrfs: extent_io: Kill the BUG_ON() in btree_write_cache_pages()

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 07/12] btrfs: extent_io: Kill the dead branch in extent_write_cache_pages()

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 10/12] btrfs: extent_io: Kill the BUG_ON() in extent_write_cache_pages()

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH v4 11/12] btrfs: extent_io: Kill the BUG_ON() in extent_writepages()

2019-01-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH RESEND 1/2] btrfs-progs: check for no result before using results

2019-01-25 Thread Anand Jain
On 1/16/19 11:13 AM, Anand Jain wrote: User space understands the ioctl BTRFS_IOC_DEV_REPLACE command status using the struct btrfs_ioctl_dev_replace_args::result, and so userspace initializes this to BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT, so exclude this value in checking for the error. S

[PATCH 1/2] fstests: btrfs/081 declare local variables as local

2019-01-25 Thread fdmanana
From: Filipe Manana Some variables inside the test's functions were used as local but were not being declared as such. Add the local declaration for them. Signed-off-by: Filipe Manana --- tests/btrfs/081 | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/btrfs/08

[PATCH 2/2] fstests: btrfs/081, fix killing of reader loop subshell

2019-01-25 Thread fdmanana
From: Filipe Manana The test creates a subshell that keeps running the 'cat' command against a test file in an infinite loop, and after it kills the subshell it unmounts the filesystem, after which point any 'cat' subcommand that runs after or at that time will fail resulting in an unexpected gol

[PATCH] Btrfs: fix deadlock when allocating tree block during leaf/node split

2019-01-25 Thread fdmanana
From: Filipe Manana When splitting a leaf or node from one of the trees that are modified when flushing pending block groups (extent, chunk, device and free space trees), we need to allocate a new tree block, which in turn can result in the need to allocate a new block group. After allocating the

Re: [PATCH] btrfs: Handle ENOMEM gracefully in cow_file_range_async

2019-01-25 Thread David Sterba
On Wed, Jan 09, 2019 at 04:43:03PM +0200, Nikolay Borisov wrote: > If we run out of memory during delalloc filling in compress case btrfs > is going to BUG_ON. This is unnecessary since the higher levels code > (btrfs_run_delalloc_range and its callers) gracefully handle error > condtions and error

Re: [PATCH] btrfs: Handle ENOMEM gracefully in cow_file_range_async

2019-01-25 Thread Nikolay Borisov
On 25.01.19 г. 17:05 ч., David Sterba wrote: > On Wed, Jan 09, 2019 at 04:43:03PM +0200, Nikolay Borisov wrote: >> If we run out of memory during delalloc filling in compress case btrfs >> is going to BUG_ON. This is unnecessary since the higher levels code >> (btrfs_run_delalloc_range and its c

Re: Retrieving CSUM-Tree

2019-01-25 Thread Tobias Reinhard
Am 13.01.2019 um 12:02 schrieb Qu Wenruo: On 2019/1/13 下午6:19, Tobias Reinhard wrote: Hi, I want to read the complete CSUM-Tree from userspace. I tried it via the ioctl. This is what the code looks like: struct btrfs_sv2_args sv2_args; int fd = open(filename, O_RDONLY); sv2_args.key.tree_id =

Re: [PATCH] btrfs: Handle ENOMEM gracefully in cow_file_range_async

2019-01-25 Thread Filipe Manana
On Fri, Jan 25, 2019 at 3:08 PM David Sterba wrote: > > On Wed, Jan 09, 2019 at 04:43:03PM +0200, Nikolay Borisov wrote: > > If we run out of memory during delalloc filling in compress case btrfs > > is going to BUG_ON. This is unnecessary since the higher levels code > > (btrfs_run_delalloc_range

Re: Retrieving CSUM-Tree

2019-01-25 Thread Hans van Kranenburg
On 1/25/19 5:59 PM, Tobias Reinhard wrote: > Am 13.01.2019 um 12:02 schrieb Qu Wenruo: >> >> On 2019/1/13 下午6:19, Tobias Reinhard wrote: >>> Hi, >>> >>> I want to read the complete CSUM-Tree from userspace. I tried it via the >>> ioctl. This is what the code looks like: >>> >>> struct btrfs_sv2_arg

Re: [PATCH RFC] fstests: btrfs: Test if balance takes too long time or return -ENOSPC unexpected

2019-01-25 Thread David Sterba
On Mon, Jan 14, 2019 at 04:20:43PM +0800, Qu Wenruo wrote: > Kernel commit 64403612b73a ("btrfs: rework > btrfs_check_space_for_delayed_refs") is introducing a regression for > btrfs balance performance. > > Originally, the workload used in the test case only takes seconds for > balance on v4.20 w

Re: Retrieving CSUM-Tree

2019-01-25 Thread Tobias Reinhard
Am 25.01.2019 um 19:05 schrieb Hans van Kranenburg: On 1/25/19 5:59 PM, Tobias Reinhard wrote: Am 13.01.2019 um 12:02 schrieb Qu Wenruo: On 2019/1/13 下午6:19, Tobias Reinhard wrote: Hi, I want to read the complete CSUM-Tree from userspace. I tried it via the ioctl. This is what the code looks

Re: Retrieving CSUM-Tree

2019-01-25 Thread Hans van Kranenburg
On 1/25/19 9:45 PM, Tobias Reinhard wrote: > Am 25.01.2019 um 19:05 schrieb Hans van Kranenburg: >> On 1/25/19 5:59 PM, Tobias Reinhard wrote: >>> Am 13.01.2019 um 12:02 schrieb Qu Wenruo: On 2019/1/13 下午6:19, Tobias Reinhard wrote: > Hi, > > I want to read the complete CSUM-Tree f

Re: Retrieving

2019-01-25 Thread Zygo Blaxell
On Sun, Jan 13, 2019 at 11:19:04AM +0100, Tobias Reinhard wrote: > I want to read the complete CSUM-Tree from userspace. I tried it via the > ioctl. This is what the code looks like: > > struct btrfs_sv2_args sv2_args; > int fd = open(filename, O_RDONLY); > sv2_args.key.tree_id = BTRFS_CSUM_TREE_O

Re: [PATCH RFC] fstests: btrfs: Test if balance takes too long time or return -ENOSPC unexpected

2019-01-25 Thread Qu Wenruo
On 2019/1/26 上午2:57, David Sterba wrote: > On Mon, Jan 14, 2019 at 04:20:43PM +0800, Qu Wenruo wrote: >> Kernel commit 64403612b73a ("btrfs: rework >> btrfs_check_space_for_delayed_refs") is introducing a regression for >> btrfs balance performance. >> >> Originally, the workload used in the test

Re: [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR

2019-01-25 Thread YueHaibing
On 2019/1/25 9:59, Qu Wenruo wrote: > > > On 2019/1/25 上午9:50, YueHaibing wrote: >> Change the call to PTR_ERR to access the value just tested by IS_ERR. >> >> Fixes: 2b35a512e9cf ("btrfs: qgroup: Use delayed subtree rescan for balance") >> Signed-off-by: YueHaibing >> --- >> fs/btrfs/qgroup

Re: Incremental receive completes succesfully despite missing files

2019-01-25 Thread Dennis Katsonis
On 1/25/19 4:22 AM, Chris Murphy wrote: > On Thu, Jan 24, 2019 at 3:40 AM Dennis K wrote: >> >> The fact is, this thread is the first time I've seen explicitly written >> that parents must be the same at receiving and sending ends, or else >> btrfs-send/receive will produce a subvolume which diffe