struct inode

Each instance of struct inode represents a file in rootfs. VFS defines this structure as an abstraction for filesystem-specific inodes. Irrespective of the type of inode structure and its representation on disk, each filesystem needs to enumerate its files as struct inode into rootfs for a common file view. This structure is defined in <linux/fs.h>:

struct inode {      umode_t                 i_mode;   unsigned short          i_opflags;        kuid_t                  i_uid;    kgid_t                  i_gid;    unsigned int            i_flags;#ifdef CONFIG_FS_POSIX_ACL  struct posix_acl        *i_acl;   struct posix_acl        *i_default_acl;#endif       const struct inode_operations   *i_op;    struct super_block      *i_sb;    struct address_space    *i_mapping;#ifdef CONFIG_SECURITY   void                    *i_security;#endif /* Stat data, not accessed from path walking ...

Get Mastering Linux Kernel Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.