Re: [PATCH] Improve balance performance when qgroups are turned on

2016-05-30 Thread Qu Wenruo
Mark Fasheh wrote on 2016/05/26 17:18 -0700: The btrfs balance operation is significantly slower when qgroups are enabled. To the best of my knowledge, a balance shouldn't have an effect on qgroups counts (extents are not changing between subvolumes), so we don't need to actually run the

Re: [PATCH] btrfs,vfs: allow FILE_EXTENT_SAME on a file opened ro

2016-05-30 Thread Adam Borowski
On Sat, May 28, 2016 at 08:56:39PM -0400, Zygo Blaxell wrote: > On Sun, May 29, 2016 at 02:21:03AM +0200, Adam Borowski wrote: > > In any case, this patch doesn't introduce any cases not already triggerable > > by root. > > It allows non-root to trigger cases that previously could only be >

Re: [1/1 v2] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-30 Thread David Sterba
On Fri, May 27, 2016 at 07:13:35AM -0400, Nicholas D Steeves wrote: > On 24 May 2016 at 06:50, David Sterba wrote: > > Sending typo fixes for all user visible text is OK and welcome anytime. > > > >> if I find any, and a strings & > >> comments review for both -progs and kernel

Re: btrfs filesystem keeps allocating new chunks for no apparent reason

2016-05-30 Thread Hans van Kranenburg
Hi, since it got any followup and since I'm bold enough to bump it one more time... :) I really don't understand the behaviour I described. Does it ring a bell with anyone? This system is still allocating new 1GB data chunks every 1 or 2 days without using them at all, and I have to use

Re: [PATCH] btrfs-progs: tests: add 020-extent-ref-cases

2016-05-30 Thread David Sterba
On Mon, May 30, 2016 at 10:58:13AM +0800, Lu Fengqi wrote: > In order to confirm that btrfsck supports to check a variety of > refs, add the > following cases: > * keyed_block_ref > * keyed_data_ref > * shared_block_ref > * shared_data_ref > * no_inline_ref (a extent item without inline ref) > *

Re: [PATCH 3/5] Btrfs: self-tests: Support non-4k page size

2016-05-30 Thread David Sterba
On Sun, May 29, 2016 at 01:17:34PM +0800, Fei Fei Xu wrote: > > There are more instances of the pointed style issues, please fix all of > > them. As the changes do not affect functionality I'll add the paches to > > for-next, but I'm expecting a v2. > Thanks, I will send out v2 soon according to

[PATCH 1/2] Btrfs: fix race between device replace and discard

