NOW: o_direct -- WAS: Re: WARNING in xfs_lwr.c, xfs_write()

Stewart Smith stewart at flamingspork.com
Thu May 27 08:58:55 CDT 2010


On Thu, 27 May 2010 07:47:37 -0400, Christoph Hellwig <hch at infradead.org> wrote:
> O_DIRECT is not a Posix standard and not very portable.  It originated
> on IRIX, and Linux inherited it during the 2.4 kernel series days.
> These days FreeBSD/NetBSD and AIX support it as well, but for example
> Solaris, HP-UX and OpenBSD don't, nevermind Windows or Mac OS.

There is O_DIRECT type functionality available on Windows, with similar
restrictions for aligned IO too. You have to use the Win32 APIs to do it
though, the POSIX ones won't get you it (or more than 2048 files open at
once).

In practice we've only ever found Solaris (other than linux) to be
reliable with O_DIRECT (at least on UFS... ZFS is... well... I wouldn't
run a database server on it yet).

-- 
Stewart Smith




More information about the xfs mailing list