This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Change sync_file_range to be non-cancellable
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org, Rich Felker <dalias at libc dot org>
- Date: Wed, 21 Oct 2015 14:48:03 +0100
- Subject: Re: [PATCH] Change sync_file_range to be non-cancellable
- Authentication-results: sourceware.org; auth=none
- References: <1445430841-25953-1-git-send-email-adhemerval dot zanella at linaro dot com> <56279221 dot 3080201 at redhat dot com>
On 21/10/15 14:24, Florian Weimer wrote:
On 10/21/2015 02:34 PM, Adhemerval Zanella wrote:
This patch changes the linux specific sync_file_range syscalls to be
non-cancellable. The rationale is:
1. This is a Linux specific syscall that is not mentioned in POSIX
cancellable entrypoints [1] and the standard states and implementation
shall not introduce cancellation points into any other functions
specified.
It says that we must not make any function mentioned in POSIX
cancellable. We can certainly introduce our own functions which are
cancellable and not port of POSIX.
I think sync_file_range should be cancellable for consistency with fsync
and fdatasync.
this is something musl might want too.
one ugliness is that cancellation is either guaranteed
to be acted upon or guaranteed not to, which is bad
for all cases when there is a fast path in libc that
avoids calling the blocking syscall.
e.g. sync_file_range is not a cancellation point now
if it returns ENOSYS in glibc.
Florian