Re: ZFS vs Samba Debugging Results ... Need Help.

From: Pascal Hofstee <caelian_at_gmail.com>
Date: Fri, 06 Jul 2007 00:28:15 +0200
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
Received on Thu Jul 05 2007 - 20:28:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC