Dear Linux folks,
On 11/16/16 22:24, Donald Buczek wrote:
The relevant commit is 703b5fa which includes
The commit message summary is *fs/dcache.c: Save one 32-bit multiply in dcache lookup*.
static inline unsigned long end_name_hash(unsigned long hash)
{
- return (unsigned int)hash;
+ return __hash_32((unsigned int)hash);
}
__hash_32 is a multiplication by 0x61C88647 ( hash.h )
And this exactly is the difference between the hash value of "host0" on
the 4.4 and the 4.8 system:
DB<2> x sprintf '%x',0x11bf1ddd*0x61C88647
0 '6c750ef074af64b'
The bug, of course, is in the userspace tool tw_cli which wrongly
assumes that the names would be returned in the "right" order by getdents.
Nice analysis.
Unfortunately, I don’t find the discussion of the patch on the Linux kernel mailing list.