Message ID | 153923120833.5546.17948742293210510133.stgit@magnolia (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85D8017E1 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 11 Oct 2018 04:13:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C65125223 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 11 Oct 2018 04:13:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6021D28405; Thu, 11 Oct 2018 04:13:37 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E298C21E5A for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 11 Oct 2018 04:13:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C37C96B027B; Thu, 11 Oct 2018 00:13:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BE7696B027E; Thu, 11 Oct 2018 00:13:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0FCE6B027B; Thu, 11 Oct 2018 00:13:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by kanga.kvack.org (Postfix) with ESMTP id 72AB56B027B for <linux-mm@kvack.org>; Thu, 11 Oct 2018 00:13:35 -0400 (EDT) Received: by mail-pl1-f200.google.com with SMTP id t8-v6so5381181plo.4 for <linux-mm@kvack.org>; Wed, 10 Oct 2018 21:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:cc:date :message-id:in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=OTo0aS/v5GOSjQQZScdxEFPK/rxcY8PE4Z0I9lovRvs=; b=BeBAPNk6uxDYeKa5fjawHsguCbHvXDoM9A0OjvEKlQzZb9R4mdqORRyppHZiLXC02L 9H58qfkBqn+I33hcBodDzx5QspSmCdmFbhi/vrwsoXx5uV7F05a+tZe4OHCdTMku2w84 UY4xl2oD/7BVFIELK/YZcj8SKTrha4Zlao3ItAmvuiae641olQtBYnoeKGLt7IHT10H/ WcrxlWf6BHh4sGfPKWY9NpUaceuWeuHWFvNvx6sm8B6dGOjpULLSfoZSBvYai4g/upPa 7+Hj/PmNK0ha5/mGKNtpqio2zQod2zzKztbfr/fMhTXbIgDK7NTrkpU76rRbvY5Tejb1 YAbw== X-Gm-Message-State: ABuFfojXMu298KF1UxlxOTnf9DvdmhSKaBlCxuk+JJkNuAkvS1lygagJ qhZI7LqYfQ2Mp/VBsmztnFPj6sqLGL5kRhSZKP6l+4U9e1KUg0+nkx08vvABVT9vFyXGiQEcDIj yEjGDh5BJwlN3B0Im4qa/GCaRFbm/FioKOeTZK5dPlzpZ2bjgz8/d0uncIHyVGyf19w== X-Received: by 2002:a63:ea43:: with SMTP id l3-v6mr32425075pgk.427.1539231215145; Wed, 10 Oct 2018 21:13:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV60vFR+yk+bCfaYUz6ym2IzcYBJ+s6GKqAcsIgEgcgT/PqBUI1qlLUK0uSwavcQHL1KupVxN X-Received: by 2002:a63:ea43:: with SMTP id l3-v6mr32425052pgk.427.1539231214522; Wed, 10 Oct 2018 21:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539231214; cv=none; d=google.com; s=arc-20160816; b=aICV0sF7Yeq99DnzG5wMK+XYyPrnMOBRRR4hckg5l7P6CyTnrFCe9cRK+o9SRA8iBD lw0cGdsk/olpfajQO9J2SPoPQM9bVnox2iK38aOjL/Z2kJBihoc3L16Y72cDUbCicP4h Tju3QHlg8uO25THYRzhAIdA2MsgyTUvdYUf9fAOd5tCeNF1hDGxVMRT8htZVpIkihCD0 oJt7XW313dvEhpuxIkFVqm14gWnnEtIm785u2HC+kfvwdwV0U7lKT2rEDB56qFZs3ZvB CewleZzwyqKtFloBeUuX7GxJxoj8z4UYBhM2o3cKeIn9KSinZDLldEPafPuWhiQ3SiWU 1HpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject:dkim-signature; bh=OTo0aS/v5GOSjQQZScdxEFPK/rxcY8PE4Z0I9lovRvs=; b=SdqY9eHfy7PV0d13hai9SbHmPVoMklOdP/SVEpDCcs725h+5UIL2VQuQVzEVYkqtXl N4/gfR83xId0F4CRAc4sQJMZoZC5IRAhElH2A5+ZZhJY4LOqTaA3MTLPTkDFOKIRzEqU YYFwBAR1cjQ2bYhXWEth1uMWBH4/jjeeZgcz0V3VebgIjD+cqaIgHU5EAzkA+U7Zw/lU OzHd92J7PXJ8n23IKzKLCTbkMsimMuxwYTKU0FjtyMTzS6fbAKt1OTHl7kanVGjTC99g JkCJ8+QtQsXcN3gcpcxNd/LoK/bUSLmFZsHVBLovw0OeWIKbLWxg+1iW2rHaO/v3SFsD phRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=OBHMaLR+; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.86 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from userp2130.oracle.com (userp2130.oracle.com. [156.151.31.86]) by mx.google.com with ESMTPS id d92-v6si27766915pld.75.2018.10.10.21.13.34 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 21:13:34 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.86 as permitted sender) client-ip=156.151.31.86; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=OBHMaLR+; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.86 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com 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 w9B49JP8033639; Thu, 11 Oct 2018 04:13:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=OTo0aS/v5GOSjQQZScdxEFPK/rxcY8PE4Z0I9lovRvs=; b=OBHMaLR+njKd1GUsiB8lOuWmN2IixYZ+o+RPJmSARkPiZyuiF5BkrwwmjNztti5AGawJ wSMbFoPjYUfwVHwksUefeBfE/VK22WJyKddxYr8tGtTzqTlGRfldchkMBbj0cs1cZ3UT JpZMk2fLVE7m6aXpjnWpoF9+6u9cygr8PEq5NXsdOEunP1NTGKMIUWgppvFFiTacXcN/ Qyzm+O9vhNdR6Pvw00nul+jVI7K9XpWjCEWfg9ak190Tt9ce9tDPv8ux5q6hlhdfzjWm Hafq8h5ce7P6H1F2Ibpk+ApansVx7tvvApoToOQv5+RfDtaKFLhUNIhIrtlYueYzZfmE Aw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2mxmfu1fyc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Oct 2018 04:13:32 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9B4DUih015672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Oct 2018 04:13:31 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9B4DU2E010717; Thu, 11 Oct 2018 04:13:30 GMT Received: from localhost (/10.159.132.249) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 11 Oct 2018 04:13:29 +0000 Subject: [PATCH 09/25] vfs: rename clone_verify_area to remap_verify_area From: "Darrick J. Wong" <darrick.wong@oracle.com> To: david@fromorbit.com, darrick.wong@oracle.com Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, Amir Goldstein <amir73il@gmail.com>, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com Date: Wed, 10 Oct 2018 21:13:28 -0700 Message-ID: <153923120833.5546.17948742293210510133.stgit@magnolia> In-Reply-To: <153923113649.5546.9840926895953408273.stgit@magnolia> References: <153923113649.5546.9840926895953408273.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9042 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=708 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810110039 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
fs: fixes for serious clone/dedupe problems
|
expand
|
diff --git a/fs/read_write.c b/fs/read_write.c index ebf62ffca57b..60cdfb576d81 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1686,7 +1686,7 @@ SYSCALL_DEFINE6(copy_file_range, int, fd_in, loff_t __user *, off_in, return ret; } -static int clone_verify_area(struct file *file, loff_t pos, u64 len, bool write) +static int remap_verify_area(struct file *file, loff_t pos, u64 len, bool write) { struct inode *inode = file_inode(file); @@ -1839,11 +1839,11 @@ int do_clone_file_range(struct file *file_in, loff_t pos_in, if (!file_in->f_op->remap_file_range) return -EOPNOTSUPP; - ret = clone_verify_area(file_in, pos_in, len, false); + ret = remap_verify_area(file_in, pos_in, len, false); if (ret) return ret; - ret = clone_verify_area(file_out, pos_out, len, true); + ret = remap_verify_area(file_out, pos_out, len, true); if (ret) return ret; @@ -1976,7 +1976,7 @@ int vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, if (ret) return ret; - ret = clone_verify_area(dst_file, dst_pos, len, true); + ret = remap_verify_area(dst_file, dst_pos, len, true); if (ret < 0) goto out_drop_write; @@ -2038,7 +2038,7 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same) if (!S_ISREG(src->i_mode)) goto out; - ret = clone_verify_area(file, off, len, false); + ret = remap_verify_area(file, off, len, false); if (ret < 0) goto out; ret = 0;