Re: btrfs_direct_IO oops

2016-10-10 Thread Dave Jones
On Mon, Oct 10, 2016 at 04:55:03PM +0100, Al Viro wrote: > > WARNING: CPU: 1 PID: 13581 at lib/iov_iter.c:327 sanity+0x102/0x150 > > CPU: 1 PID: 13581 Comm: trinity-c17 Not tainted 4.8.0-think+ #9 > > c9963ae8 > > b93e22d1 > > > > > >

Re: btrfs_direct_IO oops

2016-10-10 Thread Al Viro
On Mon, Oct 10, 2016 at 09:11:22AM -0400, Dave Jones wrote: > My compiler choked on that, but I fixed it up. The printk didn't > trigger though.. > > idx = 0, offset = 0 > curbuf = 0, nrbufs = 1, buffers = 16 > [b9a21100 ea00126019c0 0 4096] > [ (null) ea0013746440 0 0] >

Re: btrfs_direct_IO oops

2016-10-10 Thread Dave Jones
On Mon, Oct 10, 2016 at 04:43:57AM +0100, Al Viro wrote: > Very interesting. Could you slap something like > diff --git a/lib/iov_iter.c b/lib/iov_iter.c > index 0ce3411..1ef00e7 100644 > --- a/lib/iov_iter.c > +++ b/lib/iov_iter.c > @@ -682,8 +682,9 @@ static void pipe_advance(struct iov_

Re: btrfs_direct_IO oops

2016-10-09 Thread Al Viro
On Sun, Oct 09, 2016 at 11:11:06AM -0400, Dave Jones wrote: > idx = 0, offset = 0 == starts at slot 0, nothing put into it yet, but > curbuf = 0, nrbufs = 1, buffers = 16 > [9fa21100 ea00065f6d80 0 4096] the underlying pipe has something stored into slot 0. That definitely should no

Re: btrfs_direct_IO oops

2016-10-09 Thread Dave Jones
On Sat, Oct 08, 2016 at 07:20:08PM -0400, Dave Jones wrote: > On Sat, Oct 08, 2016 at 07:29:03PM +0100, Al Viro wrote: > > On Sat, Oct 08, 2016 at 02:08:06PM -0400, Dave Jones wrote: > > > That code: matches this dissembly: > > > > > > for (i = seg + 1; i < iter->nr_segs;

Re: btrfs_direct_IO oops

2016-10-08 Thread Dave Jones
On Sat, Oct 08, 2016 at 07:29:03PM +0100, Al Viro wrote: > On Sat, Oct 08, 2016 at 02:08:06PM -0400, Dave Jones wrote: > > That code: matches this dissembly: > > > > for (i = seg + 1; i < iter->nr_segs; i++) { > > *whoa* > > OK, that loop in check_direct_IO() should be do

Re: btrfs_direct_IO oops

2016-10-08 Thread Al Viro
On Sat, Oct 08, 2016 at 02:08:06PM -0400, Dave Jones wrote: > That code: matches this dissembly: > > for (i = seg + 1; i < iter->nr_segs; i++) { *whoa* OK, that loop in check_direct_IO() should be done *ONLY* for iovec iter - even for a bvec one it's completely bogus, and for pip

btrfs_direct_IO oops

2016-10-08 Thread Dave Jones
Found this in logs this morning. First time I've seen this one. Might be related to some direct IO related changes I made in Trinity that is tickling some new path. Oops: [#1] PREEMPT SMP DEBUG_PAGEALLOC CPU: 2 PID: 25313 Comm: trinity-c18 Not tainted 4.8.0-think+ #7 task: 88040f7b1c00 t