b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

单循环链表 Linux VFS数据结构(3)

电脑杂谈  发布时间:2018-02-14 03:35:51  来源:网络整理

---------------------------------------------------------------------

include/linux/fs.h
struct inode {

   struct hlist_node  i_hash; /* 用于散列链表的指针 */

    /* 用于描述索引节点当前状态的链表的指针 */

   struct list_head   i_list;     /* backing dev IO list */

    struct list_head  i_sb_list; /* 用于超级块的索引节点链表的指针 */

   struct list_head   i_dentry; /* 引用索引节点的目录项对象链表的头 */

   unsigned long      i_ino;    /* 索引节点号 */

   atomic_t    i_count;      /* 索引节点引用计数 */

   unsigned int    i_nlink;   /* 硬链接数目*/

   uid_t       i_uid;

   gid_t       i_gid;

   dev_t       i_rdev;

   unsigned int    i_blkbits; /* 块的位数 */

   u64         i_version;

   loff_t      i_size; /* 文件的字节数 */

#ifdef __NEED_I_SIZE_ORDERED

   seqcount_t      i_size_seqcount;

#endif

   struct timespec    i_atime;

   struct timespec    i_mtime;

   struct timespec    i_ctime;

   blkcnt_t    i_blocks;  /* 文件的块数*/

   unsigned short          i_bytes; /* 文件中最后一个块的字节数*/

   umode_t         i_mode;

   spinlock_t      i_lock;  /* i_blocks, i_bytes, maybe i_size */

   struct mutex    i_mutex;

   struct rw_semaphore   i_alloc_sem;

   const struct inode_operations  *i_op;

/* former ->i_op->default_file_ops */

   const struct file_operations *i_fop;

   struct super_block *i_sb;

   struct file_lock   *i_flock; /* 指向文件锁链表的指针 */

   struct address_space  *i_mapping;

   struct address_space  i_data;

#ifdef CONFIG_QUOTA

   struct dquot    *i_dquot[MAXQUOTAS];

#endif

/* 用于具体的字符或块设备索引节点链表的指针,针对于设备文件 */

   struct list_head   i_devices;

   union {    /* 特殊文件专用 */

      struct pipe_inode_info   *i_pipe;

      struct block_device   *i_bdev;

      struct cdev     *i_cdev;

   };

 

   __u32 i_generation;   /*索引节点版本号(由某些文件系统使用)*/

 

#ifdef CONFIG_FSNOTIFY

   __u32 i_fsnotify_mask; /* all events this inode cares about */

   struct hlist_head  i_fsnotify_mark_entries; /* fsnotify mark entries */

#endif

 

#ifdef CONFIG_INOTIFY

   struct list_head   inotify_watches; /* watches on this inode */

   struct mutex    inotify_mutex;  /* protects the watches list */

#endif

 

   unsigned long      i_state;  /* 索引节点的状态标志,如dirty等 */

   unsigned long      dirtied_when;   /* jiffies of first dirtying */

 

   unsigned int    i_flags; /* 文件系统的安装标志*/

 

   atomic_t    i_writecount; /* 用于写进程的引用计数 */

#ifdef CONFIG_SECURITY

   void        *i_security;

#endif

#ifdef CONFIG_FS_POSIX_ACL

   struct posix_acl   *i_acl;

   struct posix_acl   *i_default_acl;

#endif

   void        *i_private; /* fs or device private pointer */

};


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-76619-3.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    每日福利
    热点图片
    拼命载入中...