From nobody Wed Aug 5 06:22:14 2026 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 4hFL131219z6mhRc for ; Wed, 05 Aug 2026 06:22:15 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hFL1241rgz3bqY for ; Wed, 05 Aug 2026 06:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785910934; 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=kXKZfTSSBjpuEVmuP/mdtlng/Ci/i5mctgQfU6qnRxY=; b=CZpvTLNt1ZHRoXcXC1tXsOGt4OU6D83ouitKlyT1eoM+dwFK0tudpKrp8WwM5VIe0DmbPC 3UsyIes78xcr93kC7/PVaA3vN1s7dztNSlIbG4bFZREO9M2RhFpY9Ud0IITJv8amTOuC4t NSDj2ebLsFAhPENwUJxknQ3lamEogbGZCNBmPrHI+YDkBHqD7+JB86AZm+QqcimmLAot9g VX2PJO18GYJgQ+OWxV9K24SadVB8+/oc8zlJmg3pHsJAHf4XtmgybuzKS6rfK9E8aBpR9W At69hw9M/Hc7bEgM6n0d98w1VQNtdmM2Is1ivUu2QNxr6axTuiv1XampGA6RXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785910934; a=rsa-sha256; cv=none; b=CLbxzALc/TsEA0cOgn7EaC4TCfdh6pyvoKi/mFm5acHGX7jdZlqBdYKvrG3NsCCT0vxOsk Kk2Zk3OZsDA5B/qM90o6zhds1dtEn6L6pubKLhRXnmcqPAJtSBnAbqRNwKa675pXf6NgEq oGWdWwmJWFhppA0Az5DkpELJBZMSeyL77o9pA8qYKuARdgJS2QGc9lcEjjSrupQ4AXDgJD VmLHC934S5kZIXIHY6dP5bl4+RdfmO8Tq93V1e3Af/Vdz25yJa1Zr6SFwHG4uZ+wBZR0Do cT9+U1fpvXS0rCbO4YUeUYrheSPcOoZGAe8oz1gUHgVEiA8D/y1rj+MdEwq1VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785910934; 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=kXKZfTSSBjpuEVmuP/mdtlng/Ci/i5mctgQfU6qnRxY=; b=AtL4G2iiBZHY2VL7fbYUbVG+Jrq5YZqYa/CzzlyDfO+RpNRrdU9pB8Ao3VefvBK4Jne9Y1 sWEkiIgEj6mVlES6r9iJTyMvzI/wJcGKYOL+wJ12r3tzhtrtebkS+4x4qiN9snYU1JOvoX 2boN0YDM+PoBhg8XHI1tbpAr4+JuHbrfMsh7uaXQyw4O26du8CYYwnttBDcr+JLZcErfYw HrNeqoNC1zpPlyc/m0VgywLLg2w417m96Dnh0PYBseCYesUy5Wynq19VlKR8aTpvXQSdtx yD5HntZsekB8DVijX2D4AGyw9aqnt6VFs6wvx+hZQgACdP8pQl1VoMZSMAzJPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hFL122jD7z6jx for ; Wed, 05 Aug 2026 06:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26580 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 05 Aug 2026 06:22:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5bdb00b44fbd - stable/15 - stat.2: enhance the description of st_blocks 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe Auto-Submitted: auto-generated Date: Wed, 05 Aug 2026 06:22:14 +0000 Message-Id: <6a72d696.26580.26cae130@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe commit 5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe Author: Konstantin Belousov AuthorDate: 2026-08-02 14:57:37 +0000 Commit: Konstantin Belousov CommitDate: 2026-08-05 06:12:47 +0000 stat.2: enhance the description of st_blocks (cherry picked from commit 4c58eef12d30ec699c86d9ab8939253adbf35e79) --- lib/libsys/stat.2 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/libsys/stat.2 b/lib/libsys/stat.2 index 8107740bd901..7119fa797f0a 100644 --- a/lib/libsys/stat.2 +++ b/lib/libsys/stat.2 @@ -263,9 +263,19 @@ File size in bytes. .It Va st_blksize Optimal I/O block size for the file. .It Va st_blocks -Actual number of blocks allocated for the file in 512-byte units. +Actual number of blocks allocated for the file. +.Pp +For files located on non-synthetic filesystems, the block size is 512 bytes. As short symbolic links are stored in the inode, this number may be zero. +.Pp +For file descriptors referencing specific non-file objects, +the field is type-specific. +For POSIX shared memory segments +.Pq see Xr shm_open 2 , +the block size is equal to +the platform page size +.Pq Xr getpagesize 2 . .El .Pp The access-related fields of