This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] posix: Implement preadv2 and pwritev2
> On 28 Apr 2017, at 12:33, Zack Weinberg <zackw@panix.com> wrote:
>
> 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.
Alright, it seems reasonable. I will update the patch with this modification.