From nobody Tue Dec 5 00:44:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SkhcJ71K5z532pS; Tue, 5 Dec 2023 00:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SkhcJ6Nj4z4csm; Tue, 5 Dec 2023 00:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701737040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UXgSFZu2YfDUqiuITjvWBY5d8R4XcndiHzHkaS4xWeI=; b=KzlEPq/4QQnk2LD0EJMwIhCjPBa/8O9TrG5sSl6LmoADG2J6a5bIDLTqjw7dWRYRutn9iN jra44nVmlDHouZfC97tC3SnQzeRnYOFIwmNtKdvcpNQMoOgc27aNNz0EcjtL5lNpQfBHwZ D1r3Ed3GGXf+5IYcSTykezzwf5rHbvGlaozmVwE+H5UPPiN7pNU10irTn/tS7JLhxUJX6B J0iwq562/ipQprcMksdlpoCv3c04yrTEPDqX2wbvXz/vBXZzisDgDMOm0ZHQiJrgZzG5CD 5Kxv5jQzIVENHD9oUb4Dnrgs7OBb7lnP54B0C+3htZVMH3wQIG29kjUQQlTNEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701737040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UXgSFZu2YfDUqiuITjvWBY5d8R4XcndiHzHkaS4xWeI=; b=t9FqFcudfLS0IHJgPx5Wf9Pfe1hLv0kXEEMAkihJQXPHwKVwATlThH2rtujvB7WpbAUPrO 2632hCdVzsbRPdygiVn5ye+SpKf1Ol1+O/npOHmnWxEdV2oJ+OSSdBxV+iVFh3GFHLJjbJ qNF4NeqHY4qBJBHOERG2fgXXLk7nIS4y50ALgafQ0hclGABHXxyDGMjMUEUrdQMUss/O87 tO9SES7kQ4aQBR68m2Pbnq9VWGcxw8CFGrm7BfIVAWtjz48KMcoa3WLd8XC7NPequ2ZT1U 8PV7+VkKz0UZbEmPKjGC8dmFfjGqslICX6SzngWpsMK1rb9GqaZW2rsv2vXKFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701737040; a=rsa-sha256; cv=none; b=frsrB72OwoaKndQODl9D+M4y6OS4GHXbqXvcqD9Rafh7sRl5cKiq100H6tuJLhZiAzwyNJ xU7TNKLgcC5RbGmU6fWuAHZjxxlWyuavkBfv1d0qNtcCte7jdcLipeK0G2U93m90BHq/dL UNcgItSP8fxmfDAvkK7dcag9YHVPpwrCb/PkCVySwTxMnUMpCxzX9d9gxrTY8cWaENaRjU d2vPomuU9YeP2F1mNUM864bcCrnDo7oZditcDGF7gm6E7FxINSJQpZ33YCBynqUUkvhXY5 hIaKLdDlaWQH1zZ5GlpJaMuOKv4uUwsSSG5MiXH/xpKyyks6JfEP1Yo/ZEUdqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SkhcJ5PgGzpLK; Tue, 5 Dec 2023 00:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B50i04i029965; Tue, 5 Dec 2023 00:44:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B50i0m4029962; Tue, 5 Dec 2023 00:44:00 GMT (envelope-from git) Date: Tue, 5 Dec 2023 00:44:00 GMT Message-Id: <202312050044.3B50i0m4029962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c99f50351c73 - stable/14 - vn_copy_file_range(): provide ENOSYS fallback to vn_generic_copy_file_range() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c99f50351c7390dbd370f836361dfce0d738f566 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c99f50351c7390dbd370f836361dfce0d738f566 commit c99f50351c7390dbd370f836361dfce0d738f566 Author: Konstantin Belousov AuthorDate: 2023-11-18 08:59:19 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-05 00:43:27 +0000 vn_copy_file_range(): provide ENOSYS fallback to vn_generic_copy_file_range() (cherry picked from commit c5405d1c850765d04f74067ebb71f57e9a26b8ea) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 4 +--- sys/fs/fuse/fuse_vnops.c | 7 ++----- sys/fs/nfsclient/nfs_clvnops.c | 4 +--- sys/kern/vfs_vnops.c | 2 ++ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 05f28033be6a..3302f043620a 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -6315,9 +6315,7 @@ bad_locked_fallback: bad_write_fallback: if (mp != NULL) vn_finished_write(mp); - error = vn_generic_copy_file_range(ap->a_invp, ap->a_inoffp, - ap->a_outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, - ap->a_incred, ap->a_outcred, ap->a_fsizetd); + error = ENOSYS; return (error); } #endif diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index b9e4e48e6dbd..9728afb66654 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -861,6 +861,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) pid_t pid; int err; + err = ENOSYS; if (mp == NULL || mp != vnode_mount(outvp)) goto fallback; @@ -943,13 +944,9 @@ unlock: VOP_UNLOCK(invp); VOP_UNLOCK(outvp); - if (err == ENOSYS) { + if (err == ENOSYS) fsess_set_notimpl(mp, FUSE_COPY_FILE_RANGE); fallback: - err = vn_generic_copy_file_range(ap->a_invp, ap->a_inoffp, - ap->a_outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, - ap->a_incred, ap->a_outcred, ap->a_fsizetd); - } /* * No need to call vn_rlimit_fsizex_res before return, since the uio is diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 63cb9eaec7b7..cfb5e90739a4 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3888,9 +3888,7 @@ nfs_copy_file_range(struct vop_copy_file_range_args *ap) */ if (invp == outvp || invp->v_mount != outvp->v_mount) { generic_copy: - return (vn_generic_copy_file_range(invp, ap->a_inoffp, - outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, - ap->a_incred, ap->a_outcred, ap->a_fsizetd)); + return (ENOSYS); } /* Lock both vnodes, avoiding risk of deadlock. */ diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 6e8a6b23eec6..e6a4b074b4e5 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3144,6 +3144,8 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, error = VOP_COPY_FILE_RANGE(invpl, inoffp, outvpl, outoffp, lenp, flags, incred, outcred, fsize_td); else + error = ENOSYS; + if (error == ENOSYS) error = vn_generic_copy_file_range(invpl, inoffp, outvpl, outoffp, lenp, flags, incred, outcred, fsize_td); vfs_unbusy(outmp);