From owner-freebsd-fs@FreeBSD.ORG Wed Aug 1 23:47:26 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D5DD16A4C0 for ; Wed, 1 Aug 2007 23:47:26 +0000 (UTC) (envelope-from fbsd-fs@mawer.org) Received: from webmail.icp-qv1-irony3.iinet.net.au (webmail.icp-qv1-irony3.iinet.net.au [203.59.1.108]) by mx1.freebsd.org (Postfix) with ESMTP id E0F6013C58B for ; Wed, 1 Aug 2007 23:47:25 +0000 (UTC) (envelope-from fbsd-fs@mawer.org) Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out1.iinet.net.au with ESMTP; 02 Aug 2007 07:17:19 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAMCxsEbLzq3r/2dsb2JhbAAN X-IronPort-AV: i="4.19,210,1183305600"; d="scan'208"; a="172571870:sNHT10226496" Message-ID: <46B1144C.8090103@mawer.org> Date: Thu, 02 Aug 2007 09:16:28 +1000 From: Antony Mawer User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Julian Elischer References: <46B09FA9.9080503@pean.org> <20070801162814.GA52304@crodrigues.org> <20070801163012.GA7038@elvandar.org> <20070801163714.GA52404@crodrigues.org> <20070801164329.GC7038@elvandar.org> <46B0D3FD.3040201@elischer.org> In-Reply-To: <46B0D3FD.3040201@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, Remko Lodder Subject: Re: rsync and smb. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2007 23:47:26 -0000 On 2/08/2007 4:42 AM, Julian Elischer wrote: > Remko Lodder wrote: >> On Wed, Aug 01, 2007 at 12:37:14PM -0400, Craig Rodrigues wrote: >>> On Wed, Aug 01, 2007 at 06:30:12PM +0200, Remko Lodder wrote: >>>> I cannot seem to recreate the problem on 6-STABLE at all; I already >>>> copied more then two gb in >>>> just a few minutes and I dont see any problems passing by.. >>> According to http://www.freebsd.org/cgi/query-pr.cgi?pr=78953 , >>> this bug is triggered if you have a directory with exactly 50 >>> files in it. >>> -- >>> Craig Rodrigues rodrigc@crodrigues.org >> >> I am not seeing that as well, I created 50 simple text files: >> >> [remko@guardian /mnt]$ rsync --ignore-errors -r /mnt/test/ /opt/share3 >> [remko@guardian /mnt]$ ls -l /opt/share3 | wc -l >> 50 >> [remko@guardian /mnt]$ ls -l /mnt/test | wc -l >> 50 > > probably 50 files in a new directory Peter, the patch you Craig Rodrigues provided is the one from the bug report, and is NOT included in -STABLE ... you will need to apply it manually and then see if this solves the problem. Please let us know if it solves the problem, as another report of it solving the issue without causing any regressions will assist in getting this committed to -STABLE. It is included in -CURRENT, so will be there when 7.0-RELEASE comes out. I have found the patch works quite well. The error it reports is in itself, harmless, but is problematic with rsync because rsync changes its behaviour when errors are encountered. The problem does not appears using ls, which is probably why you are not seeing it when using ls on a directory. The issue is that smbfs requests directory listings in groups of 52 items, and if the number of files/directories in a listing falls on a multiple of 52 (including . and ..), then SMBFS is attempting to request the "next 52 items" on the listing when it is actually at the end of the listing. The remote SMB server then sends back an error because there are no more items. As such, no files are missing from the listing -- it is simply because the smbfs client is attempting to read past the end of the directory listing, so the server sends an error. Jim Carroll did all the hard work tracking down and fixing this issue 18 months ago -- he deserves full credit for his persistence in tracking this down! It was committed to -CURRENT by bp@ (original smbfs author), but never got MFC'd. I bugged re@ to see if this could get MFC'd when I realised it wasn't included in 6.2-PRERELEASE, and bmah@ had a quick look and updated the bug status... but I haven't seen any action beyond that in terms of an MFC. Unfortunately smbfs suffers from lack of an active maintainer -- there are lots of rough edges that have had fixes in Darwin that would be nice for someone with the time to pick up and port across where they make sense. Maybe this should be added to the Ideas page? There are also these patches I am led to believe may potentially help with communicating with OSX versions of Samba (which likes to talk unicode). They may have bit-rotted since and so may need updating for -CURRENT: http://people.freebsd.org/~imura/kiconv/ ... in short, the patch by Jim Carroll appears to fix this problem in my experience, and I am running with it in production without causing any regressions (at least that I have observed -- more eyes are always welcome). Thanks! --Antony