From owner-freebsd-current@FreeBSD.ORG Sun Dec 21 18:47:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6556316A4CE for ; Sun, 21 Dec 2003 18:47:52 -0800 (PST) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0621E43D66 for ; Sun, 21 Dec 2003 18:47:48 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (210.50.112.215) by smtp01.syd.iprimus.net.au (7.0.020) id 3F8B009E01A136B0; Mon, 22 Dec 2003 13:47:46 +1100 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id 9D24E6127; Mon, 22 Dec 2003 13:49:18 +1100 (EST) Date: Mon, 22 Dec 2003 13:49:18 +1100 From: Tim Robbins To: Benjamin Close Message-ID: <20031222024918.GA2261@wombat.robbins.dropbear.id.au> References: <3FE29BA4.9060205@unisa.edu.au> <20031220072053.GA4539@wombat.robbins.dropbear.id.au> <3FE630FE.6070504@unisa.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FE630FE.6070504@unisa.edu.au> User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org Subject: Re: smbfs 4G max file size X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 22 Dec 2003 02:47:52 -0000 On Mon, Dec 22, 2003 at 10:17:10AM +1030, Benjamin Close wrote: > Tim Robbins wrote: > > >On Fri, Dec 19, 2003 at 05:03:08PM +1030, Benjamin Close wrote: > > > > > > > >>Hi All, > >> Whilst tinkering with some backups the other day I noticed that > >>smbfs capped out at 4G. > >>Does the protocol restrict it to this limit or is there something else? > >> > >> > > > >What exactly doesn't work for files >4G? smbfs is supposed to support > >files up to 2^64 bytes in size, but the code may be buggy or incomplete. > > > > > >Tim > > > > > Quite a bit. I can't create a file bigger than 4G, cat to a file bigger > than 4G or do anything to make it bigger than 4G. > ie: > cis209883# cd /mnt/smbfs > cis209883# /home/benjsc/bin/createfile filename 4294967296 > cis209883# ls -l filename > -rwxr-xr-x 1 root wheel 4294967296 Dec 22 10:07 filename > cis209883# echo "This string will not be appended" >> filename > cis209883# ls -l filename > -rwxr-xr-x 1 root wheel 4294967296 Dec 22 10:07 filename Could you try this patch and let me know whether it fixes any (or all) of your problems with >4G files? ==== //depot/user/tjr/freebsd-tjr/src/sys/fs/smbfs/smbfs_vnops.c#9 - /usr/p4/sys/fs/smbfs/smbfs_vnops.c ==== @@ -272,7 +272,7 @@ struct vattr *va=ap->a_vap; struct smbfattr fattr; struct smb_cred scred; - u_int32_t oldsize; + u_quad_t oldsize; int error; SMBVDEBUG("%lx: '%s' %d\n", (long)vp, np->n_name, (vp->v_vflag & VV_ROOT) != 0);