Subject: Re: letting userland issue FUA writes
To: Joachim Koenig-Baltes <>
From: Thor Lancelot Simon <>
List: tech-kern
Date: 03/17/2006 16:37:23
On Fri, Mar 17, 2006 at 10:34:11PM +0100, Joachim Koenig-Baltes wrote:
> I agree that the pwritev is the right interface to handle
> it (and not fsync_range).
> But why do you want to restrict it to pwritev() and not provide it for
> writev(), pwrite() and write()?

Did I say that?

> pwrite() is a bit odd because the flags argument appears after offset
> and not after nbytes, but changing the "offset" argument position would
> be worse. Why was the offset not put into a "struct piovec" for pwritev,
> allowing for different chunks in the vector to be written to
> different positions in the file (and not contiguous) when the
> interface for pwritev was designed?

Unfortunately, there are a few different incompatible APIs for this basic
operation in different operating systems.  IIRC, the one in HP/UX works
exactly as you suggest, with an offset per iovec.  I think it might even
be named pwrite/pwritev, too, which opens up a whole different can of
worms. :-/

For us, for this purpose, now, a new API with flags and an offset per
chunk might be the best way to go.