On Thu, Mar 01, 2012 at 09:14:13AM -0800, Linus Torvalds wrote: > On Thu, Mar 1, 2012 at 8:57 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > > > As long as full_name_hash() is still around, any such filesystem is welcome > > to use it for ->d_hash() and STFU. > > Well, I'd make full_name_hash() match the new hash model, so no, they > couldn't use that. They'd have to actually implement the old hash, and > make it "their hash". > > Also note that the hash model would have to become dependent on config > options: doing things a word at a time really only works well on > architectures that have fast unaligned accesses, and even on those > archtiectures it really doesn't work if you enable > CONFIG_DEBUG_PAGE_ALLOC. > > > Note that there are places like this one (in btrfs_real_readdir()) > > q.name = name_ptr; > > q.len = name_len; > > q.hash = full_name_hash(q.name, q.len); > > tmp = d_lookup(filp->f_dentry, &q); > > and they _will_ need to be updated if we switch the default. > > I don't agree that it will need to be updated - I was planning on just > updating full_name_hash() to always match. That part is easy and > obvious. Just to clarify, btrfs isn't putting the dcache hashes on disk. The code above is part of our optimization to preload some information we find during readdir to reduce IO when the file is later opened. On disk we're crc32c only. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html