linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: btrfs_direct_IO oops
Date: Sat, 8 Oct 2016 19:20:08 -0400	[thread overview]
Message-ID: <20161008232008.nouzkd54kiquvpir@codemonkey.org.uk> (raw)
In-Reply-To: <20161008182903.GU19539@ZenIV.linux.org.uk>

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 done *ONLY* for
 > iovec iter - even for a bvec one it's completely bogus, and
 > for pipe ones it blows up immediately.
 > 
 > Sorry, I'd missed that bogosity - replace
 >         if (iov_iter_rw(iter) == WRITE)
 > 		return 0;
 > with
 > 	if (iov_iter_rw(iter) != READ || !iter_is_iovec(iter))
 > 		return 0;
 > in there; that should fix the damn thing.

Yep, seems to do the trick. Have been running the last six hours
without seeing it or anything similar since.

	Dave

  reply	other threads:[~2016-10-08 23:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-08 18:08 btrfs_direct_IO oops Dave Jones
2016-10-08 18:29 ` Al Viro
2016-10-08 23:20   ` Dave Jones [this message]
2016-10-09 15:11     ` Dave Jones
2016-10-10  3:43       ` Al Viro
2016-10-10 13:11         ` Dave Jones
2016-10-10 15:55           ` Al Viro
2016-10-10 17:17             ` Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161008232008.nouzkd54kiquvpir@codemonkey.org.uk \
    --to=davej@codemonkey.org.uk \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).