Subject: letting userland issue FUA writes
To: None <tech-kern@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/14/2006 18:35:46
--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I'm interested in adding infrastructure so that applications can issue=20
writes that have the FUA (Force Unit Access) bit set. SCSI CDBs handle=20
this, as do some RAID cards.

The main question I have is what kind of user-level interfaces exist for=20
this? I certainly could cook up a new system call, but I would much rather=
=20
use prior art. My simplistic attempt at googling for this failed. Does=20
anyone else have suggestions?

Given the systemcall interface, driving it through the kernel isn't hard.=
=20
A flag here and a flag there, and it's set.

The only other key question I see is what do we do with a driver that=20
doesn't natively handle FUA? My instinct is to error-out the command, as=20
that is what will happen if you use FUA to a SCSI disk that doesn't=20
support it. The sub-question is should the driver do it, which means every=
=20
driver needs to catch this flag, or should we expose some sort of=20
capability and let some higher level of the queuing/processing system=20
catch the error.

Take care,

Bill

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

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

iD8DBQFEF32CWz+3JHUci9cRAhq2AKCWacCLwinugk2mJPMt7HK4+4ZXMgCcDo7I
PSVcabKMZOauKLkQ3cpNLUc=
=kBPm
-----END PGP SIGNATURE-----

--J2SCkAp4GZ/dPZZf--