From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Florian Weimer <fweimer@redhat.com>, Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [PATCH 1/2] copy-file-range: new module
Date: Thu, 06 Jun 2019 02:45:10 +0200 [thread overview]
Message-ID: <2338180.aFmylSiWKY@omega> (raw)
In-Reply-To: <87o93cuohi.fsf@oldenburg2.str.redhat.com>
Florian Weimer wrote:
> This is not a valid implementation of copy_file_range anymore. Please
> see the discussion here:
>
> <https://sourceware.org/ml/libc-alpha/2019-06/msg00039.html>
>
> If you ship this in gnulib, you should at least call this function by a
> different name.
I disagree, for two reasons:
1) Gnulib takes the freedom to adjust the behaviour of functions found in
various system libcs. The Gnulib documentation [1] has plenty of examples
of this practice.
Gnulib typically documents the differences in the corresponding doc section.
The doc does not yet have a section regarding copy_file_range, but I'll add
it in the next couple of days.
Alternatively, Gnulib can also adjust for the "both descriptors refer to
the same open file" case, by testing SAME_INODE (instat, outstat) and either
using special code with lseek for this case, or just return -1/EINVAL.
2) Shared libraries which use Gnulib functions have various techniques for
hiding the Gnulib overrides from the main program, so that the main program
can still use the original function from the system libc.
If you think that no other source code than libc should define a function that
has the same name as copy_file_range, you should better call that function
__copy_file_range or kernel_copy_file_range, or similar.
Bruno
[1] https://www.gnu.org/software/gnulib/manual/gnulib.html
next prev parent reply other threads:[~2019-06-06 0:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 6:09 [PATCH 1/2] copy-file-range: new module Paul Eggert
2019-06-05 6:09 ` [PATCH 2/2] copy-file: prefer copy_file_range Paul Eggert
2019-06-05 13:54 ` [PATCH 1/2] copy-file-range: new module Florian Weimer
2019-06-06 0:45 ` Bruno Haible [this message]
2019-06-07 8:04 ` Paul Eggert
2019-06-28 18:56 ` Pádraig Brady
2019-06-28 19:30 ` Bruno Haible
2019-06-28 20:18 ` Florian Weimer
2019-06-28 22:46 ` Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2338180.aFmylSiWKY@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).