[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#294206: stat(1) unclear about block size
From: |
James Youngman |
Subject: |
Re: Bug#294206: stat(1) unclear about block size |
Date: |
Tue, 8 Feb 2005 15:39:05 +0000 |
User-agent: |
Mutt/1.3.28i |
On Tue, Feb 08, 2005 at 02:42:09PM +0100, Jeroen van Wolffelaar wrote:
> Package: coreutils
> Version: 5.2.1-2
>
> %s Optimal transfer block size
> $
>
> 'Optimal transfer block size', I have the suspection that %s IS the
> blocksize of the filesystem, which should be used in a number of other
> parameters in order to translate number of blocks into number of bytes.
>
> Is that correct?
No. The POSIX standard (in a non-normative section) says :-
| The unit for the st_blocks member of the stat structure is not defined
| within IEEE Std 1003.1-2001. In some implementations it is 512
| bytes. It may differ on a file system basis. There is no correlation
| between values of the st_blocks and st_blksize, and the f_bsize (from
| <sys/statvfs.h>) structure members.
|
| Traditionally, some implementations defined the multiplier for
| st_blocks in <sys/param.h> as the symbol DEV_BSIZE.
I think almost all systems use 512 byte units.
James.
Message not available