Joseph Qi
2022-Nov-22 01:52 UTC
[Ocfs2-devel] dinode link count inconsistency in ocfs2_read_links_count() logic
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
Joseph Qi
2022-Nov-25 11:25 UTC
[Ocfs2-devel] dinode link count inconsistency in ocfs2_read_links_count() logic
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