lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 Apr 2016 21:22:20 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	"Theodore Ts'o" <tytso@....edu>,
	Christoph Hellwig <hch@...radead.org>
Cc:	Dave Chinner <david@...morbit.com>, torvalds@...ux-foundation.org,
	Dmitry Monakhov <dmonlist@...il.com>,
	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org
Subject: Re: O_DIRECT as a hint, was: Re: [PATCH] ext4: refuse O_DIRECT opens
 for mode where DIO doesn't work

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

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