From patchwork Mon Feb 5 16:50:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10200959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47329601A1 for ; Mon, 5 Feb 2018 16:50:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3707427F89 for ; Mon, 5 Feb 2018 16:50:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B75C2877F; Mon, 5 Feb 2018 16:50:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 167142876A for ; Mon, 5 Feb 2018 16:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753326AbeBEQuv (ORCPT ); Mon, 5 Feb 2018 11:50:51 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:37920 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbeBEQuu (ORCPT ); Mon, 5 Feb 2018 11:50:50 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w15GlNfl005384; Mon, 5 Feb 2018 16:50:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=pa3ZLm8eX4TNK2yiC0bEL+xrdEDDg4Z+8WI9SsNQwdc=; b=ba6kS2pq+QY2fkrQVWESds2h5Ea4OjEPda/qCPIcFbeh27D9rcxtgDvrVoEtC7KqP+ea BKshWtIfplQUSSKMZ7v9B/xzYUG9j87rVX6mlW9+v+KAgWOdLcDblQb/qU1ISVoWXt2v cBh4VKOyqy2xrSfojlVl89tpVDllNLQvzGgb9B9Ka/pAC2vCCSgaA7KwfW57TtKGjX/b 7aYJSnwmfM0v3NTHWhja5TxtyK/OtKTDGp+qgt4vjszc2JkuMd1aUh3XNpT9gZ742Fka ho0RkJGyXFLMiKAQsVtAuuEJ/VWTP1BENvp4wXK9QTS5ZbKz4zZEHcS8ZMBA/YVH96Mb Ag== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2fxt8prc4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Feb 2018 16:50:43 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w15Gofpr016659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 5 Feb 2018 16:50:43 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w15Godk1001816; Mon, 5 Feb 2018 16:50:39 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Feb 2018 08:50:39 -0800 Date: Mon, 5 Feb 2018 08:50:41 -0800 From: "Darrick J. Wong" 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 Message-ID: <20180205165041.GH4849@magnolia> References: <151760738102.29371.13542858379823064383.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <151760738102.29371.13542858379823064383.stgit@magnolia> User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8796 signatures=668662 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=820 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802050212 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong 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 Reviewed-by: Eric Sandeen --- io/copy_file_range.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }