From nobody Fri Sep 19 17:11:56 2025 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 4cSzZN1zmWz68HpM; Fri, 19 Sep 2025 17:11:56 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cSzZN1LSKz4Kh3; Fri, 19 Sep 2025 17:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301916; 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=o1hZEbmom2reifomCybz/U0Ygs3ps8gJnJcR63bDN80=; b=IKynQS2fZVezytxcG2tK4xhkpVPGgkfvE/No7aexL6kX/dwfYxUxVzqS+nsSsR19XBe4e/ r7xpdIBjg7gyqOM3MvrJal2abF5B0YJ17Qxs4kBtjkg+Wxrcbk3kovK1XHB68AkPMITWwx sh/tjuTem5GP3Gz7OzLaRJJE0edgNnJpfrzEMXuXaNapL4gYXoKFy5ymA75hKmXlgVqg3w CuG0qY3Dq4IV8aONjzEM+bLAIerJ+wXkCmG99UC9Vh0z6C3XXgYIE/SbFqVNlcDqAtGac/ m7GG69AkYPyeQJeVwJby+pGgm+nXW+8M7pZCV8nBAi8nGqr8hFaw+/g4q/45Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758301916; 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=o1hZEbmom2reifomCybz/U0Ygs3ps8gJnJcR63bDN80=; b=SJEE6hvaDvLQSrwckfDsbgRc/6fByDYya1vGd7sUSDZHwfpC1qyJaSePFTSjnEFn5QFLoV /w/lTxYZBbIgEWkZgWztahSjwCj40PNlkq+IijeoDCCbx5fvU454df5Zpbvx/PL/v0N2d5 l/YUUUJmEXzVFE3IDjtYNeHLYFQRs6pzuHFz3DB7NZuUpEVCGyyU5T2Kjl9/G1hGO4bKJd n2CquZkim+ykpxdL/PyGcVMb7JivuZuqOdq6y01ZfOB0Ye1ZAykXnUNSxor+gyxYFinhHW YhxEfj4M6/J1IiXpcR1kS5aRjDgCr6z1Xte90skxSpkcawxKZ2e+p4QhguuJFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758301916; a=rsa-sha256; cv=none; b=OIDX7qEEiDCYJI41BY+I8xN6V4LWLY7O9LnSvseoTDbPs3BINdpuJGB8Z8xVYO8U48DA4d Zs1v3vvlTfuLJVIybO6T10nbciQlUIbcodDaT4YCwesAELLhUL4LVme/tOG775rc5A0Fkt SygMK8XC6p0PjVB/Y9QnBs1NeKV+XVvauMm5d3FTQHhGFm6yXzM1m/7iYTZcxFvwqEG/fK srIFiU8hR5JWjaBjQDHWHHsceGjhW7S8k3piAMkVO3eDflahbuLoiBk0+OPY21gvMImL3Y k0ZXaki81AVS0iKuFYKjClcb6Rj9DfF4LK2p3dye4lefxQxFr3b7kqUVcX+9qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cSzZN0hjpz15Ym; Fri, 19 Sep 2025 17:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58JHBu6J064276; Fri, 19 Sep 2025 17:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58JHBuBS064273; Fri, 19 Sep 2025 17:11:56 GMT (envelope-from git) Date: Fri, 19 Sep 2025 17:11:56 GMT Message-Id: <202509191711.58JHBuBS064273@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: 932e404f12c1 - main - Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 932e404f12c172e3d4ec47dedee02da400ef8f92 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=932e404f12c172e3d4ec47dedee02da400ef8f92 commit 932e404f12c172e3d4ec47dedee02da400ef8f92 Author: Konstantin Belousov AuthorDate: 2025-09-19 17:05:08 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-19 17:11:50 +0000 Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" This reverts commit 9a3edc8d5dbcb896179cfa7867f961184e146a09. Apparently returning EINVAL is more aggressive than UFS does it, and this causes compatibility issues with apps that actually trigger the behavior. PR: 289485, 289678 Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 4 +--- 1 file changed, 1 insertion(+), 3 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 8dce97baba66..411225786089 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 @@ -1698,7 +1698,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, objset_t *os; caddr_t outbuf; size_t bufsize; - ssize_t orig_resid; zap_cursor_t zc; zap_attribute_t *zap; uint_t bytes_wanted; @@ -1747,7 +1746,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, error = 0; os = zfsvfs->z_os; offset = zfs_uio_offset(uio); - orig_resid = zfs_uio_resid(uio); prefetch = zp->z_zn_prefetch; zap = zap_attribute_long_alloc(); @@ -1927,7 +1925,7 @@ update: kmem_free(outbuf, bufsize); if (error == ENOENT) - error = orig_resid == zfs_uio_resid(uio) ? EINVAL : 0; + error = 0; ZFS_ACCESSTIME_STAMP(zfsvfs, zp);