Bug 215514 - Documentation: meaning of device number / ID in `stat` and `stat()`
Summary: Documentation: meaning of device number / ID in `stat` and `stat()`
Status: NEW
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-21 12:40 UTC by Joachim Wagner
Modified: 2022-01-21 12:40 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Joachim Wagner 2022-01-21 12:40:08 UTC
The man page `man 2 stat` for `stat()` gives the impression that `stat.st_dev` is always composed of major and minor of an existing block device. However, filesystems such as `btrfs` allocate new device number not (clearly) related to the underlying device(s). The description of `st_dev` needs to be updated.

Similarly, a clarification would be useful in `man 1 stat` either directly in the description of the `%d` and `%D` formats or after the formats table.

My system: openSUSE Leap 15.3

Checked in current man pages as of 2022-01-21:
* https://man7.org/linux/man-pages/man2/stat.2.html
* https://man7.org/linux/man-pages/man1/stat.1.html

Related:
* https://github.com/util-linux/util-linux/issues/1562 (closed, wrong place)

Breadcrumbs:
* https://github.com/util-linux/util-linux/issues/1563 (closed, wrong place)

Note You need to log in before you can comment on or make changes to this bug.