turbolinux10465内部培训讲义(编辑修改稿)内容摘要:

ntry_lru。 /* unused dentry lru */ 1346 int s_nr_dentry_unused。 /* of dentry on lru */ 1347 1348 struct block_device *s_bdev。 1349 struct mtd_info *s_mtd。 1350 struct list_head s_instances。 1351 struct quota_info s_dquot。 /* Diskquota specific options */ 1352 1353 int s_frozen。 1354 wait_queue_head_t s_wait_unfrozen。 1355 1356 char s_id[32]。 /* Informational name */ 1357 1358 void *s_fs_info。 /* Filesystem private info */ 1359 fmode_t s_mode。 1360 1361 /* 1362 * The next field is for VFS *only*. No filesystems have any business 1363 * even looking at it. You had been warned. 1364 */ 1365 struct mutex s_vfs_rename_mutex。 /* Kludge */ 1366 1367 /* Granularity of c/m/atime in ns. 1368 Cannot be worse than a second */ 1369 u32 s_time_gran。 1370 1371 /* 1372 * Filesystem subtype. If nonempty the filesystem type field 1373 * in /proc/mounts will be 1374 */ 1375 char *s_subtype。 1376 1377 /* 1378 * Saved mount options for lazy filesystems using 1379 * generic_show_options() 1380 */ 1381 char *s_options。 1382 }。 1383 1384 extern struct timespec current_fs_time(struct super_block *sb)。 1385 1386 /* inode 结构 : 文件状态信息 ,如 :访问权限 ,最后修改时间等 . : 文件内容 . 每个文件或目录都有一个唯一的 inode 号 .系统通过 inode 号对文件进行访问 . struct inode { struct hlist_node i_hash。 struct list_head i_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 long i_version。 loff_t i_size。 struct timespec i_atime。 struct timespec i_mtime。 struct timespec i_ctime。 unsigned int i_blkbits。 blkt_t i_blocks。 umode_t i_mode。 struct inode_operations *i_op。 const struct file_operations *i_fop。 /* former i_opdefault_file_ops */ struct super_block *i_sb。 struct address_space *i_mapping。 struct address_space i_data。 struct dquot *i_dquot[MAXQUOTAS]。 struct list_head i_devices。 union { struct pipe_inode_info *i_pipe。 struct block_device *i_bdev。 struct cdev *i_cdev。 }。 文件函数操作指针定义 linux/ struct file_operations { struct module *owner。 loff_t (*llseek) (struct file *, loff_t, int)。 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *)。 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *)。 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t)。 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t)。 int (*readdir) (struct file *, void *, filldir_t)。 unsigned int (*poll) (struct file *, struct poll_table_struct *)。 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long)。 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long)。 long (*pat_ioctl) (struct file *, unsigned int, unsigned long)。 int (*mmap) (struct file *, struct vm_area_struct *)。 int (*open) (struct inode *, struct file *)。 int (*flush) (struct file *, fl_owner_t id)。 int (*release) (struct inode。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。