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] [day] [month] [year] [list]
Message-ID: <20160427033746.GL18496@dastard>
Date:	Wed, 27 Apr 2016 13:37:46 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Christoph Hellwig <hch@...radead.org>,
	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 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@...morbit.com
--
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