diff options
author | Jeremy Allison <jra@samba.org> | 2005-02-25 02:22:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:47 -0500 |
commit | b9f147634df0126320ffe3b9a23068e76f6c1681 (patch) | |
tree | 49ad08370fa13bc094f4e0cd0b7a76ea2dd09dd1 /source/smbd/trans2.c | |
parent | a5e215650e09f087f8aede96475bd26649aa244e (diff) | |
download | samba-b9f147634df0126320ffe3b9a23068e76f6c1681.tar.gz samba-b9f147634df0126320ffe3b9a23068e76f6c1681.tar.xz samba-b9f147634df0126320ffe3b9a23068e76f6c1681.zip |
r5548: Stop lying about allocation sizes to Windows clients. It was a nice
idea, and aparently improved performance in some circumstances, but it
breaks the VC++ compiler :-(. Not cool. Fix bug #2146.
Jeremy.
Diffstat (limited to 'source/smbd/trans2.c')
-rw-r--r-- | source/smbd/trans2.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index b241aa38f47..d22705214e4 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -33,21 +33,6 @@ extern struct current_user current_user; #define DIR_ENTRY_SAFETY_MARGIN 4096 /******************************************************************** - Roundup a value to the nearest SMB_ROUNDUP_ALLOCATION_SIZE boundary. - Only do this for Windows clients. -********************************************************************/ - -SMB_BIG_UINT smb_roundup(SMB_BIG_UINT val) -{ - /* Only roundup for Windows clients. */ - enum remote_arch_types ra_type = get_remote_arch(); - if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) { - val = SMB_ROUNDUP(val,SMB_ROUNDUP_ALLOCATION_SIZE); - } - return val; -} - -/******************************************************************** Given a stat buffer return the allocated size on disk, taking into account sparse files. ********************************************************************/ @@ -65,8 +50,6 @@ SMB_BIG_UINT get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf) if (!ret && fsp && fsp->initial_allocation_size) ret = fsp->initial_allocation_size; - ret = smb_roundup(ret); - return ret; } @@ -3350,9 +3333,6 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char DEBUG(10,("call_trans2setfilepathinfo: Set file allocation info for file %s to %.0f\n", fname, (double)allocation_size )); - if (allocation_size) - allocation_size = smb_roundup(allocation_size); - if(allocation_size != get_file_size(sbuf)) { SMB_STRUCT_STAT new_sbuf; |