Subject: Re: letting userland issue FUA writes
To: Chuck Silvers <chuq@chuq.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/15/2006 07:28:49
--W5WqUoFLvi1M7tJE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 15, 2006 at 06:47:37AM -0800, Chuck Silvers wrote:
> On Tue, Mar 14, 2006 at 11:03:20PM -0800, Bill Studenmund wrote:
> > On Tue, Mar 14, 2006 at 11:41:53PM -0500, Steven M. Bellovin wrote:
> > > On Tue, 14 Mar 2006 18:35:46 -0800, Bill Studenmund
> > > <wrstuden@NetBSD.org> wrote:
> > >=20
>=20
> are you intending this for regular files or raw disk devices or both?

I am interested in regular files, but I probably can be talked into seeing=
=20
about doing it for both.

> > What I really want is to be able to issue some writes with FUA set and=
=20
> > some with FUA cleared.
> >=20
> > If for instance you are implementing a SCSI device in software (say an=
=20
> > iSCSI target), you do not know before hand if you are going to get FUA-=
set=20
> > or FUA-cleared writes.
> >=20
> > However it probably should be good to have a descriptor-level flag, so=
=20
> > that things like a database can just get FUA for all writes.
> >=20
> > Such a thing wouldn't be hard, as all writes pile into dofilewrite() an=
d=20
> > dofilewritev() now. So they, or vn_write(), could just set the flag if=
=20
> > requested.
>=20
>=20
> 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 flag
> 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?

As above, I'm most interested in regular files.

I'm not sure about O_DIRECT implying FUA. While I can think of apps that=20
want that, I am not sure if if there are or aren't apps that will want=20
O_DIRECT but not care about FUA.

Take care,

Bill

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFEGDKxWz+3JHUci9cRAgznAJ9RVTQYGmu3fEyfFmZmEMXdtXbARQCfS3iv
AlubPZwFBT7mX8JfH86qGPo=
=UANc
-----END PGP SIGNATURE-----

--W5WqUoFLvi1M7tJE--