This bug has been copied from bug #641764 and has been proposed
to be backported to 6.0 z-stream (EUS).
Since it is very hard/rare to reproduce this issue using reproducer steps in #641764 I've had to use different technique.
I used systemtap to watch the number of reclaimable inodes when xfs shrinker is called while generating a read (of millions of empty files) on a xfs formatted partition.
In 2.6.32-71.el6, the number almost always grows (meaning that it lowers quite rarely by a small number (usually just 1 or so)) resulting in very high number of reclaimable nodes with long term run (tens of millions even with ram limited to 512M). When huge file (tens of gigabytes) is read, the number won't lower or will lower very insignificantly (as described previously). This could later cause the problems described in #641764.
In 2.6.32-71.6.1 (with 512M ram), the number stays within a reasonable range (up to tens of thousands) and lowers quite often (and quite significantly). Read of a huge file causes the number of reclaimable nodes to get within a thousand. Therefore the number keeps within a reasonable range even in a long term test and necessary conditions for reproduction of #641764 are not met.
Based on previous I'm moving this to verified.
Created attachment 455747 [details]
Systemtap test that outputs numbers of reclaimable inodes
It'll print the number of reclaimable inodes every time xfs_reclaim_inode_shrink is called and the number is higher than the previous one. It'll finish when the number lowers.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Previously, accounting of reclaimable inodes did not work correctly. When an inode was reclaimed it was only deleted from the per-AG (per Allocation Group) tree. Neither the counter was decreased, nor was the parent tree's AG entry untagged properly. This caused the system to hang indefinitely. With this update, the accounting of reclaimable inodes works properly and the system remains responsive.