From: Josef Bacik <josef@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Josef Bacik <josef@redhat.com>,
linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@vger.kernel.org
Subject: Re: [PATCH 1/3] fs: allow short direct-io reads to be completed via buffered IO
Date: Tue, 4 May 2010 11:27:50 -0400 [thread overview]
Message-ID: <20100504152749.GB2573@localhost.localdomain> (raw)
In-Reply-To: <20100504001418.GH2591@dastard>
On Tue, May 04, 2010 at 10:14:18AM +1000, Dave Chinner wrote:
> On Mon, May 03, 2010 at 01:27:02PM -0400, Josef Bacik wrote:
> > This is similar to what already happens in the write case. If we have a short
> > read while doing O_DIRECT, instead of just returning, fallthrough and try to
> > read the rest via buffered IO. BTRFS needs this because if we encounter a
> > compressed or inline extent during DIO, we need to fallback on buffered. If the
> > extent is compressed we need to read the entire thing into memory and
> > de-compress it into the users pages. I have tested this with fsx and everything
> > works great. Thanks,
>
> Won't this mean that any direct IO read that spans EOF (i.e. get a
> short read) now attempt a buffered IO (that will fail) before returning?
>
Hmm yeah you are right. What would be an acceptable way to avoid this, do a
if (retval || !count || ppos >= i_size_read(inode))
goto out;
type thing? Thanks,
Josef
next prev parent reply other threads:[~2010-05-04 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 17:27 [PATCH 1/3] fs: allow short direct-io reads to be completed via buffered IO Josef Bacik
2010-05-04 0:14 ` Dave Chinner
2010-05-04 15:27 ` Josef Bacik [this message]
2010-05-04 23:07 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2010-05-03 16:11 Josef Bacik
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=20100504152749.GB2573@localhost.localdomain \
--to=josef@redhat.com \
--cc=david@fromorbit.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@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).