[PATCH 4/4] posix: Implement preadv2 and pwritev2
Zack Weinberg
zackw@panix.com
Fri Apr 28 15:33:00 GMT 2017
On Fri, Apr 28, 2017 at 10:29 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
> On 28/04/2017 11:14, Zack Weinberg wrote:
>>
>> Wouldn't it be better for the default implementation to fail if the
>> flags argument is nonzero? Especially for sync operations - if it
>> fails, applications can fall back to fsync or whatever, but if it
>> succeeds without actually performing a sync, that's asking for data
>> loss.
>
> I think it is a reasonable change, although I think it will make preadv2
> fallback fails in all the usable scenarios. However it is might be a
> hint to programmer that libc does not actually supports it. Would be
> better to just return ENOSYS then?
I don't have a strong opinion here. If we emulate where we can and
fail where we can't, though, that *might* provide a smoother upgrade
path when one of the targets that doesn't support it suddenly starts
supporting it.
zw
More information about the Libc-alpha
mailing list