Subject: Re: letting userland issue FUA writes
To: Chuck Silvers <>
From: Bill Studenmund <>
List: tech-kern
Date: 03/15/2006 14:57:53
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 15, 2006 at 08:31:59AM -0800, Chuck Silvers wrote:
> On Wed, Mar 15, 2006 at 07:28:49AM -0800, Bill Studenmund wrote:
> > > this sounds like direct I/O, which I've talked about before (and which
> > > I am just getting back to looking at recently ).  a new O_DIRECT open=
> > > on regular files will mean that the read/write should go directly from
> > > disk to the application's address space without going through the
> > > page cache.  if the new behaviour you're talking about it just for
> > > raw disk devices, then we could interpret that flag to mean FUA on
> > > VCHR vnodes.  or are you talking about FUA with regular files?
> >=20
> > As above, I'm most interested in regular files.
> ok, then I assume that you are only considering this FUA issue in the con=
> of direct I/O?  (were you planning on implementing direct I/O as well?)

No, actually I'm not considering this in the context of direct I/O, but=20
I'm not against it either.

> > I'm not sure about O_DIRECT implying FUA. While I can think of apps tha=
> > want that, I am not sure if if there are or aren't apps that will want=
> > O_DIRECT but not care about FUA.
> yea, I was hoping to avoid dealing with the ambiguity.  but looking at the
> open() manpage, I see we have the O_{,R,D}SYNC flags to describe the level
> of persistence desired for the I/O, so I think we can use this to allow
> specification of both FUA and non-FUA behaviour:
> =09
> 	no flags		kernel caching, FUA is irrelevant
> 	O_DIRECT		no kernel caching, no FUA
> 	O_DIRECT|O_*SYNC	no kernel caching, FUA
> (I think O_*SYNC here would be either O_SYNC or O_DSYNC.)

I don't mind the settings for O_DIRECT, but I know there are times when I=
want FUA even with caching. Mainly I don't care much what the kernel does=
after the write, I just care about the moment of the write. :-)

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)