Forwarded from Jeremy of the samba group.
attached mail follows:
On Thu, Jul 05, 2007 at 06:58:52PM -0700, Julian Elischer wrote: > For your ammusement. > > samba blew up when on ZFS due to an unexpected result in some returned > value somewhere.. > (details on demand) I know about this. It's a bug in *BSD. The reason tridge wrote this is here : >From : lib/replace/repdir_getdents.c in Samba. ------------------------------------------------------------------------ /* a replacement for opendir/readdir/telldir/seekdir/closedir for BSD systems This is needed because the existing directory handling in FreeBSD and OpenBSD (and possibly NetBSD) doesn't correctly handle unlink() on files in a directory where telldir() has been used. On a block boundary it will occasionally miss a file when seekdir() is used to return to a position previously recorded with telldir(). This also fixes a severe performance and memory usage problem with telldir() on BSD systems. Each call to telldir() in BSD adds an entry to a linked list, and those entries are cleaned up on closedir(). This means with a large directory closedir() can take an arbitrary amount of time, causing network timeouts as millions of telldir() entries are freed Note! This replacement code is not portable. It relies on getdents() always leaving the file descriptor at a seek offset that is a multiple of DIR_BUF_SIZE. If the code detects that this doesn't happen then it will abort(). It also does not handle directories with offsets larger than can be stored in a long, ------------------------------------------------------------------------ Fix your OS please. Jeremy.Received on Fri Jul 06 2007 - 03:02:14 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC