Re: write corruption due to bio cloning on raid5/6

2017-07-29 Thread Duncan
Janos Toth F. posted on Sun, 30 Jul 2017 03:39:10 +0200 as excerpted: [OT but related topic continues...] > I still get shivers if I need to resize a filesystems due to the > memories of those early tragic experiences when I never won the lottery > on the "trial and error" runs but lost

Re: write corruption due to bio cloning on raid5/6

2017-07-29 Thread Janos Toth F.
Reply to the TL;DR part, so TL;DR marker again... Well, I live on the other extreme now. I want as few filesystems as possible and viable (it's obviously impossible to have a real backup within the same fs and/or device and with the current size/performance/price differences between HDD and SSD,

Re: write corruption due to bio cloning on raid5/6

2017-07-29 Thread Duncan
Janos Toth F. posted on Sat, 29 Jul 2017 05:02:48 +0200 as excerpted: > The read-only scrub finished without errors/hangs (with kernel > 4.12.3). So, I guess the hangs were caused by: > 1: other bug in 4.13-RC1 > 2: crazy-random SATA/disk-controller issue > 3: interference between various btrfs

Re: write corruption due to bio cloning on raid5/6

2017-07-28 Thread Janos Toth F.
The read-only scrub finished without errors/hangs (with kernel 4.12.3). So, I guess the hangs were caused by: 1: other bug in 4.13-RC1 2: crazy-random SATA/disk-controller issue 3: interference between various btrfs tools [*] 4: something in the background did DIO write with 4.13-RC1 (but all

Re: write corruption due to bio cloning on raid5/6

2017-07-27 Thread Duncan
Janos Toth F. posted on Thu, 27 Jul 2017 16:14:47 +0200 as excerpted: > * This is off-topic but raid5 scrub is painful. The disks run at > constant ~100% utilization while performing at ~1/5 of their sequential > read speeds. And despite explicitly asking idle IO priority when > launching scrub,

Re: write corruption due to bio cloning on raid5/6

2017-07-27 Thread Janos Toth F.
> It should only affect the dio-written files, the mentioned bug makes > btrfs write garbage into those files, so checksum fails when reading > files, nothing else from this bug. Thanks for confirming that. I thought so but I removed the affected temporary files even before I knew they were

Re: write corruption due to bio cloning on raid5/6

2017-07-26 Thread Liu Bo
On Mon, Jul 24, 2017 at 10:22:53PM +0200, Janos Toth F. wrote: > I accidentally ran into this problem (it's pretty silly because I > almost never run RC kernels or do dio writes but somehow I just > happened to do both at once, exactly before I read your patch notes). > I didn't initially catch

Re: write corruption due to bio cloning on raid5/6

2017-07-24 Thread Janos Toth F.
I accidentally ran into this problem (it's pretty silly because I almost never run RC kernels or do dio writes but somehow I just happened to do both at once, exactly before I read your patch notes). I didn't initially catch any issues (I see no related messages in the kernel log) but after seeing

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-14 Thread Liu Bo
On Fri, Jul 14, 2017 at 10:04:34AM +0100, Filipe Manana wrote: > On Thu, Jul 13, 2017 at 11:38 PM, Liu Bo wrote: > > On Thu, Jul 13, 2017 at 09:36:19AM -0700, Liu Bo wrote: > >> On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > >> > From: Filipe Manana

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-14 Thread David Sterba
On Fri, Jul 14, 2017 at 10:04:34AM +0100, Filipe Manana wrote: > On Thu, Jul 13, 2017 at 11:38 PM, Liu Bo wrote: > > On Thu, Jul 13, 2017 at 09:36:19AM -0700, Liu Bo wrote: > >> On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > >> > @@ -1423,11 +1430,14

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-14 Thread Filipe Manana
On Thu, Jul 13, 2017 at 11:38 PM, Liu Bo wrote: > On Thu, Jul 13, 2017 at 09:36:19AM -0700, Liu Bo wrote: >> On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: >> > From: Filipe Manana >> > >> > The recent changes to make bio cloning

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-14 Thread Filipe Manana
On Thu, Jul 13, 2017 at 8:09 PM, Liu Bo wrote: > On Thu, Jul 13, 2017 at 07:11:24PM +0100, Filipe Manana wrote: >> On Thu, Jul 13, 2017 at 7:00 PM, Liu Bo wrote: >> > On Thu, Jul 13, 2017 at 10:06:32AM -0700, Liu Bo wrote: >> >> On Thu, Jul 13, 2017 at

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Liu Bo
On Thu, Jul 13, 2017 at 09:36:19AM -0700, Liu Bo wrote: > On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > The recent changes to make bio cloning faster (added in the 4.13 merge > > window) by using the bio_clone_fast() API

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Liu Bo
On Thu, Jul 13, 2017 at 07:11:24PM +0100, Filipe Manana wrote: > On Thu, Jul 13, 2017 at 7:00 PM, Liu Bo wrote: > > On Thu, Jul 13, 2017 at 10:06:32AM -0700, Liu Bo wrote: > >> On Thu, Jul 13, 2017 at 05:46:13PM +0100, Filipe Manana wrote: > >> > On Thu, Jul 13, 2017 at 5:36

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Filipe Manana
On Thu, Jul 13, 2017 at 7:00 PM, Liu Bo wrote: > On Thu, Jul 13, 2017 at 10:06:32AM -0700, Liu Bo wrote: >> On Thu, Jul 13, 2017 at 05:46:13PM +0100, Filipe Manana wrote: >> > On Thu, Jul 13, 2017 at 5:36 PM, Liu Bo wrote: >> > > On Thu, Jul 13, 2017

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Liu Bo
On Thu, Jul 13, 2017 at 10:06:32AM -0700, Liu Bo wrote: > On Thu, Jul 13, 2017 at 05:46:13PM +0100, Filipe Manana wrote: > > On Thu, Jul 13, 2017 at 5:36 PM, Liu Bo wrote: > > > On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > > >> From: Filipe Manana

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Liu Bo
On Thu, Jul 13, 2017 at 05:46:13PM +0100, Filipe Manana wrote: > On Thu, Jul 13, 2017 at 5:36 PM, Liu Bo wrote: > > On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > >> From: Filipe Manana > >> [...] > > > > > >> Signed-off-by: Filipe

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Filipe Manana
On Thu, Jul 13, 2017 at 5:36 PM, Liu Bo wrote: > On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: >> From: Filipe Manana >> >> The recent changes to make bio cloning faster (added in the 4.13 merge >> window) by using the

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread Liu Bo
On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > The recent changes to make bio cloning faster (added in the 4.13 merge > window) by using the bio_clone_fast() API introduced a regression on > raid5/6 modes, because cloned bios

Re: [PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread David Sterba
On Thu, Jul 13, 2017 at 03:09:54PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > The recent changes to make bio cloning faster (added in the 4.13 merge > window) by using the bio_clone_fast() API introduced a regression on > raid5/6 modes, because cloned bios

[PATCH] Btrfs: fix write corruption due to bio cloning on raid5/6

2017-07-13 Thread fdmanana
From: Filipe Manana The recent changes to make bio cloning faster (added in the 4.13 merge window) by using the bio_clone_fast() API introduced a regression on raid5/6 modes, because cloned bios have an invalid bi_vcnt field (therefore it can not be used) and the raid5/6 code