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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.