From owner-freebsd-current@FreeBSD.ORG Fri Jul 6 00:39:58 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 B6AAC16A421 for ; Fri, 6 Jul 2007 00:39:58 +0000 (UTC) (envelope-from bdonnell@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by mx1.freebsd.org (Postfix) with ESMTP id 6782A13C44B for ; Fri, 6 Jul 2007 00:39:58 +0000 (UTC) (envelope-from bdonnell@gmail.com) Received: by wr-out-0506.google.com with SMTP id i23so44864wra for ; Thu, 05 Jul 2007 17:39:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=hNzFfh1MbIEZ6qdgpb+rGlVkJsUVaCH/WXw50769YuIzpuUnqCjo9AED4YDezGKbEhzcBmBJbiPQvXinPXvVYL91+rPF17Yt2pIJkCae7WgYDF9xlINiDR9fmRKDAQD8NU7TYzywpJZZofEoLOpIb62Gcv2EmS4zvT5RX+VAebg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=M+iOPqGLqPhghw+SUxG+MoyX13UdMr/Ai9ufcyrxetOz5wi07uU7rB6fxSEiDCfoUe7aKProm7XIJITBpNZES2csqqYZYb3z+CZ1bMYVVJixOUoi+p68LHSPeeKo05ekIVy1RRHgCF/EEgsueSxiXgfB+w4jQ/4NsXbMSbu7np8= Received: by 10.142.115.10 with SMTP id n10mr10997wfc.1183682396721; Thu, 05 Jul 2007 17:39:56 -0700 (PDT) Received: by 10.143.44.7 with HTTP; Thu, 5 Jul 2007 17:39:56 -0700 (PDT) Message-ID: <1c5c32890707051739t6621e2d4ude73ce5d096ea72e@mail.gmail.com> Date: Thu, 5 Jul 2007 20:39:56 -0400 From: "Brian Donnell" To: "Pascal Hofstee" In-Reply-To: <1183674495.75595.14.camel@worf> MIME-Version: 1.0 References: <46633B27.50601@dva.dyndns.org> <1c5c32890707031732s195a97c3vd29fb46323f28fae@mail.gmail.com> <46644820.6020609@dva.dyndns.org> <1c5c32890707041057x75712a20vef9800a7ddef7a6a@mail.gmail.com> <1183674495.75595.14.camel@worf> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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: Fri, 06 Jul 2007 00:39:58 -0000 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 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 > > >