Re: Btrfs progs release 4.1.1

2015-07-24 Thread Marc MERLIN
On Thu, Jul 23, 2015 at 01:55:59PM +0200, David Sterba wrote: > On Sat, Jul 11, 2015 at 06:02:29PM -0700, Marc MERLIN wrote: > > Are you interested in crash reports for fsck? > > > > If so, see my recent message: > > > > On Mon, Jul 06, 2015 at 02:21:56PM -0700, Marc MERLIN wrote: > > > > > > my

Re: [PATCH 4/4] btrfs: convert: Avoid allocating metadata extent crossing stripe boundary

2015-07-24 Thread Qu Wenruo
David Sterba wrote on 2015/07/24 14:34 +0200: On Thu, Jul 23, 2015 at 05:18:10PM +0800, Qu Wenruo wrote: @@ -246,6 +247,14 @@ static int custom_alloc_extent(struct btrfs_root *root, u64 num_bytes, continue; } + if (metadata) { +

[PATCH v2] fstests: btrfs test to exercise shared extent reference accounting

2015-07-24 Thread fdmanana
From: Filipe Manana Regression test for adding and dropping an equal number of references for file extents. Verify that if we drop N references for a file extent and we add too N new references for that same file extent in the same transaction, running the delayed references (which always happens

Re: [PATCH] fstests: btrfs test to exercise shared extent reference accounting

2015-07-24 Thread Filipe Manana
On Fri, Jul 24, 2015 at 10:40 PM, Omar Sandoval wrote: > On Thu, Jul 09, 2015 at 03:51:13PM +0100, fdman...@kernel.org wrote: >> From: Filipe Manana >> >> Regression test for adding and dropping an equal number of references >> for file extents. Verify that if we drop N references for a file exte

Re: [PATCH] fstests: btrfs test to exercise shared extent reference accounting

2015-07-24 Thread Omar Sandoval
On Thu, Jul 09, 2015 at 03:51:13PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > Regression test for adding and dropping an equal number of references > for file extents. Verify that if we drop N references for a file extent > and we add too N new references for that same file exten

Re: [PATCH] fstests: regression test for the btrfs clone ioctl

2015-07-24 Thread Omar Sandoval
On Tue, Jul 14, 2015 at 04:37:14PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > This tests that we can not clone an inline extent into a non-zero file > offset. Inline extents at non-zero offsets is something btrfs is not > prepared for and results in all sorts of corruption and cr

Re: systemd : Timed out waiting for defice dev-disk-by…

2015-07-24 Thread Chris Murphy
On Fri, Jul 24, 2015 at 1:37 PM, Vincent Olivier wrote: > On Jul 24, 2015, at 3:27 PM, Chris Murphy wrote: > I'm not sure if its a systemd bug, a udev bug, or a btrfs device scan > bug, or a fast boot with slow spin up of the drives in the Btrfs. > > This system doesn't boot from this 12 disk Btr

Re: systemd : Timed out waiting for defice dev-disk-by…

2015-07-24 Thread Tomasz Torcz
On Fri, Jul 24, 2015 at 02:41:17PM -0400, Vincent Olivier wrote: > Hi, > > (Sorry if this gets sent twice : one of my mail relay is misbehaving today) > > 50% of the time when booting, the system go in safe mode because my 12x 4TB > RAID10 btrfs is taking too long to mount from fstab. > > When

Re: systemd : Timed out waiting for defice dev-disk-by…

2015-07-24 Thread Chris Murphy
I'm not sure if its a systemd bug, a udev bug, or a btrfs device scan bug, or a fast boot with slow spin up of the drives in the Btrfs. This system doesn't boot from this 12 disk Btrfs, correct? You could try changing fstab mount options to include: noauto,x-systemd.automount I do this for the

RE: systemd : Timed out waiting for defice dev-disk-by…

2015-07-24 Thread Vincent Olivier
I forgot to say: I'm with Centos 7 and Kernel 4.1.3 but it's been doing this since Kernel 4.0, the time at which I started using btrfs. thanks -Original Message- From: "Vincent Olivier" Sent: Friday, July 24, 2015 14:41 To: linux-btrfs@vger.kernel.org Subject: systemd : Timed out waitin

systemd : Timed out waiting for defice dev-disk-by…

2015-07-24 Thread Vincent Olivier
Hi, (Sorry if this gets sent twice : one of my mail relay is misbehaving today) 50% of the time when booting, the system go in safe mode because my 12x 4TB RAID10 btrfs is taking too long to mount from fstab. When I comment it out from fstab and mount it manually, it’s all good. I don’t like t

Re: [PATCH 3/3] btrfs: add a test of replace missing dev in diff raid

2015-07-24 Thread Omar Sandoval
On Fri, Jul 24, 2015 at 11:28:32AM +0800, Eryu Guan wrote: > On Thu, Jul 23, 2015 at 01:51:51PM -0700, Omar Sandoval wrote: > > From: Wang Yanfeng > > > > Test of missing device replace in different raid modes. This > > test requires SCRATCH_DEV_POOL contain 5 same size devices. > > > > This is

Re: [PATCH 2/3] btrfs: add replace missing and replace RAID 5/6 to profile configs

2015-07-24 Thread Omar Sandoval
On Fri, Jul 24, 2015 at 02:09:46PM +0200, David Sterba wrote: > On Thu, Jul 23, 2015 at 01:51:50PM -0700, Omar Sandoval wrote: > > + # We can't do replace with these profiles because they > > + # imply only one device ($SCRATCH_DEV), and we need to > > +

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-24 Thread Jens Axboe
On 07/24/2015 04:49 AM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 03:59:46PM -0600, Jens Axboe wrote: One possible solution would be to shrink bi_flags to an unsigned int, no problems fitting that in. Then we could stuff bi_error in that (new) hole, and we would end up having the same siz

[PATCH] fstests: test for file fsync after unlink and inode eviction

2015-07-24 Thread fdmanana
From: Filipe Manana Test that if we remove one hard link from an inode, evict the inode, fsync the inode, power fail and then mount the filesystem, the hard link we removed does not exists anymore and the filesystem metadata is in a consistent state. This test is motivated by an issue found on b

[PATCH] Btrfs: fix stale dir entries after unlink, inode eviction and fsync

2015-07-24 Thread fdmanana
From: Filipe Manana If we remove a hard link from an inode, the inode gets evicted, then we fsync the inode and then power fail/crash, when the log tree is replayed, the parent directory inode still has entries pointing to the name that no longer exists, while our inode no longer has the BTRFS_IN

Re: [PATCH 1/5] btrfs-progs: Fix wrong address accessing by subthread in btrfs-convert

2015-07-24 Thread David Sterba
On Fri, Jul 24, 2015 at 09:16:25PM +0800, Zhaolei wrote: > From: Zhao Lei Good catch! > We can reproduce this bug by a simple script: > DEV=/dev/vdh > for ((i = 0; i < 100; i++)); do > echo "loop $i" > mkfs.ext4 "$DEV" &>/dev/null || { echo mkfs fail; break; } > btrfs-conve

[PATCH 2/5] btrfs-progs: Move close timer handle code to line after sub process exit

2015-07-24 Thread Zhaolei
From: Zhao Lei The timer handle have possibility in using by sub thread, better to close it after sub process exit. Signed-off-by: Zhao Lei --- task-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/task-utils.c b/task-utils.c index 0390a69..17fd573 100644 --- a

[PATCH 4/5] btrfs-progs: resst info->periodic.timer_fd's value after free

2015-07-24 Thread Zhaolei
From: Zhao Lei task_period_stop() is used to close a timer explicitly, to avoid the timer handle closed again by task_stop(), we should reset its value after close. Also add value-reset for info->id for safe. Signed-off-by: Zhao Lei --- task-utils.c | 6 +- 1 file changed, 5 insertions(+)

[PATCH 3/5] btrfs-progs: Remove cleanup-timer code for btrfs-convert

2015-07-24 Thread Zhaolei
From: Zhao Lei No need to close timer handle afain in subthread-close-callback, it is closed by task_stop() automatically. This patch also add a fflush() to make log output on time. Signed-off-by: Zhao Lei --- btrfs-convert.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --gi

[PATCH 5/5] btrfs-progs: Set info->periodic.timer_fd to 0 in init-fail

2015-07-24 Thread Zhaolei
From: Zhao Lei In current code, (info->periodic.timer_fd == 0) means it is not valid, as: if (info->periodic.timer_fd) { close(info->periodic.timer_fd); ... We need set its value from -1 to 0 in create-fail case, to make code like above works. Signed-off-by: Zhao Lei --- task-ut

[PATCH 1/5] btrfs-progs: Fix wrong address accessing by subthread in btrfs-convert

2015-07-24 Thread Zhaolei
From: Zhao Lei We can reproduce this bug by a simple script: DEV=/dev/vdh for ((i = 0; i < 100; i++)); do echo "loop $i" mkfs.ext4 "$DEV" &>/dev/null || { echo mkfs fail; break; } btrfs-convert "$DEV" || break done Result is like: loop 0 ... loop 1 ... loop 3

Re: [PATCH 0/4] Metadata crossing stripe boundary fixes

2015-07-24 Thread David Sterba
On Thu, Jul 23, 2015 at 05:18:06PM +0800, Qu Wenruo wrote: > Qu Wenruo (4): > btrfs: print-tree: print stripe len of a chunk > btrfs: fsck: Check if a metadata tree block crossing stripe boundary > btrfs: extent-tree: Avoid allocating tree block that cross stripe > boundary Applied t

Re: [PATCH 4/4] btrfs: convert: Avoid allocating metadata extent crossing stripe boundary

2015-07-24 Thread David Sterba
On Thu, Jul 23, 2015 at 05:18:10PM +0800, Qu Wenruo wrote: > @@ -246,6 +247,14 @@ static int custom_alloc_extent(struct btrfs_root *root, > u64 num_bytes, > continue; > } > > + if (metadata) { > + BUG_ON(num_bytes != root->nodes

Re: [PATCH] btrfs-progs: defrag: remove unused variable

2015-07-24 Thread David Sterba
On Fri, Jul 24, 2015 at 12:21:02PM +0200, Patrik Lundquist wrote: > A leftover from when recursive defrag was added. > > Signed-off-by: Patrik Lundquist Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.or

Re: [PATCH] btrfs-progs: defrag: fix threshold overflow again

2015-07-24 Thread David Sterba
On Fri, Jul 24, 2015 at 10:35:02AM +0200, Patrik Lundquist wrote: > Commit dedb1ebeee847e3c4d71e14d0c1077887630e44a broke commit > 96cfbbf0ea9fce7ecaa9e03964474f407f6e76ab. > > Casting thresh value greater than (u32)-1 simply truncates bits while > desired value is (u32)-1 for max defrag threshold

Re: [PATCH 1/3] btrfs/011: test replace on RAID 5/6 now that it's supported

2015-07-24 Thread David Sterba
On Thu, Jul 23, 2015 at 01:51:49PM -0700, Omar Sandoval wrote: > btrfs replace has been supported on RAID 5/6 since Linux 3.19. > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord.

Re: [PATCH 2/3] btrfs: add replace missing and replace RAID 5/6 to profile configs

2015-07-24 Thread David Sterba
On Thu, Jul 23, 2015 at 01:51:50PM -0700, Omar Sandoval wrote: > + # We can't do replace with these profiles because they > + # imply only one device ($SCRATCH_DEV), and we need to > + # keep $SCRATCH_DEV around for _scratch_mount > +

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-24 Thread Christoph Hellwig
On Wed, Jul 22, 2015 at 03:59:46PM -0600, Jens Axboe wrote: > One possible solution would be to shrink bi_flags to an unsigned int, no > problems fitting that in. Then we could stuff bi_error in that (new) hole, > and we would end up having the same size again. As long as we use set/test/clear_b

[PATCH] btrfs-progs: defrag: remove unused variable

2015-07-24 Thread Patrik Lundquist
A leftover from when recursive defrag was added. Signed-off-by: Patrik Lundquist --- cmds-filesystem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 00a3f78..1b7b4c1 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -113

[PATCH] btrfs-progs: defrag: fix threshold overflow again

2015-07-24 Thread Patrik Lundquist
Commit dedb1ebeee847e3c4d71e14d0c1077887630e44a broke commit 96cfbbf0ea9fce7ecaa9e03964474f407f6e76ab. Casting thresh value greater than (u32)-1 simply truncates bits while desired value is (u32)-1 for max defrag threshold. I.e. "btrfs fi defrag -t 4g" is trimmed/truncated to 0 and "-t 5g" to 107