Re: [PATCH] btrfs-progs: mkfs: allow DUP on multidev fs, only warn

2016-03-24 Thread Hugo Mills
On Fri, Mar 25, 2016 at 01:59:20AM +, Duncan wrote: > David Sterba posted on Thu, 24 Mar 2016 16:56:13 +0100 as excerpted: > > > The DUP profile can work on multiple filesystems, the limitation is > > rather artificial. Let the user make the decision and print a warning. > > > >

Re: [PATCH] fstests: add btrfs test for fsync after snapshot deletion

2016-03-24 Thread Eryu Guan
On Thu, Mar 24, 2016 at 05:07:21PM +, fdman...@kernel.org wrote: > From: Filipe Manana > > Test that if we delete a snapshot, delete its parent directory, create > another directory with the same name as that parent and then fsync either > the new directory or a file

Re: [PATCH Resend] fstests: btrfs, test log replay with qgroups enabled and orphan roots

2016-03-24 Thread Eryu Guan
On Wed, Mar 23, 2016 at 02:49:15AM +, fdman...@kernel.org wrote: > From: Filipe Manana > > Test that replaying a log tree when qgroups are enabled and orphan roots > (deleted snapshots) exist, the replay process does not crash. > > This is motivated by a bug found in

Re: [PATCH v8 10/27] btrfs: dedupe: Add basic tree structure for on-disk dedupe method

2016-03-24 Thread Qu Wenruo
Chris Mason wrote on 2016/03/24 16:58 -0400: On Tue, Mar 22, 2016 at 09:35:35AM +0800, Qu Wenruo wrote: Introduce a new tree, dedupe tree to record on-disk dedupe hash. As a persist hash storage instead of in-memeory only implement. Unlike Liu Bo's implement, in this version we won't do hack

Re: [PATCH] btrfs-progs: mkfs: allow DUP on multidev fs, only warn

2016-03-24 Thread Duncan
David Sterba posted on Thu, 24 Mar 2016 16:56:13 +0100 as excerpted: > The DUP profile can work on multiple filesystems, the limitation is > rather artificial. Let the user make the decision and print a warning. > > Signed-off-by: David Sterba > --- I like the change, but

[PATCH] btrfs-progs: mkfs: fix an error when using DUP on multidev fs

2016-03-24 Thread Satoru Takeuchi
To accept DUP on multidev fs, in addition to the following commit, we need to mark DUP as an allowed data/metadata profile. commit 42f1279bf8e9 ("btrfs-progs: mkfs: allow DUP on multidev fs, only warn") * actual result = # ./mkfs.btrfs -f -m DUP

Re: [PATCH v8 25/27] btrfs: dedupe: Add support for compression and dedpue

2016-03-24 Thread Qu Wenruo
Chris Mason wrote on 2016/03/24 16:35 -0400: On Tue, Mar 22, 2016 at 09:35:50AM +0800, Qu Wenruo wrote: From: Wang Xiaoguang The basic idea is also calculate hash before compression, and add needed members for dedupe to record compressed file extent. Since

Re: [PATCH v8 00/27][For 4.7] Btrfs: Add inband (write time) de-duplication framework

2016-03-24 Thread Qu Wenruo
David Sterba wrote on 2016/03/24 14:42 +0100: On Wed, Mar 23, 2016 at 10:25:51AM +0800, Qu Wenruo wrote: Thank you for your interest in dedupe patchset first. In fact I'm quite afraid if there is no one interest in the patchset, it may be delayed again to 4.8. It's not about lack of

Lockdep warning at device replace finishing

