Date: Mon, 12 Nov 2018 14:23:14 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 233161] bsd find finds only 32756 directories with '-type d' switch Message-ID: <bug-233161-227-3aG2XqJMkN@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-233161-227@https.bugs.freebsd.org/bugzilla/> References: <bug-233161-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233161 sigsys@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sigsys@gmail.com --- Comment #1 from sigsys@gmail.com --- This seems to be caused by an optimization in lib/libc/gen/fts.c that assum= es that there can be no more subdirectories in a given directory than indicate= d by st_nlink (since each subdirectory increases the link count of the parent wi= th its ".." entry). This doesn't work when st_nlink gets capped by ZFS. AFAI= K, UFS does not allow more subdirectories than st_nlink can count so the probl= em does not happen there. Removing "zfs" from ufslike_filesystems[] in fts.c should avoid the bug. A better fix would be to check if st_nlink seems saturated (with pathconf(2)/_PC_LINK_MAX I guess) and disable the optimization only then. nlink_t is 64 bits on 12.X so the problem probably doesn't exist there. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233161-227-3aG2XqJMkN>