Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jul 2007 00:28:15 +0200
From:      Pascal Hofstee <caelian@gmail.com>
To:        Brian Donnell <bdonnell@gmail.com>
Cc:        current <current@freebsd.org>, "Boris S." <bst2006@dva.dyndns.org>
Subject:   Re: ZFS vs Samba Debugging Results ... Need Help.
Message-ID:  <1183674495.75595.14.camel@worf>
In-Reply-To: <1c5c32890707041057x75712a20vef9800a7ddef7a6a@mail.gmail.com>
References:  <d8a0b7620707031331w5b0fcae2jd96cb7ff8b3f34d6@mail.gmail.com> <d8a0b7620707031359wc178fdfocf2387820fcacbf5@mail.gmail.com> <46633B27.50601@dva.dyndns.org> <1c5c32890707031732s195a97c3vd29fb46323f28fae@mail.gmail.com> <46644820.6020609@dva.dyndns.org> <1c5c32890707041057x75712a20vef9800a7ddef7a6a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1183674495.75595.14.camel>