From patchwork Fri Aug 19 17:25:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 9290685 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 AE5A260574 for ; Fri, 19 Aug 2016 17:25:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DE31294E7 for ; Fri, 19 Aug 2016 17:25:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92410294F8; Fri, 19 Aug 2016 17:25:48 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 48E46294E7 for ; Fri, 19 Aug 2016 17:25:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754350AbcHSRZr (ORCPT ); Fri, 19 Aug 2016 13:25:47 -0400 Received: from mx141.netapp.com ([216.240.21.12]:12561 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755423AbcHSRZq (ORCPT ); Fri, 19 Aug 2016 13:25:46 -0400 X-IronPort-AV: E=Sophos;i="5.28,545,1464678000"; d="scan'208";a="140874713" Received: from vmwexchts04-prd.hq.netapp.com ([10.122.105.32]) by mx141-out.netapp.com with ESMTP; 19 Aug 2016 10:25:45 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCHTS04-PRD.hq.netapp.com (10.122.105.32) with Microsoft SMTP Server id 15.0.1210.3; Fri, 19 Aug 2016 10:25:45 -0700 Received: from netapp-41.nfsv4bat.org.localdomain (dros-16.vpn.netapp.com [10.55.78.186]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id u7JHPfq6014578; Fri, 19 Aug 2016 10:25:44 -0700 (PDT) From: To: CC: , , , Andy Adamson , Andy Adamson Subject: [PATCH Version-2 03/12] VFS permit cross device vfs_copy_file_range Date: Fri, 19 Aug 2016 13:25:03 -0400 Message-ID: <1471627512-4102-4-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1471627512-4102-1-git-send-email-andros@netapp.com> References: <1471627512-4102-1-git-send-email-andros@netapp.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Adamson NFSv4.2 inter server to server copy always copies across devices. Note: both btrfs and nfs have EXDEV checks in their copy_file_range functions. Signed-off-by: Andy Adamson --- fs/read_write.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index 1cbab4e..a6d3350 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1483,7 +1483,6 @@ ssize_t vfs_copy_file_range(struct file *file_in, loff_t pos_in, size_t len, unsigned int flags) { struct inode *inode_in = file_inode(file_in); - struct inode *inode_out = file_inode(file_out); ssize_t ret; if (flags != 0) @@ -1505,10 +1504,6 @@ ssize_t vfs_copy_file_range(struct file *file_in, loff_t pos_in, (file_out->f_flags & O_APPEND)) return -EBADF; - /* this could be relaxed once a method supports cross-fs copies */ - if (inode_in->i_sb != inode_out->i_sb) - return -EXDEV; - if (len == 0) return 0;