Andreas Metzler wrote: > Control: forcemerge 912180 1008240 > > FWIW this is a duplicate of 912180. > AFAIU the upstream bug discussion find uses getdents() and avoids unecessary > stats(). > However Linux returns incorrect information. > The possible performance penalty might be huge.
Thanks for the clarification. I think the next steps are therefore: 1. file a bug to against linux (kernel), to fix the wrong getdents behaviour. 2. ensure /usr/share/info/find.info mentions * that find on Linux has this incorrect behaviour * that it's Linux's fault (linking to #1) * that find can't work around it without a significant performance cost * if the end user can work around it, how to do so. e.g. changing "-type f" to "-type f -not -type b -not -type c" (that example does NOT work) What do you think? AFAICT #2 isn't already done upstream, though I may be looking wrong. https://www.gnu.org/software/findutils/manual/html_mono/find.html https://git.savannah.gnu.org/cgit/findutils.git/plain/doc/find.texi AFAICT #1 isn't already done upstream, though I may be looking wrong. https://docs.kernel.org/admin-guide/reporting-issues.html https://bugzilla.kernel.org/buglist.cgi?quicksearch=getdents https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=linux;include=subject%3Agetdents https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=linux;include=subject%3Afind https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=linux;include=subject%3Abind