What is an inode as defined by POSIX?
The Wikipedia article on inodes has a section titled POSIX inode description
which says an inode contains (among 8 other bullet points):
- Device ID (this identifies the device containing the file).
This doesn't seem right to me, and I note that there is no link to a POSIX document in the references.
What does POSIX say about the structure of an inode? Please provide references as appropriate.
struct stat
with an inode.struct stat
includes thest_dev
field which contains the device id. It would make no sense for the on-disk inode to contain the device id, because the file system should not care about which device it is contained in.