[Ocfs2-devel] dinode link count inconsistency in ocfs2_read_links_count() logic

Joseph Qi joseph.qi at linux.alibaba.com
Fri Nov 25 11:25:10 UTC 2022


Hi,

Checked the code again, since feature indexed dirs is now default on, so
the ocfs2_link_max() check will return OCFS2_DX_LINK_MAX, which can use
high 16 bits of links count.

Could you please send a formal patch?

Thanks,
Joseph

On 11/22/22 9:52 AM, Joseph Qi via Ocfs2-devel wrote:
> 
> 
> On 11/22/22 12:15 AM, Alexey Asemov (Alex/AT) via Ocfs2-devel wrote:
>> The modification I mentioned surely fixes the thing (well, obviously).
>>
>> If to reproduce, trivial as well:
>>
>> - mkfs with indexed-dirs option (otherwise low hardlink limit will apply)
>> - Create a file
>> - Create 65535 hardlinks to it, stat will now show 65536 hardlinks (that comes from local inode cache)
>> - Clear inode cache (for me cat 3 > /proc/sys/vm/drop_caches is enough) or reboot
>> - stat again and you will see hardlink count = 0 that is the result of actual inconsistency
>>
> 
> Will take a deep look into it.
> 
> Thanks,
> Joseph
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel



More information about the Ocfs2-devel mailing list