Re: [PATCH] xfstests: btrfs/012: add a regression test for deleting ext2_saved

2015-10-22 Thread Eryu Guan
On Tue, Oct 20, 2015 at 07:34:06PM +0800, Liu Bo wrote: > Btrfs now has changed to delete subvolume/snapshot asynchronously, > which means that after umount, if we've already deleted 'ext2_saved', > rollback can still be completed, which should not. > > So this adds a regression test for this. >

Re: [PATCH v3 RESENT 2/2] btrfs: qgroup: Don't copy extent buffer to do qgroup rescan

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 1:42 AM, Qu Wenruo wrote: > Ancient qgroup code call memcpy() on a extent buffer and use it for leaf > iteration. > > As extent buffer contains lock, pointers to pages, it's never sane to do > such copy. > > The following bug may be caused by this insane operation: > [92098

[4.3-rc4] scrubbing aborts before finishing

2015-10-22 Thread Martin Steigerwald
Hi! I get this: merkaba:~> btrfs scrub status -d / scrub status for […] scrub device /dev/mapper/sata-debian (id 1) history scrub started at Thu Oct 22 10:05:49 2015 and was aborted after 00:00:00 total bytes scrubbed: 0.00B with 0 errors scrub device /dev/dm-2 (id 2) histo

Re: [PATCH v3 RESENT 2/2] btrfs: qgroup: Don't copy extent buffer to do qgroup rescan

2015-10-22 Thread Qu Wenruo
Filipe Manana wrote on 2015/10/22 09:16 +0100: On Thu, Oct 22, 2015 at 1:42 AM, Qu Wenruo wrote: Ancient qgroup code call memcpy() on a extent buffer and use it for leaf iteration. As extent buffer contains lock, pointers to pages, it's never sane to do such copy. The following bug may be c

[PATCH] Btrfs: change the initialization point of fs_root in open_ctree()

2015-10-22 Thread Tsutomu Itoh
Kernel panic occurred due to NULL pointer reference in can_overcommit(). Because btrfs_async_reclaim_metadata_space() passed NULL pointer to btrfs_calc_reclaim_metadata_size(). [ 3756.152833] BUG: unable to handle kernel NULL pointer der

[PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread fdmanana
From: Filipe Manana In the kernel 4.2 merge window we had a refactoring/rework of the delayed references implementation in order to fix certain problems with qgroups. However that rework introduced one more regression that leads to the following trace when running delayed references for metadata:

Re: BTRFS BUG at insert_inline_extent_backref+0xe3/0xf0 while rebalancing

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 6:32 AM, Erkki Seppala wrote: > Hello, > > Recently I added daily rebalancing to my cron.d (after finding myself in > the no-space-situation), and not long after that, I found my PC had > crashed over night. Having no sign in the logs anywhere (not even over > network even

[PATCH v2] btrfs: add balance filters limits, stripes and usage to supported mask

2015-10-22 Thread David Sterba
Enable the extended 'limit' syntax (a range), the new 'stripes' and extended 'usage' syntax (a range) filters in the filters mask. The patch comes separate and not within the series that introduced the new filters because the patch adding the mask was merged in a late rc. The integration branch was

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Qu Wenruo
wrote on 2015/10/22 09:47 +0100: From: Filipe Manana In the kernel 4.2 merge window we had a refactoring/rework of the delayed references implementation in order to fix certain problems with qgroups. However that rework introduced one more regression that leads to the following trace when ru

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 10:32 AM, Qu Wenruo wrote: > > > wrote on 2015/10/22 09:47 +0100: >> >> From: Filipe Manana >> >> In the kernel 4.2 merge window we had a refactoring/rework of the delayed >> references implementation in order to fix certain problems with qgroups. >> However that rework i

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 10:43 AM, Filipe Manana wrote: > On Thu, Oct 22, 2015 at 10:32 AM, Qu Wenruo wrote: >> >> >> wrote on 2015/10/22 09:47 +0100: >>> >>> From: Filipe Manana >>> >>> In the kernel 4.2 merge window we had a refactoring/rework of the delayed >>> references implementation in or

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Koen Kooi
Op 22-10-15 om 10:47 schreef fdman...@kernel.org: > From: Filipe Manana > > In the kernel 4.2 merge window we had a refactoring/rework of the delayed > references implementation in order to fix certain problems with qgroups. > However that rework introduced one more regression that leads to the >

Re: BTRFS BUG at insert_inline_extent_backref+0xe3/0xf0 while rebalancing

2015-10-22 Thread Stéphane Lesimple
Le 2015-10-22 10:53, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 6:32 AM, Erkki Seppala wrote: Hello, Recently I added daily rebalancing to my cron.d (after finding myself in the no-space-situation), and not long after that, I found my PC had crashed over night. Having no sign in the log

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Qu Wenruo
在 2015年10月22日 17:43, Filipe Manana 写道: On Thu, Oct 22, 2015 at 10:32 AM, Qu Wenruo wrote: wrote on 2015/10/22 09:47 +0100: From: Filipe Manana In the kernel 4.2 merge window we had a refactoring/rework of the delayed references implementation in order to fix certain problems with qgro

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 11:05 AM, Koen Kooi wrote: > Op 22-10-15 om 10:47 schreef fdman...@kernel.org: >> From: Filipe Manana >> >> In the kernel 4.2 merge window we had a refactoring/rework of the delayed >> references implementation in order to fix certain problems with qgroups. >> However that

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Stéphane Lesimple
Le 2015-10-22 11:47, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 10:43 AM, Filipe Manana wrote: On Thu, Oct 22, 2015 at 10:32 AM, Qu Wenruo wrote: wrote on 2015/10/22 09:47 +0100: From: Filipe Manana In the kernel 4.2 merge window we had a refactoring/rework of the delayed referen

Re: BTRFS BUG at insert_inline_extent_backref+0xe3/0xf0 while rebalancing

2015-10-22 Thread Erkki Seppala
Hello, Thanks for the super-fast response :). I've installed the patch and shall be waiting. The effects should be visible within a week given daily rebalances of two filesystems. -- _ / __// /__ __ h

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 3:58 PM, Stéphane Lesimple wrote: > Le 2015-10-22 11:47, Filipe Manana a écrit : >> >> On Thu, Oct 22, 2015 at 10:43 AM, Filipe Manana >> wrote: >>> >>> On Thu, Oct 22, 2015 at 10:32 AM, Qu Wenruo >>> wrote: wrote on 2015/10/22 09:47 +0100: >

Re: [PATCH] Btrfs-progs: fix btrfs-convert rollback to check ROOT_BACKREF

2015-10-22 Thread David Sterba
On Sun, Oct 18, 2015 at 07:41:27PM +0800, Qu Wenruo wrote: > 在 2015年10月18日 13:44, Liu Bo 写道: > > Btrfs has changed to delete subvolume/snapshot asynchronously, which means > > that > > after umount itself, if we've already deleted 'ext2_saved', rollback can > > still > > be completed. > > > > So

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Stéphane Lesimple
Le 2015-10-22 19:03, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 3:58 PM, Stéphane Lesimple wrote: Le 2015-10-22 11:47, Filipe Manana a écrit : On Thu, Oct 22, 2015 at 10:43 AM, Filipe Manana wrote: On Thu, Oct 22, 2015 at 10:32 AM, Qu Wenruo wrote: wrote on 2015/10/22 09:47 +0

[PATCH] Btrfs: igrab inode in writepage

2015-10-22 Thread Josef Bacik
We hit this panic on a few of our boxes this week where we have an ordered_extent with an NULL inode. We do an igrab() of the inode in writepages, but weren't doing it in writepage which can be called directly from the VM on dirty pages. If the inode has been unlinked then we could have I_FREEING

Exclusive quota of snapshot exceeded despite no space used

2015-10-22 Thread Johannes Henninger
I'm having a weird problem with snapshots and exclusive quotas. After creating a snapshot of a subvolume and setting an exclusive quota of 50MB for the snapshot, everything seems to work fine. I can write approximately 50MB before the quota kicks in. However, if I create a snapshot, set an exclusi

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Stéphane Lesimple
[ ... thread cleanup ... ] Don't hesitate to ask if you need me to debug or even ftrace something. Thanks Stéphane. I haven't seen that crash yet (still running tests for 2 consecutive days now). Can you please try the following patch, which works on top of mine, and enable ftrace before runnin

Re: [PATCH] Btrfs: fix regression when running delayed references

2015-10-22 Thread Filipe Manana
On Thu, Oct 22, 2015 at 11:38 PM, Stéphane Lesimple wrote: [ ... thread cleanup ... ] Don't hesitate to ask if you need me to debug or even ftrace something. >>> >>> >>> Thanks Stéphane. I haven't seen that crash yet (still running tests >>> for 2 consecutive days now). >>> Can you

Crash during mount -o degraded, kernel BUG at fs/btrfs/extent_io.c:2044

2015-10-22 Thread Erik Berg
Hi again, So I intentionally broke this small raid6 fs on a VM to learn recovery strategies for another much bigger raid6 I have running (which also suffered a drive failure). Basically I zeroed out one of the drives (vdd) from under the running vm. Then ran an md5sum on a file on the fs to

Re: Exclusive quota of snapshot exceeded despite no space used

2015-10-22 Thread Qu Wenruo
在 2015年10月23日 04:38, Johannes Henninger 写道: I'm having a weird problem with snapshots and exclusive quotas. After creating a snapshot of a subvolume and setting an exclusive quota of 50MB for the snapshot, everything seems to work fine. I can write approximately 50MB before the quota kicks in.

Re: [RFC PATCH] btrfs/ioctl.c: Prefer inode with lowest offset as source for clone

2015-10-22 Thread Zygo Blaxell
On Tue, Oct 20, 2015 at 04:29:46PM +0300, Timofey Titovets wrote: > For performance reason, leave data at the start of disk, is preferable > while deduping > It's might sense for the reasons: > 1. Spinning rust - start of the disk is much faster > 2. Btrfs can deallocate empty data chunk from the e

[PATCH v4] btrfs: qgroup: Don't copy extent buffer to do qgroup rescan

2015-10-22 Thread Qu Wenruo
Ancient qgroup code call memcpy() on a extent buffer and use it for leaf iteration. As extent buffer contains lock, pointers to pages, it's never sane to do such copy. The following bug may be caused by this insane operation: [92098.841309] general protection fault: [#1] SMP [92098.841338] M

Re: [PATCH] Btrfs: igrab inode in writepage

2015-10-22 Thread Liu Bo
On 10/23/2015 03:05 AM, Josef Bacik wrote: We hit this panic on a few of our boxes this week where we have an ordered_extent with an NULL inode. We do an igrab() of the inode in writepages, but weren't doing it in writepage which can be called directly from the VM on dirty pages. If the inode h