[PATCH] vfs_fruit TM size calculation on 32-bit platforms

Jeremy Allison jra at samba.org
Thu Feb 22 21:15:17 UTC 2018


On Fri, Feb 23, 2018 at 09:48:24AM +1300, Douglas Bagnall wrote:
> hi Ralph,
> 
> > Attached is a simple fix for a bug in vfs_fruit where I used the wrong integer
> > type for file sizes: size_t, instead of off_t.
> 
> How do we know off_t is 64 bit? is it because we set _FILE_OFFSET_BITS?
> 
> Could we just use off64_t instead?
> 
> Anyway, I see Jeremy has RB+d, and that's good.

We used to have a specific type SMB_OFF_T, which
was guaranteed to be 64-bits.

This coped with 32-bit systems with 64-bit file
support - see the UNIX SUSv2 LFS specification I had
to cope with a long time ago :-).

These days off_t is guaranteed to be 64-bits, and
we ditched the old wrappers that used to map
open -> open64 etc. etc. etc.



More information about the samba-technical mailing list