Follow-up Comment #6, bug #26641 (project findutils):
find seems to be already doing *something* to determine that the st_link
count is wrong -- that's what leads to the printing of the warning and the
automatic turning on of the -noleaf option, yes?. All I'm saying is, wherever
it is that find does:
printf("WARNING: Hard link count is wrong...");
turn_on_noleaf();
change it to
fstat(dirfd, &new_stat_buf);
if (stat_buf.st_dev != new_stat_buf.st_dev)
/* probably an automount happened; just update stat info */
stat_buf = new_stat_buf;
else {
printf("WARNING: Hard link count is wrong...");
turn_on_noleaf();
}
The performance implications should be minimal, because the extra stat is
only ever done whenever the -noleaf evasive action would have been taken,
which is seldom.
Again, I haven't read the code (still), so I apologize if this is naive.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?26641>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/