代码是:
static inline struct list_head * d_hash(struct dentry *parent, unsigned long hash)
{
hash += (unsigned long)parent / L1_CACHE_BYTES;
hash = hash^(hash>>D_HASHBITS)^(hash>>D_HASHBITS*2);
return dentry_hashtable + (hash & D_HASHMASK);
}
如何理解这个功能?
特别是“ hash = hash^(hash>>D_HASHBITS)^(hash>>D_HASHBITS*2);
”的行
谢谢
PS:代码形式: http://lxr.oss.org.cn/source/fs/dcache.c?v= 2.6.16#L885