From: Eric Sandeen <sandeen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@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: Tue, 26 Apr 2016 21:22:20 -0500 [thread overview]
Message-ID: <5720225C.3030305@redhat.com> (raw)
In-Reply-To: <20160427021649.GA30021-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
On 4/26/16 9:16 PM, Theodore Ts'o wrote:
> On Tue, Apr 26, 2016 at 01:14:51AM -0700, Christoph Hellwig wrote:
>> I've been doing an audit of our direct I/O implementations, and most
>> of them does some form of transparent fallback, including some that
>> only pretend to support O_DIRECT, but do anything special for it at all,
>> while at the same time we go through greast efforts to check a file
>> system actualy supports direct I/O, leading to nasty no-op ->direct_IO
>> implementations as we even got that abstraction wrong.
>>
>> 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.
>
> That's fine with me, but there ought to be some way for a program to
> query whether a particular file / file system is one where DIO is
> supported, and if so, what the alignment requirements would be. That
> way applications who care can get the information they need (and we
> can use it for xfstests's _require_odirect :-).
>
> - Ted
Well, we have xfs's XFS_IOC_DIOINFO which gives memory alignment and
io size/alignment constraints.
That could pretty easily be "hoisted" to the vfs so that any fs
could return the same info based on internal requirements, or EOPNOTSUPP
or something if dio is never possible.
We seemed to be talking about adding this to xstat, but I guess I
like the idea of a purpose-built interface, not an all-singing,
all-dancing file/filesystem query ...
-Eric
next prev parent reply other threads:[~2016-04-27 2:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1461472078-20104-1-git-send-email-tytso@mit.edu>
[not found] ` <877ffmhvzt.fsf@openvz.org>
[not found] ` <20160425234946.GB26977@dastard>
2016-04-26 8:14 ` O_DIRECT as a hint, was: Re: [PATCH] ext4: refuse O_DIRECT opens for mode where DIO doesn't work 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 [this message]
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
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=5720225C.3030305@redhat.com \
--to=sandeen-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=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).