Subject: Re: letting userland issue FUA writes
To: Steven M. Bellovin <>
From: Bill Studenmund <>
List: tech-kern
Date: 03/14/2006 23:03:20
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
> <> wrote:
> > I'm interested in adding infrastructure so that applications can issue=
> > writes that have the FUA (Force Unit Access) bit set. SCSI CDBs handle=
> > this, as do some RAID cards.
> >=20
> > The main question I have is what kind of user-level interfaces exist fo=
> > this? I certainly could cook up a new system call, but I would much rat=
> > use prior art. My simplistic attempt at googling for this failed. Does=
> > anyone else have suggestions?
> >=20
> > Given the systemcall interface, driving it through the kernel isn't har=
> > A flag here and a flag there, and it's set.
> Given that it pertains to a file descriptor, shouldn't it be an ioctl?

What I really want is to be able to issue some writes with FUA set and=20
some with FUA cleared.

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=
or FUA-cleared writes.

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.

Such a thing wouldn't be hard, as all writes pile into dofilewrite() and=20
dofilewritev() now. So they, or vn_write(), could just set the flag if=20

Take care,


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

Version: GnuPG v1.2.3 (NetBSD)