Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Aug 2026 06:22:14 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5bdb00b44fbd - stable/15 - stat.2: enhance the description of st_blocks
Message-ID:  <6a72d696.26580.26cae130@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe

commit 5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-08-02 14:57:37 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a72d696.26580.26cae130>