Date: Wed, 18 Feb 2015 20:48:05 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 197336] find command cannot see more than 32765 subdirectories when using ZFS Message-ID: <bug-197336-8-ZxSIWFF8mU@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-197336-8@https.bugs.freebsd.org/bugzilla/> References: <bug-197336-8@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=197336 Jilles Tjoelker <jilles@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jilles@FreeBSD.org --- Comment #4 from Jilles Tjoelker <jilles@FreeBSD.org> --- Although bde@ is right that FreeBSD cannot report the link count correctly if a directory has more than 32765 subdirectories, this usually need not be a problem. The fts(3) code underlying find(1) uses the link count to avoid stat calls, even on filesystems (most) that support d_type which allows avoiding the same stat calls. Some possible solutions are disabling the nlink optimization if fts_nlink >= LINK_MAX, disabling the nlink optimization for ZFS, ignoring the nlink optimization if d_type tells otherwise and removing the nlink optimization entirely. As a workaround, specify a find(1) expression that forces it to stat everything, such as -ls or -size 0 -o -size +0. -- 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-197336-8-ZxSIWFF8mU>