2016-03-24 Thread Yauhen Kharuzhy
Hi. Can anybody point me to possible cause of this lockdep warning and say if it is dangerous in reality? It appeared when I started replacing from the missing drive ('btrfs replace start ). My locking-fu seems to be too weak to resolve this by myself. I use 4.4.5 kernel with Anand's global

Re: moving btrfs subvolumes to new disk

2016-03-24 Thread Chris Murphy
On Wed, Mar 23, 2016 at 8:08 PM, Ryan Erato wrote: > Success! Using the same ISO you previously linked to, I ran 'btrfs > check --repair', did another check which actually revealed many new > issues, ran a repair again and after that successive checks showed no > signs of other

btrfs_destroy_inode WARN_ON.

2016-03-24 Thread Dave Jones
Just hit this on a tree from earlier this morning, v4.5-11140 or so. WARNING: CPU: 2 PID: 32570 at fs/btrfs/inode.c:9261 btrfs_destroy_inode+0x389/0x3f0 [btrfs] CPU: 2 PID: 32570 Comm: rm Not tainted 4.5.0-think+ #14 c039baf9 ef721ef0 88025966fc08 8957bcdb

Re: [PATCH v8 10/27] btrfs: dedupe: Add basic tree structure for on-disk dedupe method

2016-03-24 Thread Chris Mason
On Tue, Mar 22, 2016 at 09:35:35AM +0800, Qu Wenruo wrote: > Introduce a new tree, dedupe tree to record on-disk dedupe hash. > As a persist hash storage instead of in-memeory only implement. > > Unlike Liu Bo's implement, in this version we won't do hack for > bytenr -> hash search, but add a

Re: [PATCH v8 25/27] btrfs: dedupe: Add support for compression and dedpue

2016-03-24 Thread Chris Mason
On Tue, Mar 22, 2016 at 09:35:50AM +0800, Qu Wenruo wrote: > From: Wang Xiaoguang > > The basic idea is also calculate hash before compression, and add needed > members for dedupe to record compressed file extent. > > Since dedupe support dedupe_bs larger than 128K,

Slow delete and shutdown

2016-03-24 Thread Pete
Hi. I'm replacing a disk in my system. I've added the new drive and I'm deleting one which is causing data to be written to the new drive. However, progress is painfully slow. 150GB of approx. 1.8TB written to new disk in about 12 hours. SO about 6 days to go. I know it is a slow process but

[PATCH] fstests: add btrfs test for fsync after snapshot deletion

2016-03-24 Thread fdmanana
From: Filipe Manana Test that if we delete a snapshot, delete its parent directory, create another directory with the same name as that parent and then fsync either the new directory or a file inside the new directory, the fsync succeeds, the fsync log is replayable and

[PATCH] Btrfs: fix unreplayable log after snapshot deletion and parent re-creation

2016-03-24 Thread fdmanana
From: Filipe Manana If we delete a snapshot, delete its parent directory, create a new directory with the same name as that parent and then fsync either that new directory or some file inside it, we end up with a log tree that is not possible to replay because the log replay

Re: [PATCH 1/1] Btrfs: Code Cleanup

2016-03-24 Thread David Sterba
On Thu, Mar 24, 2016 at 04:08:18PM +0100, Petr Tesarik wrote: > On Thu, 24 Mar 2016 16:03:07 +0100 > David Sterba wrote: > > > On Sun, Mar 20, 2016 at 03:11:11PM +0800, Flex Liu wrote: > >[...] > > > --- a/fs/btrfs/volumes.c > > > +++ b/fs/btrfs/volumes.c > > > @@ -2325,7

[PATCH] btrfs-progs: mkfs: allow DUP on multidev fs, only warn

2016-03-24 Thread David Sterba
The DUP profile can work on multiple filesystems, the limitation is rather artificial. Let the user make the decision and print a warning. Signed-off-by: David Sterba --- utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils.c b/utils.c index

Re: kernel BUG when fsync'ing file in a overlayfs merged dir, located on btrfs

2016-03-24 Thread Al Viro
On Thu, Mar 24, 2016 at 03:20:43PM +, Al Viro wrote: > > ocfs2_prepare_inode_for_write uses file->f_path.dentry for > > should_remove_suid (due to needing to do it early since cluster locking > > is unknown in setattr, according to the commit). Having > > should_remove_suid operate on an

Re: kernel BUG when fsync'ing file in a overlayfs merged dir, located on btrfs

2016-03-24 Thread Jeff Mahoney
On 3/24/16 11:20 AM, Al Viro wrote: > On Thu, Nov 05, 2015 at 11:03:58PM -0500, Jeff Mahoney wrote: > >> I suppose the irony here is that, AFAIK, that code is to ensure a file >> doesn't get lost between transactions due to rename. >> >> Isn't the file->f_path.dentry relationship stable

Re: kernel BUG when fsync'ing file in a overlayfs merged dir, located on btrfs

2016-03-24 Thread Al Viro
On Thu, Nov 05, 2015 at 11:03:58PM -0500, Jeff Mahoney wrote: > I suppose the irony here is that, AFAIK, that code is to ensure a file > doesn't get lost between transactions due to rename. > > Isn't the file->f_path.dentry relationship stable otherwise, though? The > name might change and the

Re: [PATCH 1/1] Btrfs: Code Cleanup

2016-03-24 Thread Petr Tesarik
On Thu, 24 Mar 2016 16:03:07 +0100 David Sterba wrote: > On Sun, Mar 20, 2016 at 03:11:11PM +0800, Flex Liu wrote: >[...] > > --- a/fs/btrfs/volumes.c > > +++ b/fs/btrfs/volumes.c > > @@ -2325,7 +2325,10 @@ int btrfs_init_new_device(struct btrfs_root *root, > > char

Re: [PATCH 1/1] Btrfs: Code Cleanup

2016-03-24 Thread David Sterba
On Sun, Mar 20, 2016 at 03:11:11PM +0800, Flex Liu wrote: > From: Flex Liu > > In fs/btrfs/volumes.c:2328 > > if (seeding_dev) { > sb->s_flags &= ~MS_RDONLY; > ret = btrfs_prepare_sprout(root); > BUG_ON(ret); /* -ENOMEM */ >

Re: [PATCH] btrfs-progs: send: fix handling of multiple snapshots

2016-03-24 Thread David Sterba
On Thu, Mar 24, 2016 at 04:47:28PM +0900, Tsutomu Itoh wrote: > We cannot send multiple snapshots at once. > > [before fix] > # btrfs send ./snap[12] > snap12.data > At subvol ./snap1 > At subvol ./snap2 > ERROR: parent determination failed for 0 > # > > [after fix] > # btrfs send ./snap[12] >

Re: [PATCH v8 00/27][For 4.7] Btrfs: Add inband (write time) de-duplication framework

2016-03-24 Thread David Sterba
On Wed, Mar 23, 2016 at 10:25:51AM +0800, Qu Wenruo wrote: > Thank you for your interest in dedupe patchset first. > > In fact I'm quite afraid if there is no one interest in the patchset, it > may be delayed again to 4.8. It's not about lack of interest, the high-profile features need time and

Re: [RFC][PATCH] btrfs: allow balancing to dup with multi-device

2016-03-24 Thread David Sterba
On Wed, Mar 23, 2016 at 02:22:59PM -0400, Austin S. Hemmelgarn wrote: > Currently, we don't allow the user to try and rebalance to a dup profile > on a multi-device filesystem. In most cases, this is a perfectly sensible > restriction as raid1 uses the same amount of space and provides better >

Re: [PATCH] fstest: btrfs: remove _need_to_be_root fix btrfs/118

2016-03-24 Thread Anand Jain
On 03/24/2016 07:08 PM, Filipe Manana wrote: On Thu, Mar 24, 2016 at 10:13 AM, Anand Jain wrote: commit 56ff01f471c9b72de0a447b37cdb1051adcede6a xfstests: remove _need_to_be_root Removed _need_to_be_root(), and so btrfs/118 needs an update

Re: [PATCH] fstest: btrfs: update 048.out inline with ui changes

2016-03-24 Thread Anand Jain
On 03/24/2016 07:13 PM, Eryu Guan wrote: On Thu, Mar 24, 2016 at 06:11:12PM +0800, Anand Jain wrote: To be inline with progs changes 28831d54895443e5fc795392f23ce3a8b122cb71 btrfs-progs: cmd property: switch to common error message wrapper update 048.out Signed-off-by: Anand Jain

Re: [PATCH] fstest: btrfs: update 048.out inline with ui changes

2016-03-24 Thread Eryu Guan
On Thu, Mar 24, 2016 at 06:11:12PM +0800, Anand Jain wrote: > To be inline with progs changes > 28831d54895443e5fc795392f23ce3a8b122cb71 > btrfs-progs: cmd property: switch to common error message wrapper > update 048.out > > Signed-off-by: Anand Jain > --- >

Re: [PATCH] fstest: btrfs: update 048.out inline with ui changes

2016-03-24 Thread Filipe Manana
On Thu, Mar 24, 2016 at 10:11 AM, Anand Jain wrote: > To be inline with progs changes > 28831d54895443e5fc795392f23ce3a8b122cb71 > btrfs-progs: cmd property: switch to common error message wrapper > update 048.out > > Signed-off-by: Anand Jain >

Re: [PATCH] fstest: btrfs: remove _need_to_be_root fix btrfs/118

2016-03-24 Thread Filipe Manana
On Thu, Mar 24, 2016 at 10:13 AM, Anand Jain wrote: > commit 56ff01f471c9b72de0a447b37cdb1051adcede6a > xfstests: remove _need_to_be_root > > Removed _need_to_be_root(), and so btrfs/118 needs an update

Re: [PATCH] fstest: btrfs: remove _need_to_be_root fix btrfs/118

2016-03-24 Thread Eryu Guan
On Thu, Mar 24, 2016 at 06:13:59PM +0800, Anand Jain wrote: > commit 56ff01f471c9b72de0a447b37cdb1051adcede6a > xfstests: remove _need_to_be_root > > Removed _need_to_be_root(), and so btrfs/118 needs an update It has been fixed by 3a92426 btrfs/118: remove call to _need_to_be_root Perhaps

[PATCH 2/3] btrfs: keep sysfs target add in the last

2016-03-24 Thread Anand Jain
Sysfs create context should come in the last, so that we don't have to undo sysfs operation for the reason that any other operation has failed. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 3/3] btrfs: refactor btrfs_dev_replace_start for reuse

2016-03-24 Thread Anand Jain
A refactor patch, and avoids user input verification in the btrfs_dev_replace_start(), and so this function can be reused. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 62 ++ fs/btrfs/dev-replace.h | 4 +++-

[PATCH 1/3] btrfs: use fs_info directly

2016-03-24 Thread Anand Jain
Local variable fs_info, contains root->fs_info, use it. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index a1d6652e0c47..d38cad37ba27 100644

[PATCH] fstest: btrfs: remove _need_to_be_root fix btrfs/118

2016-03-24 Thread Anand Jain
commit 56ff01f471c9b72de0a447b37cdb1051adcede6a xfstests: remove _need_to_be_root Removed _need_to_be_root(), and so btrfs/118 needs an update Signed-off-by: Anand Jain --- tests/btrfs/118 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/btrfs/118

[PATCH] fstest: btrfs: update 048.out inline with ui changes

2016-03-24 Thread Anand Jain
To be inline with progs changes 28831d54895443e5fc795392f23ce3a8b122cb71 btrfs-progs: cmd property: switch to common error message wrapper update 048.out Signed-off-by: Anand Jain --- tests/btrfs/048.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v3] fstest: btrfs: test single 4k extent after subpagesize buffered writes

2016-03-24 Thread Eryu Guan
On Wed, Mar 23, 2016 at 09:55:52PM -0700, Liu Bo wrote: > This is to test if COW enabled btrfs can end up with single 4k extents > when doing subpagesize buffered writes. > > Signed-off-by: Liu Bo Looks good to me. Reviewed-by: Eryu Guan -- To

[PATCH] btrfs-progs: send: fix handling of multiple snapshots

2016-03-24 Thread Tsutomu Itoh
We cannot send multiple snapshots at once. [before fix] # btrfs send ./snap[12] > snap12.data At subvol ./snap1 At subvol ./snap2 ERROR: parent determination failed for 0 # [after fix] # btrfs send ./snap[12] > snap12.data At subvol ./snap1 At subvol ./snap2 # Signed-off-by: Tsutomu Itoh

Re: RAID-1 refuses to balance large drive

2016-03-24 Thread Andrew Vaughan
Hi Brad Just a user here, not a dev. I think I might have run into a similar bug about 6 months ago. At the time I was running Debian stable. (iirc that is kernel 3.16 and probably btrfs-progs of a similar vintage). The filesystem was originally a 2 x 6TB array with a 4TB drive added later

Re: RAID-1 refuses to balance large drive

2016-03-24 Thread Duncan
Brad Templeton posted on Wed, 23 Mar 2016 19:49:00 -0700 as excerpted: > On 03/23/2016 07:33 PM, Qu Wenruo wrote: > >>> Still, it seems to me >>> that the lack of space even after I filled the disks should not >>> interfere with the balance's ability to move chunks which are found on >>> both 3