This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/4] posix: Implement preadv2 and pwritev2


On Thu, Apr 27, 2017 at 5:30 PM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> On default 'posix' implementation trying to emulate the Linux supported
> flags is troublesome:
>
>    * We can not temporary change the file state of the O_DSYNC and O_SYNC
>      flags to emulate RWF_{D}SYNC (attempts to change the state of using
>      fcntl are silently ignored).
>
>    * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal
>      semantic not provided by any other flag (O_NONBLOCK for instance).
>
> So default implementation just ignore the flag argument and calls generic
> preadv/pwritev.

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.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]