GNU bug report logs - #10561
stat unclear about size on disk and type of blocks discussed

Previous Next

Package: coreutils;

Reported by: Filipus Klutiero <chealer <at> gmail.com>

Date: Fri, 20 Jan 2012 07:18:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 10561 <at> debbugs.gnu.org (full text, mbox):

From: Filipus Klutiero <chealer <at> gmail.com>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 10561 <at> debbugs.gnu.org, Jim Meyering <jim <at> meyering.net>
Subject: Re: bug#10561: stat unclear about size on disk and type of blocks
	discussed
Date: Fri, 20 Jan 2012 12:47:49 -0500
Hi Pádraig and Jim,

On 2012-01-20 09:15, Pádraig Brady wrote:
> On 01/20/2012 02:03 PM, Jim Meyering wrote:
>> Pádraig Brady wrote:
>> ...
>>>> As for %o, if you'd ask me what "I/O block size" means without any
>>>> context, I'm far from being sure I would answer it means size on
>>>> disk. I suggest to call this Size on disk, or Size used on the
>>>> filesystem.
>>> I/O implies transfer.
>>> So it corresponds to an "optimal transfer size hint"
>>> This value can be different at each layer, for example:
>>>
>>> $ stat -c "%o" .                # file level
>>> $ stat -f -c "%s" .             # file system level
>>> # blockdev --getioopt /dev/sda  # device level
>>>
>>>> I'm not sure what language should be used instead. Perhaps instead
>>>> of blocks the manual should talk about "data storage device blocks".
>>> I suppose we could clarify "I/O block size" a bit.
>>> How about s|I/O block size|optimal I/O block transfer size|
>> or even without "block",
>>
>>    "optimal I/O transfer size"
> OK I'll go with "optimal I/O transfer size hint",
> since there is nothing guaranteed about it,
> and in fact it's often wrong.
>
> cheers,
> Pádraig.
>

I'm sorry but this change does not really address my concern. The 
previous definition of %o did refer to "block" without specifying which 
kind of block. This is no longer the case as the new definition no 
longer refers to blocks. However, I still do not consider the new 
definition, "Optimal I/O transfer size hint", understandable.
To come back to my original problem, I tried figuring out how much disk 
space a small file took. In Windows, I would look at "Size on disk". If 
"optimal I/O transfer size hint" means size on disk, this is still very 
unclear. Even after reading your answers, I don't understand what 
"Optimal I/O transfer size" means. I am not looking for a transfer size. 
My question is, if I'm putting a small file on my filesystem, how much 
space will it use.
Here are 2 new descriptions I suggest:
Size occupied when including slack space
Size of the clusters occupied

Appart from %o, the ambiguity problem in the descriptions of %b and %B 
remains.

Thank you for the information about blocks and commands Pádraig.




This bug report was last modified 13 years and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.