ZFS vs Samba Debugging Results ... Need Help.

Brian Donnell bdonnell at gmail.com
Fri Jul 6 00:39:58 UTC 2007


Thanks to Pascal Hofstee and Joe Marcus Clarke I found a way to get ZFS
samba shared.  I haven't run into any problems yet, but consider it
experimental.  You're going to love how simple this one was.

cd /usr/ports/net/samba3
make patch
cd work/samba-3.0.25a/source/lib/replace
rm repdir_get*
cd /usr/ports/net/samba3
make install

And now it works.  Just get rid of the offending functions.  I've had no
problems reading or writing files of large and small size in directories
with only a couple files or a couple hundred.  It was so simple it makes me
think something is still very wrong.  But I'm having no problems now.

-- Brian

On 7/5/07, Pascal Hofstee <caelian at gmail.com> wrote:
>
> Hi,
>
> I did some addititional debugging and adding a small workaround to
> smbd/vfs.c making the function vfs_readdirname() return ptr->d_name
> directly instead of relying on the temporary variable dname gets the
> code properly skipping the "." and ".." entries.
>
> >From that point on the code enters into a new problem area which can be
> observed in the backtrace posted at http://pastebin.ca/604961
>
> Joe Marcus Clarke helped me out further with debugging this problem and
> we have come to the conclusion that the following assertion in samba's
> telldir() implementation located in lib/replace/repdir_getdirentries.c
> does not hold true on ZFS directories (marcus mentioned something about
> lseek() behaving differently on ZFS than it does on UFS):
>
>         if (d->seekpos & (DIR_BUF_SIZE-1)) {
>                  abort();
>         }
>
> Marcus was so kind to put up a simple test case at
> http://www.marcuscom.com/downloads/samba_zfs.c
>
> Change main() to point to a ZFS directory, and watch it crash.
> Then point to a UFS directory, and it works.
> The seekpos is printed each time.
>
> Hopefully this will be enough information to get us to figure out a
> workable solution here.
>
> --
>   Pascal Hofstee
>
>
>


More information about the freebsd-current mailing list