From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Jones <davej@codemonkey.org.uk>, 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: Mon, 10 Oct 2016 16:55:03 +0100 [thread overview]
Message-ID: <20161010155503.GZ19539@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20161010131122.cjmoof6yblwl7tak@codemonkey.org.uk>
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
> [ffffffffb9a21100 ffffea00126019c0 0 4096]
> [ (null) ffffea0013746440 0 0]
> [ (null) ffffea00132956c0 0 0]
> [ (null) ffffea0013295700 0 0]
> [ (null) ffffea0013295740 0 0]
> [ (null) ffffea0013295780 0 0]
> [ (null) ffffea00132957c0 0 0]
> [ (null) ffffea0013595c00 0 0]
> [ (null) ffffea0012b1b6c0 0 0]
> [ (null) (null) 0 0]
> [ (null) (null) 0 0]
> [ (null) (null) 0 0]
> [ (null) (null) 0 0]
> [ (null) (null) 0 0]
> [ (null) (null) 0 0]
> [ (null) (null) 0 0]
> ------------[ cut here ]------------
> 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
> ffffc90000963ae8
> ffffffffb93e22d1
> 0000000000000000
> 0000000000000000
>
> ffffffffb9c1e1cb
> ffffffffb93fa5b2
> ffffc90000963b28
> ffffffffb908b010
>
> 00000147d43c0e7f
> ffffffffb9c1e1cb
> 0000000000000147
> 0000000000000010
What are these from? Confused...
> Call Trace:
[via splice_direct_to_actor()]
Hmmm... I think I see it. Could you try the following (on top of debugging
in lib/iov_iter.c) and see if anything triggers?
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index bfc2aa7..b63d8c5 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -319,7 +319,7 @@ xfs_file_dio_aio_read(
data = *to;
ret = __blockdev_direct_IO(iocb, inode, target->bt_bdev, &data,
xfs_get_blocks_direct, NULL, NULL, 0);
- if (ret > 0) {
+ if (ret >= 0) {
iocb->ki_pos += ret;
iov_iter_advance(to, ret);
}
diff --git a/mm/filemap.c b/mm/filemap.c
index 68f1813..88e5ddd 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1935,7 +1935,7 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
file_accessed(file);
retval = mapping->a_ops->direct_IO(iocb, &data);
- if (retval > 0) {
+ if (retval >= 0) {
iocb->ki_pos += retval;
iov_iter_advance(iter, retval);
}
next prev parent reply other threads:[~2016-10-10 15:55 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
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 [this message]
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=20161010155503.GZ19539@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=clm@fb.com \
--cc=davej@codemonkey.org.uk \
--cc=dsterba@suse.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).