quotas and small files

DICKENS,CARY (HP-Loveland,ex2) cary_dickens2 at hp.com
Fri Aug 3 20:44:05 GMT 2001


Jeremy,

I applied the patch and rebuilt everything and now I get a slightly
different behavior.  The file information is now correct, but I still don't
get an out of disk error reported to the user.  

The explorer listing of the file that the write fails on shows the size to
be the truncated size and any subsequent file copies the share show the file
to be of 0 length.  Would you once again like a level 10 debug log?  If so,
let me know and I'll grab one of the failure.

You can't believe how much I appreciate your help on this issue.  If I can
do something to make it easier for you, let me know.

Cary

-----Original Message-----
From: Jeremy Allison [mailto:jeremy at valinux.com]
Sent: Friday, August 03, 2001 1:35 PM
To: DICKENS,CARY (HP-Loveland,ex2); jeremy at valinux.com; Samba technical
Subject: Re: quotas and small files


"DICKENS,CARY (HP-Loveland,ex2)" wrote:
> 
> Oops.  Sorry about that.

Got it - fixed. Apply this (simple) patch. It's now
in CVS (2.2 and HEAD).

Thanks,

Jeremy.

Index: smbd/reply.c
===================================================================
RCS file: /data/cvs/samba/source/smbd/reply.c,v
retrieving revision 1.240.2.52
diff -u -r1.240.2.52 reply.c
--- smbd/reply.c        11 Jul 2001 18:53:30 -0000      1.240.2.52
+++ smbd/reply.c        3 Aug 2001 19:29:10 -0000
@@ -2660,7 +2660,8 @@
      zero then the file size should be extended or
      truncated to the size given in smb_vwv[2-3] */
   if(numtowrite == 0) {
-      nwritten = vfs_set_filelen(fsp, (SMB_OFF_T)startpos);
+      /* This is actually a allocate call, not set EOF. JRA */
+      nwritten = vfs_allocate_file_space(fsp, (SMB_OFF_T)startpos);
   } else
     nwritten = write_file(fsp,data,startpos,numtowrite);

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list