免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2721 | 回复: 3
打印 上一主题 下一主题

linux文件系统资料 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-01 10:20 |只看该作者 |倒序浏览
附件是linux文件系统奠基人写的linux文件系统资料,我觉得写得非常清晰,不像有的材料只是罗列一堆表格,没有一点系统性。



有一个疑问:对于inode_operation,为什么没有delete inode操作,连rmdir都有,想不通。

vfs.pdf

34.38 KB, 下载次数: 122

vfs数据结构.pdf

182.64 KB, 下载次数: 116

评分

参与人数 1可用积分 +15 收起 理由
godbach + 15 多谢分享

查看全部评分

论坛徽章:
0
2 [报告]
发表于 2009-11-01 12:55 |只看该作者
struct super_operations {
           struct inode *(*alloc_inode)(struct super_block *sb);
        void (*destroy_inode)(struct inode *);

        void (*read_inode) (struct inode *);
  
           void (*dirty_inode) (struct inode *);
        int (*write_inode) (struct inode *, int);
        void (*put_inode) (struct inode *);
        void (*drop_inode) (struct inode *);
        void (*delete_inode) (struct inode *);
        ……
        void (*clear_inode) (struct inode *);
        ……
};

static const struct super_operations bdev_sops = {
        .statfs = simple_statfs,
        .alloc_inode = bdev_alloc_inode,
        .destroy_inode = bdev_destroy_inode,
        .drop_inode = generic_delete_inode,
        .clear_inode = bdev_clear_inode,
};

inode方法都在超级快的操作中
iput会调用到generic_delete_inode,再是bdev_clear_inode,再是bdev_destroy_inode

论坛徽章:
3
金牛座
日期:2014-06-14 22:04:062015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:45
3 [报告]
发表于 2009-11-01 22:49 |只看该作者
搞那么老的资料

论坛徽章:
0
4 [报告]
发表于 2009-11-02 10:17 |只看该作者
谢谢2喽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP