[Workaround] Allocation size has bad value on a MIPS based setup.

moction moction moction at gmail.com
Thu Dec 27 14:58:15 GMT 2007


Hi

My setup is a 32bits MIPS Processor running a 2.6.8 Kernel. Current
version is Samba 3.0.27a but older and more recent versions were
tried. configure has been invoked as follow : ./configure --host=i686
--target=mips-linux-uclibc ...

I quickly figured out that I couldn,t retrieve files larger than 256K
from the server. The windows machine was bumping a "Not enough memory"
error message.

Using wireshark to sniff the samba related traffic, the traces were
showing that While "End of file" filed was ok, the "Allocation Size"
field was set to 4503599628419072 (00001000 00001000h). This is
present in any SMB messages featuring a "Allocation size" field.

Using another linux+samba working setup and sniffing SMB messages
again, the "Allocation size" field was set to 1048576 (00001000
00000000h). Which is a fairer value :-)

After a few investigations on the warnings (warning: right, left shift
count >= width of type) when compiling ntrans.c, trans2.c and a few
other files in libsmb, it seems that they come from the macros like
SOFF_T and alike defined in include.h when LARGE_SMB_OFF_T is defined
- which is the case for me.

I then just disabled LARGE_SMB_OFF_T and that solves the problem. So
I'm happy but some questions remain :
is it a known issue / bug ? Am I missing anything here ? Did configure
missed anything that finally defined this macro ?

Thanks
- Phil


More information about the samba-technical mailing list