Date: Tue, 31 Aug 1999 11:15:49 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE> Cc: freebsd-hackers@freebsd.org, Matthew Dillon <dillon@apollo.backplane.com> Subject: Re: readdir() broken? Message-ID: <Pine.BSF.4.10.9908311114100.340-100000@salmon.nlsystems.com> In-Reply-To: <19990829054029.B308@frolic.no-support.loc>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 29 Aug 1999, Bjoern Fischer wrote: > Hello Doug, hello Matthew, hello list members, > > there are some hints that readdir() in -STABLE has problems when > used on NFSv3 (UDP; and TCP probably, too) mounted file systems. > The reason may be the recovery code for stale READDIR cookies. > > The problem occurs when using GNU rm (fileutils-4.0) on our > systems (NFS servers and clients -STABLE) for deleting large > directory trees (e.g. egcs source tree). rm failed to delete > some directories: > > rm: cannot remove directory `egcs-1.1.2/gcc': Directory not empty > > I've roughly looked through the sources and found a workaround > for a readdir() bug on SunOS 4.1.4. The SunOS readdir() sometimes > returned NULL although there were still entries to be read when > a directory with more than 254 entries was previously modified. > The workaround rewound the directory stream and read it again. > > Interestingly this workaround also works for FreeBSD although > our readdir() passes the autoconfig tests that trigger the > workaround without a hinch. > > Attached is a patch for GNU fileutils-4.0 that will make rm > yield when the workaround code catches a bad readdir(). Are you using a FreeBSD port for GNU fileutils? If so, your patch should be directed to the port maintainer. I suggest that you also forward the patch to the GNU fileutils maintainers. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908311114100.340-100000>