From patchwork Thu Oct 25 21:51:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olga Kornievskaia X-Patchwork-Id: 10656653 Return-Path: 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 6B4481751 for ; Thu, 25 Oct 2018 21:51:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E7A92C58F for ; Thu, 25 Oct 2018 21:51:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52F402BC1C; Thu, 25 Oct 2018 21:51:56 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 E5F6E2BC1C for ; Thu, 25 Oct 2018 21:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbeJZG0S (ORCPT ); Fri, 26 Oct 2018 02:26:18 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:35057 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727578AbeJZG0R (ORCPT ); Fri, 26 Oct 2018 02:26:17 -0400 Received: by mail-qk1-f195.google.com with SMTP id v68-v6so6728016qka.2; Thu, 25 Oct 2018 14:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UmzhoFSi/XlLp/EenFokB0pc/jS5RPLJ6Yk/5FBSErU=; b=axdgHdJZjNIM7X6QAuKGfxCRVD4RvSH6gsPCJUFeYYnyvHuq5OS61VGmSOdoqqvk8A HTRWCvDkKu9TIfTZKAbkhYSSWIqjkKMLzdajVKu+tWd70R6Mhi1rPhOhAb3PikruLI0X L4y3ft1agstCW5touhGv3CYz4ti7/rfjU2fuoHpeecKMOfxNarjxdirNk8Qb6vjlpbTP PV3yc19hYwnARxHGWtTcZXJtxN+ky2EGHlCabNsKS82WaUqGnP82jBajd1PzW9jwJL09 jD/n1PiqzrHWZ91XCJwbp6UwJr9KDrmI2XIMNRECj4iZXE1XyOMPKp7yNNOiqZVz2tB9 iVSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UmzhoFSi/XlLp/EenFokB0pc/jS5RPLJ6Yk/5FBSErU=; b=kejnRKU3H3a8KLMxyAlPwQ77/TtOVAwOKP3CYlBKwzjH4eu65aqbbpPYzIeYnIri/c fOH2VwYYsWb9rLiCAiShQjcMANDML+6eV9Bt/SOYnObfQf8aUUYzyQUJKpItOq3Focg6 8GUzZ52mWSOSSet0Fj7RFhQzoA/cAm92cu8tucWi+TH1QQu2csIvgdTaiPGOPn5y/NDr vFJJtFLZtn9peDv8NtKkWFPFbLAN6BZXmu5mMEO1mUbxQPOD+oUDEcSCCM+x6x/E9PCf EvOcAYbm6fIxVr4HyfE0H73KqKa9fBlOM5DQGjw5r9wRwEjXXC2J4t9OkFoWLzpmUY1I /pAA== X-Gm-Message-State: AGRZ1gIfg20JIoWTdbFGvqieBrICWfqEcERKGUllVie+YsDv/an7e24D pq9r5cER6h22negaCnltyWM= X-Google-Smtp-Source: AJdET5d2jmrcOqonkXIfNUerrHuZk576WIYNxbX5v7ZrMJUPufvAvAYWZ9yay2Cr6rJ8l9UDVv/6CA== X-Received: by 2002:a37:b9c6:: with SMTP id j189-v6mr841172qkf.203.1540504312971; Thu, 25 Oct 2018 14:51:52 -0700 (PDT) Received: from Olgas-MBP-195.attlocal.net (172-10-226-31.lightspeed.livnmi.sbcglobal.net. [172.10.226.31]) by smtp.gmail.com with ESMTPSA id p64-v6sm5895927qkc.96.2018.10.25.14.51.51 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 25 Oct 2018 14:51:52 -0700 (PDT) From: Olga Kornievskaia To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, viro@zeniv.linux.org.uk, smfrench@gmail.com, miklos@szeredi.hu Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-man@vger.kernel.org Subject: [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Date: Thu, 25 Oct 2018 17:51:37 -0400 Message-Id: <20181025215147.36248-3-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) In-Reply-To: <20181025215147.36248-1-olga.kornievskaia@gmail.com> References: <20181025215147.36248-1-olga.kornievskaia@gmail.com> 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: Olga Kornievskaia A proposed VFS change removes the check for the files to reside under the same file system. Instead, a file system driver implementation is allowed to perform a cross-device copy_file_range() and if the file system fails to support it instead fallback to doing a do_splice copy. Therefore, EXDEV error code only applies to kernel version prior to such support. Signed-off-by: Olga Kornievskaia --- man2/copy_file_range.2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man2/copy_file_range.2 b/man2/copy_file_range.2 index 20374ab..2cd9fae 100644 --- a/man2/copy_file_range.2 +++ b/man2/copy_file_range.2 @@ -39,7 +39,8 @@ The .BR copy_file_range () system call performs an in-kernel copy between two file descriptors without the additional cost of transferring data from the kernel to user space -and then back into the kernel. +and then back into the kernel. Since kernel version 4.21(???) passed in +file descriptors are not required to be under the same mounted file system. It copies up to .I len bytes of data from file descriptor @@ -131,7 +132,8 @@ There is not enough space on the target filesystem to complete the copy. .B EXDEV The files referred to by .IR file_in " and " file_out -are not on the same mounted filesystem. +are not on the same mounted filesystem when the kernel does not support +cross device file copy. .SH VERSIONS The .BR copy_file_range ()