October 2017
Intermediate to advanced
586 pages
14h 8m
English
The kernel describes files as instances of the struct inode (not struct file) structure, defined in include/linux/fs.h:
struct inode {
[...]
struct pipe_inode_info *i_pipe; /* Set and used if this is a
*linux kernel pipe */
struct block_device *i_bdev; /* Set and used if this is a
* a block device */
struct cdev *i_cdev; /* Set and used if this is a
* character device */
[...]
}
struct inode is a filesystem data structure holding information, which is only relevant to the OS, about a file (its type, character, block, pipe, and so on) or directory (yes!! from a kernel point of view, a directory is a file that on entry points to other files) on disk.
The struct file structure (also defined in include/linux/fs.h ...
Read now
Unlock full access