lkml.org 
[lkml]   [2003]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: nfs fstat st_blocks overreporting

On Mon, 13 Oct 2003, Frank Cusack wrote:
>
> While you know I disagree that s_blocksize should be wtmult (ie, it
> is wtmult?wtmult:512 and I think it should be MAX(rsize,wsize)), in
> any event the blocks used reporting is incorrect in that it assumes
> a 512 byte blocksize.

I agree with you that st_blocksize should very probably be different (in
_no_ case has it got anything to do with just "wtmult", since the thing
is used for reading too). However, the st_blocks calculations has
_nothing_ to do with st_blocksize.

st_blocksize is "this is the preferred blocking for IO".

st_blocks is "this is how many 512-byte blocks the file has".

The names may be similar, but they have nothing in common. They are in
totally different namespaces - one is in bytes, the other one in units of
"traditional UNIX block size", aka sector, aka 512 bytes. Trying to mix
the two is doomed.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.034 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site