Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2003 13:49:18 +1100
From:      Tim Robbins <tjr@freebsd.org>
To:        Benjamin Close <Benjamin.Close@unisa.edu.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: smbfs 4G max file size
Message-ID:  <20031222024918.GA2261@wombat.robbins.dropbear.id.au>
In-Reply-To: <3FE630FE.6070504@unisa.edu.au>
References:  <3FE29BA4.9060205@unisa.edu.au> <20031220072053.GA4539@wombat.robbins.dropbear.id.au> <3FE630FE.6070504@unisa.edu.au>

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



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