免费注册 查看新帖 |

Chinaunix

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

[数据结构] hlist_node hlist_bl_node inode dentry 为什么不一样。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-04-27 13:57 |只看该作者 |倒序浏览
inode和dentry的hash表节点类型为什么不一样。看起来他们的功能和定义效果都是一样的。

struct inode {
        struct hlist_node        i_hash;
}

struct dentry {
        struct hlist_bl_node d_hash;        /* lookup hash list */
}

论坛徽章:
0
2 [报告]
发表于 2012-04-28 09:55 |只看该作者
为什么发帖都没人理呢?
好多贴都是十层大海了,伤心了。

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
3 [报告]
发表于 2012-04-28 13:02 |只看该作者
本帖最后由 T-Bagwell 于 2012-04-28 13:06 编辑

inode和dentry不一样

"Documentation/filesystems/vfs.txt"

论坛徽章:
0
4 [报告]
发表于 2012-04-28 15:44 |只看该作者
/*
* Special version of lists, where head of the list has a lock in the lowest
* bit. This is useful for scalable hash tables without increasing memory
* footprint overhead.
*
* For modification operations, the 0 bit of hlist_bl_head->first
* pointer must be set.
*
* With some small modifications, this can easily be adapted to store several
* arbitrary bits (not just a single lock bit), if the need arises to store
* some fast and compact auxiliary data.
*/

没有仔细看,原来hlist_bl 是自带锁的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP