jra at jra at
Wed Dec 4 19:13:00 GMT 2002

On Wed, Dec 04, 2002 at 07:08:29PM +0000, Patrick Welche wrote:
> On Wed, Dec 04, 2002 at 06:51:25PM +0000, jra at wrote:
> > On Wed, Dec 04, 2002 at 05:48:43PM +0000, Patrick Welche wrote:
> > 
> > > (Why isn't STAT_ST_BLOCKSIZE defined in for netbsd?)
> > 
> > There is no specific configure section for netbsd. Care to write one ?
> I just had a look and got worried: what happens if I make some strange
> filesystem where blocksize isn't 512, stat.st_blksize should contain the
> correct value, and presumably samba will work. If I make a configure
> section which defines STAT_ST_BLOCKSIZE 512, presumably samba would then
> not work in that strange case?

Ah you see this is the *exact* problem. This is why I ditched the
code that uses stat.st_blksize. It was causing 64-bit copies on
IRIX to fail.

The fundamental misunderstanding (and it was mine also when I wrote
this code) is that stat.st_blksize is the units of stat.st_blocks.

It is *NOT*. stat.st_blksize is a "guide" to the "best" I/O size
for the filesystem. It has nothing to do with stat.st_blocks.

The unfortunate problem is that neither stat.st_blocks, or
stat.st_blksize are defined by POSIX so vendors set them as
they wish.


More information about the samba-technical mailing list