From: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>
To: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
Cc: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
Dmitry Monakhov
<dmonlist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Ext4 Developers List
<linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: O_DIRECT as a hint, was: Re: [PATCH] ext4: refuse O_DIRECT opens for mode where DIO doesn't work
Date: Wed, 27 Apr 2016 13:37:46 +1000 [thread overview]
Message-ID: <20160427033746.GL18496@dastard> (raw)
In-Reply-To: <20160427032526.GC30021-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
On Tue, Apr 26, 2016 at 11:25:26PM -0400, Theodore Ts'o wrote:
> On Wed, Apr 27, 2016 at 12:27:46PM +1000, Dave Chinner wrote:
> > > At this point I wonder if we should simply treat O_DIRECT as a hint
> > > and always allow it, and just let the file system optimize for it
> > > (skip buffering, require alignment, relaxed Posix atomicy requirements)
> > > if it is set.
> >
> > I thought that's how most filesystems treated it, anyway. i.e.
> > anything they can't do via direct IO, they fell back to buffered IO
> > to complete (e.g. for allocation or append writes, etc). Hence why I
> > suggested the fallback rather than erroring out....
>
> No, some file systems return EINVAL on the open. In fact that's what
> the _require_odirect test in xfstests relies upon....
Sure, but that doesn't change the fact that many of the filesystems
that "support O_DIRECT" don't always do O_DIRECT - they
transparently do buffered IO instead and hence are treating O_DIRECT
as a hint once the file has been opened.
Cheers,
Dave.
--
Dave Chinner
david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org
prev parent reply other threads:[~2016-04-27 3:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-24 4:27 [PATCH] ext4: refuse O_DIRECT opens for mode where DIO doesn't work Theodore Ts'o
2016-04-25 9:35 ` Dmitry Monakhov
2016-04-25 23:49 ` Dave Chinner
2016-04-26 0:20 ` Theodore Ts'o
2016-04-26 8:14 ` O_DIRECT as a hint, was: " Christoph Hellwig
2016-04-26 15:07 ` Mike Marshall
[not found] ` <20160426081451.GA25616-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-27 2:16 ` Theodore Ts'o
[not found] ` <20160427021649.GA30021-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2016-04-27 2:22 ` Eric Sandeen
2016-04-27 2:25 ` Dave Chinner
2016-04-27 2:27 ` Dave Chinner
2016-04-27 3:25 ` Theodore Ts'o
[not found] ` <20160427032526.GC30021-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2016-04-27 3:37 ` Dave Chinner [this message]
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=20160427033746.GL18496@dastard \
--to=david-fqsqvqoi3ljby3ivrkzq2a@public.gmane.org \
--cc=dmonlist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.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).