[Samba] Re: large files with 2.2.7a

Herb Lewis herb at sgi.com
Mon Dec 16 21:45:02 GMT 2002


I posted the following patch to samba-technical. See if it solves all
your problems.

> On Mon, 16 Dec 2002, Adnan Olia wrote:
> 
> > Yes, I am using smbclient to copy a file of 5GB to a Win2000 Server. The
> > process copies 4 GB and then stops and shows it is completed, even
> > though the file is greater than 4 GB on the Linux Server (Mandrake Linux
> > kernel 2.4.x).  Is there a 4GB limit on SMBCLIENT??
> 

-- 
======================================================================
Herb Lewis                               Silicon Graphics 
Networking Engineer                      1600 Amphitheatre Pkwy MS-510
Strategic Software Organization          Mountain View, CA  94043-1351
herb at sgi.com                             Tel: 650-933-2177
http://www.sgi.com                       Fax: 650-932-2177          
PGP Key: 0x8408D65D
======================================================================
-------------- next part --------------
Index: clitar.c
===================================================================
RCS file: /data/cvs/samba/source/client/clitar.c,v
retrieving revision 1.74.4.7
diff -u -r1.74.4.7 clitar.c
--- clitar.c	18 Mar 2002 22:08:01 -0000	1.74.4.7
+++ clitar.c	16 Dec 2002 21:15:08 -0000
@@ -45,10 +45,10 @@
 
 struct file_info_struct
 {
-  size_t size;
+  SMB_BIG_UINT size;
   uint16 mode;
-  int uid;
-  int gid;
+  uid_t uid;
+  gid_t gid;
   /* These times are normally kept in GMT */
   time_t mtime;
   time_t atime;
@@ -643,6 +643,7 @@
     finfo.mtime = finfo1 -> mtime;
     finfo.atime = finfo1 -> atime;
     finfo.ctime = finfo1 -> ctime;
+    finfo.name  = finfo1 -> name;
   }
   else {
     finfo.size  = def_finfo.size;
@@ -652,13 +653,14 @@
     finfo.mtime = def_finfo.mtime;
     finfo.atime = def_finfo.atime;
     finfo.ctime = def_finfo.ctime;
+    finfo.name  = def_finfo.name;
   }
 
   if (dry_run)
     {
-      DEBUG(3,("skipping file %s of size %d bytes\n",
+      DEBUG(3,("skipping file %s of size %12.0f bytes\n",
 	       finfo.name,
-	       (int)finfo.size));
+	       (double)finfo.size));
       shallitime=0;
       ttarf+=finfo.size + TBLOCK - (finfo.size % TBLOCK);
       ntarf++;
@@ -1868,7 +1870,7 @@
     if (tar_type=='c' && (dry_run || strcmp(argv[Optind], "/dev/null")==0))
       {
 	if (!dry_run) {
-	  DEBUG(0,("Output is /dev/null, assuming dry_run"));
+	  DEBUG(0,("Output is /dev/null, assuming dry_run\n"));
 	  dry_run = True;
 	}
 	tarhandle=-1;


More information about the samba mailing list