Subject: Re: letting userland issue FUA writes
To: Bill Studenmund <wrstuden@NetBSD.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-kern
Date: 03/14/2006 23:41:53
On Tue, 14 Mar 2006 18:35:46 -0800, Bill Studenmund
<wrstuden@NetBSD.org> 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.
> 
> The main question I have is what kind of user-level interfaces exist for 
> this? I certainly could cook up a new system call, but I would much rather 
> use prior art. My simplistic attempt at googling for this failed. Does 
> anyone else have suggestions?
> 
> Given the systemcall interface, driving it through the kernel isn't hard. 
> 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?
> 
> The only other key question I see is what do we do with a driver that 
> doesn't natively handle FUA? My instinct is to error-out the command, as 
> that is what will happen if you use FUA to a SCSI disk that doesn't 
> support it. The sub-question is should the driver do it, which means every 
> driver needs to catch this flag, or should we expose some sort of 
> capability and let some higher level of the queuing/processing system 
> catch the error.
> 
> Take care,
> 
> Bill
> 


		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb