From nobody Tue Nov 28 17:33:25 2023 X-Original-To: dev-commits-src-all@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 4SfqLF2XN0z52GmD; Tue, 28 Nov 2023 17:33:25 +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 4SfqLF20F1z4Flj; Tue, 28 Nov 2023 17:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701192805; 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=bO5qvUzlIp2EMUReifs4VrvbdCuDySNjveJrHb9dLz4=; b=snMqJ4Z8DJ09GfXIGCn8On3nnr1oIRd42AHwkELRHQxGrH/ooFtcLZIWqWUflsDUh1uic4 AOge+sbCHdCGpacctSKjjQ3L7yGR9IZyjd3F6QB8Kk77yTUeyN3fG+yd2Kki9R61+aCOo6 oMNf4VZ8UHolU0PX7mG44AcnGTyQ+dEdaPB1eqIy8Gq1QZwMu6Lv7LTKSAC61OK7NhRZrc Epb38ucoKGZy710hlvivS9CgTnstEbaJ6Lr9c1kHetZY1XJy0BbkXqm8fuX2AHnWF0JGfz G3Lj2EjlsQEj2hj7JXyzOE0+H2QtKet+Dd/vgd4zaFebl2x3SXaTPoZ7pqgOdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701192805; 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=bO5qvUzlIp2EMUReifs4VrvbdCuDySNjveJrHb9dLz4=; b=eP8Vi4L0uXYQBXlWydEvEZZq4s0avFwpOxPwm6gucPxygipwDL8Ll8Hg+4ELIpMnTbPixY xvHNdVcPCv+Rkx5NmT8dqlenDH7awAQ22bNUuRSyqHinTqw1LIsdZvZ4IblBconoIxAIdV idDqew7wfX5NCyTtBfwtdPgkUUm6SC0zU0cWNo9Yy5bkQR0Hyw0pW3PU3JWsmJtrOCIEDW pwYB+vs7uJXfqyMwj+m7/CTU9UzYxMCekaVW8iCUgbCiRHK7q/hBJTXB6QJQ9uR4lo3aRV J3wOAGk7kFkOO6a6iKcF5tMlXf9XknwEX2WnU2EHx1P1Fi1kn5IWyStbnCTpVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701192805; a=rsa-sha256; cv=none; b=P+Aga9/7MmsNPPGjWilbEA5OwXe9OEJAa7VUZUz9J9K3L2JbtVgMkx4dpvz6jI0i36n/ly t99Eff5/89anjehLaG6Sluaf9x1CIq2p4dosCtFllWvG5LnUjTjmv+gc5WLX6zFWHujqjp Y25Ab5g5TrszhqHlT1/w4+AjGOnoLdemSyCya3VqAkFC+LR4zYjT1hGbBC94GAgLLOkfiF Vbz72RjY1k/Ehfv9AmJsncUSfEwXhyX6qDHWu8aTvxou0ZEXS9G520tKKJez0HfxWQMxWm Pfm/VABbFBrRgQCBa0WnCRTC3zd+dVBKl+lRxpx1KHzeuzjgDCAQrWnvRRSz3Q== 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 4SfqLF14dFzWx8; Tue, 28 Nov 2023 17:33:25 +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 3ASHXPlx028933; Tue, 28 Nov 2023 17:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ASHXPKM028930; Tue, 28 Nov 2023 17:33:25 GMT (envelope-from git) Date: Tue, 28 Nov 2023 17:33:25 GMT Message-Id: <202311281733.3ASHXPKM028930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c5405d1c8507 - main - vn_copy_file_range(): provide ENOSYS fallback to vn_generic_copy_file_range() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: c5405d1c850765d04f74067ebb71f57e9a26b8ea Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c5405d1c850765d04f74067ebb71f57e9a26b8ea commit c5405d1c850765d04f74067ebb71f57e9a26b8ea Author: Konstantin Belousov AuthorDate: 2023-11-18 08:59:19 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-28 17:32:53 +0000 vn_copy_file_range(): provide ENOSYS fallback to vn_generic_copy_file_range() Reviewed by: markj, Olivier Certner Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42603 --- 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 107cd69c756c..ccd708550f5b 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 @@ -6321,9 +6321,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); } diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 42ed3e36b946..30965b45215d 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -860,6 +860,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; @@ -942,13 +943,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 00b6c7617101..5c9ca69b5d51 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 29114f795f5e..7fe861ccaee7 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3142,6 +3142,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);