From nobody Sun Aug 2 22:17:50 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 4hCvM74hmZz6mST2 for ; Sun, 02 Aug 2026 22:17:55 +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 4hCvM73jMvz41GN for ; Sun, 02 Aug 2026 22:17:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785709075; 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=iNgIZIBby/rdY/+trkYBJ2cuyTXi6y56XeesRGfyE4I=; b=YMAhaCmMdH0HPvEZp/RhIgyags50foDFa6JrDmu+0MJRPfwW12k1LNpw3yBtHQJxEswz1R o2anCOJfxdSl2VHLARV5LDhJ0G89lYGIa2K/7VRi4Z0F2oyJvj6h3T5oJNSXgytgNQ28dz Uow16rNEKKOqm81k96uzmvlg+TO8rqWNsUHMUX3EBJ+mkZ/ZUu/M9/+WNEqQn9p2CWoVvj Lsk7UR01SuxuJWXO0TkzCC/P0c6rRTN6jcs8jkbnk2WlUgKtwH2yXAwtlUpR44NQysZXHN woIl0PpMJEaHUATTBIm5PpdGpKnZwyi1S8l85zInfxiMsciits3SUx+cWZlIjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785709075; a=rsa-sha256; cv=none; b=fTl/r9yuRYvbw0aCjEIj2ANF9aUqGx+i+5BtmH9iOCT7zpXoOB00brXdAV64tgz59EkWSj vu0FpGdHjAJkBsgN2sj06pKytQ0wDaebN8qNK1r+tPxSdJm/PuOrEUSud5gB8dWuzka9fq VNCHjbOlY/BpgcGodp6ELZ2+wkT5UtvdDeIUxJm3KKGWbwj3FCRdAZRprX/Xe0baaKRoed n8bPaVV7ZLoxj2ZTXbrwkvxxG5XzrG4WR4xO3Grew/7M6sy/UQ310kBWVmWHeqWLnuFWTY Ea6CnOOoc9uoOcnJRwwQCa8lLAcFXVXY3ao1in1QAOdHDL8MsXROih5Ew4MQ6g== 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=1785709075; 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=iNgIZIBby/rdY/+trkYBJ2cuyTXi6y56XeesRGfyE4I=; b=pem4KamTSZjRhjAuq40LNAyYuRHrs7Wa7zC5mRH5SbDfOKnOOpOYXxchlM5S+jZnkOmtV1 qUsS/lLZfpV41OBvV1pPsDmViCCU38uFwAd8LiJT68Sgkow8Vuj3ejJ2wBQOGV3+zuvfSb +iX4uO8SEUneEWCg1T4Bnpb450phbajBwzlWWcfXTyhPl9VkIK/m+B8EBHfRi1wS9+ubjc Zj3kT0J9KfLAorQIKU1l/pAMYeopq001zJHByADmQoWamW85jc8DB1daeeE2sNcwM4Uzm2 4DTNW8flOnzuYBGsKQ90NeDyDdzFuq8jfeMB6dEJSasBgdUKl67JyMrD3sXujw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hCvM72gCnzZK1 for ; Sun, 02 Aug 2026 22:17:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e528 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 02 Aug 2026 22:17:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4c58eef12d30 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 4c58eef12d30ec699c86d9ab8939253adbf35e79 Auto-Submitted: auto-generated Date: Sun, 02 Aug 2026 22:17:50 +0000 Message-Id: <6a6fc20e.3e528.67e4050a@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c58eef12d30ec699c86d9ab8939253adbf35e79 commit 4c58eef12d30ec699c86d9ab8939253adbf35e79 Author: Konstantin Belousov AuthorDate: 2026-08-02 14:57:37 +0000 Commit: Konstantin Belousov CommitDate: 2026-08-02 22:17:28 +0000 stat.2: enhance the description of st_blocks Reviewed by: emaste, mckusick Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D58592 --- 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 b31975ee068f..c16af32a340d 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