2016-05-30 Thread fdmanana
From: Filipe Manana While we are finishing a device replace operation, we can make a discard operation (fs mounted with -o discard) do an invalid memory access like the one reported by the following trace: [ 3206.384654] general protection fault: [#1] PREEMPT SMP [

Re: [PATCH] btrfs: fix check_shared for fiemap ioctl

2016-05-30 Thread David Sterba
On Mon, May 16, 2016 at 11:23:50AM +0800, Lu Fengqi wrote: > +/* > + * ref_root is used as the root of the ref tree that hold a collection > + * of unique references. > + */ > +struct ref_root { > + /* > + * the unique_refs represents the number of ref_nodes with a positive > + *

Re: [PATCH 3/5] Btrfs: self-tests: Support non-4k page size

2016-05-30 Thread Feifei Xu
On 2016/5/30 21:55, David Sterba wrote: On Sun, May 29, 2016 at 01:17:34PM +0800, Fei Fei Xu wrote: There are more instances of the pointed style issues, please fix all of them. As the changes do not affect functionality I'll add the paches to for-next, but I'm expecting a v2. Thanks, I will

Re: [PATCH] btrfs: fix check_shared for fiemap ioctl

2016-05-30 Thread David Sterba
On Fri, May 27, 2016 at 09:39:53AM +0800, Qu Wenruo wrote: > Any comment? > > This patch does not fix the submitted generic/352[1] and generic/353[2] > test cases, but also introduce a much better structure and design for > later backref walk use. > > Instead of a list and do a O(n^3)~O(n^4)

Re: [PATCH] btrfs-progs: tests: run rollback after conversion

2016-05-30 Thread David Sterba
Hi Qu, the convert patchset does not pass a rollback test, fails in the case of 32k nodesize. Thre's not much info why, just 'rollback failed'. The branch that passes is 'test-rollback', it's current devel without the convert and low-mem fsck patchsets. -- To unsubscribe from this list: send the

[PATCH] btrfs-progs: tests: run rollback after conversion

2016-05-30 Thread David Sterba
Signed-off-by: David Sterba --- tests/convert-tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh index 3fce8915f94a..2806b921544b 100755 --- a/tests/convert-tests.sh +++ b/tests/convert-tests.sh @@ -138,6 +138,9 @@

Re: [PATCH] btrfs-progs: make btrfs-image restore to support dup

2016-05-30 Thread David Sterba
On Thu, May 26, 2016 at 05:43:00PM +0800, Lu Fengqi wrote: > Previously btrfs-image restore would set the chunk items to have 1 stripe, > even if the chunk is dup. If you use btrfsck on the restored file system, > some dev_extent will not find any relative chunk stripe, and the > bytes-used of

[PATCH 2/2] Btrfs: fix race between device replace and read repair

2016-05-30 Thread fdmanana
From: Filipe Manana While we are finishing a device replace operation we can have a concurrent task trying to do a read repair operation, in which case it will call btrfs_map_block() to get a struct btrfs_bio which can have a stripe that points to the source device of the

Re: btrfs filesystem keeps allocating new chunks for no apparent reason

2016-05-30 Thread Hans van Kranenburg
On 05/30/2016 09:55 PM, Duncan wrote: Hans van Kranenburg posted on Mon, 30 May 2016 13:07:26 +0200 as excerpted: [Please don't post "upside down". Reply in context under the quoted point, here the whole post, you're replying to. It makes further replies in context far easier. =:^) I've

Re: [PATCH] btrfs-progs: tests: run rollback after conversion

2016-05-30 Thread Qu Wenruo
David Sterba wrote on 2016/05/30 17:56 +0200: Hi Qu, the convert patchset does not pass a rollback test, fails in the case of 32k nodesize. Thre's not much info why, just 'rollback failed'. The branch that passes is 'test-rollback', it's current devel without the convert and low-mem fsck

Re: btrfs filesystem keeps allocating new chunks for no apparent reason

2016-05-30 Thread Duncan
Hans van Kranenburg posted on Mon, 30 May 2016 23:18:20 +0200 as excerpted: >> Snip the dump, but curious as a user (not a dev) what command you used. >> Presumably one of the debug commands which I'm not particularly >> familiar with, but I wasn't aware it was even possible. > > It's the output

Re: [PATCH] btrfs-progs: tests: run rollback after conversion

2016-05-30 Thread Qu Wenruo
Problem located. may_rollback() is still the old codes, while for new convert's metadata, it's complete OK if it's physical position is different from its logical space. Unlike the strict old condition. I'll add more check to ensure new convert can pass may_rollback() check. Thanks, Qu Qu

Re: [PATCH] btrfs: fix check_shared for fiemap ioctl

2016-05-30 Thread Qu Wenruo
David Sterba wrote on 2016/05/30 17:15 +0200: On Fri, May 27, 2016 at 09:39:53AM +0800, Qu Wenruo wrote: Any comment? This patch does not fix the submitted generic/352[1] and generic/353[2] test cases, but also introduce a much better structure and design for later backref walk use. Instead

Re: [PATCH] btrfs-progs: tests: run rollback after conversion

2016-05-30 Thread Qu Wenruo
Thanks for the report. We will check it and fix it soon. Thanks, Qu David Sterba wrote on 2016/05/30 17:56 +0200: Hi Qu, the convert patchset does not pass a rollback test, fails in the case of 32k nodesize. Thre's not much info why, just 'rollback failed'. The branch that passes is

[PATCH] fstests: btrfs: add test for qgroup handle de-refer

2016-05-30 Thread Lu Fengqi
Test if qgroup can handle de-reference reallocation. Although current qgroup can handle it, we still need to prevent any regression which may break current qgroup. Signed-off-by: Lu Fengqi --- common/rc | 4 +-- tests/btrfs/028 | 91

Re: btrfs filesystem keeps allocating new chunks for no apparent reason

2016-05-30 Thread Qu Wenruo
Hans van Kranenburg wrote on 2016/05/06 23:28 +0200: Hi, I've got a mostly inactive btrfs filesystem inside a virtual machine somewhere that shows interesting behaviour: while no interesting disk activity is going on, btrfs keeps allocating new chunks, a GiB at a time. A picture, telling

[PATCH] btrfs-progs: convert: Add support to rollback new convert image

2016-05-30 Thread Qu Wenruo
For new btrfs-convert, it's less restrict for metadata chunk allocation. While the may_rollback() function is still following the restrict 1:1 mapping check for all chunks, it will not allow some new convert image to be rolled back. Add new per extent check for new convert to allow it to be

Re: Runaway SLAB usage by 'bio' during 'device replace'

2016-05-30 Thread Duncan
Chris Johnson posted on Mon, 30 May 2016 11:48:02 -0700 as excerpted: > I have a RAID6 array that had a failed HDD. The drive failed completely > and has been removed from the system. I'm running a 'device replace' > operation with a new disk. The array is ~20TB so this will take a few > days.

Runaway SLAB usage by 'bio' during 'device replace'

2016-05-30 Thread Chris Johnson
I have a RAID6 array that had a failed HDD. The drive failed completely and has been removed from the system. I'm running a 'device replace' operation with a new disk. The array is ~20TB so this will take a few days. Yesterday the system crashed hard with OOM errors about 24 hours into the

Re: btrfs filesystem keeps allocating new chunks for no apparent reason

2016-05-30 Thread Duncan
Hans van Kranenburg posted on Mon, 30 May 2016 13:07:26 +0200 as excerpted: [Please don't post "upside down". Reply in context under the quoted point, here the whole post, you're replying to. It makes further replies in context far easier. =:^) I've pasted your update at the bottom here.] >