From owner-freebsd-current@FreeBSD.ORG Thu Jul 5 22:28:19 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BB6016A400 for ; Thu, 5 Jul 2007 22:28:19 +0000 (UTC) (envelope-from caelian@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id C1A2713C459 for ; Thu, 5 Jul 2007 22:28:18 +0000 (UTC) (envelope-from caelian@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so665344uge for ; Thu, 05 Jul 2007 15:28:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=g5WzsKM6K00uKZkeG+X9CNAzSDNqAWRq6JC04p1Yp7pfVVnEl9R4aBtAAOybIs4ys0aZX41JZH1PysGzehxjJoM29/HHcy7FRIinSW8oEp6Iiswo3EnzO7um8F7UaJLyXm8IwE4j0mwdPLZTfH1nVSecmOihhZxbw1Q8n2b/ics= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=ch4yTpuBRp+Km/5K8HQXJOrSL5dgiMrTN30YR/bMC8fC9cikYqZptID7YUIUOLG8kylubeozKs5zBY8HiNYAUUITxAIJP4Sm35RAAdibjNE09zQqNnYNnlJL2NdIQMh6yOskqTx+K9eyVTJh0IMh2I5rzcO0DIMCG7Wn35iwM5o= Received: by 10.67.118.1 with SMTP id v1mr2241248ugm.1183674497399; Thu, 05 Jul 2007 15:28:17 -0700 (PDT) Received: from ?192.168.0.23? ( [87.166.90.252]) by mx.google.com with ESMTP id 28sm23109180fkx.2007.07.05.15.28.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Jul 2007 15:28:16 -0700 (PDT) From: Pascal Hofstee To: Brian Donnell In-Reply-To: <1c5c32890707041057x75712a20vef9800a7ddef7a6a@mail.gmail.com> References: <46633B27.50601@dva.dyndns.org> <1c5c32890707031732s195a97c3vd29fb46323f28fae@mail.gmail.com> <46644820.6020609@dva.dyndns.org> <1c5c32890707041057x75712a20vef9800a7ddef7a6a@mail.gmail.com> Content-Type: text/plain Date: Fri, 06 Jul 2007 00:28:15 +0200 Message-Id: <1183674495.75595.14.camel@worf> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: current , "Boris S." Subject: Re: ZFS vs Samba Debugging Results ... Need Help. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2007 22:28:19 -0000 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