From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@redhat.com
Cc: linux-xfs@vger.kernel.org, fredrik@crux.nu
Subject: [PATCH 5/4] xfs_io: fix copy_file_range symbol name collision
Date: Mon, 5 Feb 2018 08:50:41 -0800 [thread overview]
Message-ID: <20180205165041.GH4849@magnolia> (raw)
In-Reply-To: <151760738102.29371.13542858379823064383.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
glibc 2.27 has a copy_file_range wrapper, so we need to change our
internal function out of the way to avoid compiler warnings.
Reported-by: fredrik@crux.nu
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
io/copy_file_range.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/io/copy_file_range.c b/io/copy_file_range.c
index d1dfc5a..99fba20 100644
--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -42,13 +42,18 @@ copy_range_help(void)
"));
}
+/*
+ * Issue a raw copy_file_range syscall; for our test program we don't want the
+ * glibc buffered copy fallback.
+ */
static loff_t
-copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len)
+copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len)
{
loff_t ret;
do {
- ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0);
+ ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst,
+ len, 0);
if (ret == -1) {
perror("copy_range");
return errno;
@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv)
copy_dst_truncate();
}
- ret = copy_file_range(fd, &src, &dst, len);
+ ret = copy_file_range_cmd(fd, &src, &dst, len);
close(fd);
return ret;
}
next prev parent reply other threads:[~2018-02-05 16:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 21:36 [PATCH 0/4] xfsprogs: 4.15 rollup pt. 4 Darrick J. Wong
2018-02-02 21:36 ` [PATCH 1/4] mkfs: don't create realtime filesystems with reflink enabled Darrick J. Wong
2018-02-02 21:38 ` Eric Sandeen
2018-02-02 21:36 ` [PATCH 2/4] xfs_scrub: close dir_fd if we don't get a DIR pointer Darrick J. Wong
2018-02-02 21:39 ` Eric Sandeen
2018-02-02 21:36 ` [PATCH 3/4] xfs_scrub: kill dead code Darrick J. Wong
2018-02-02 21:46 ` Eric Sandeen
2018-02-02 21:36 ` [PATCH 4/4] xfs_scrub: log operational messages when interactive Darrick J. Wong
2018-02-05 16:50 ` Darrick J. Wong [this message]
2018-02-05 17:21 ` [PATCH 5/4] xfs_io: fix copy_file_range symbol name collision Eric Sandeen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180205165041.GH4849@magnolia \
--to=darrick.wong@oracle.com \
--cc=fredrik@crux.nu \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@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 NNTP newsgroup(s).