lkml.org 
[lkml]   [2000]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New entry in inode/stat
On Fri, 28 Jul 2000, Theodore Y. Ts'o wrote:

> Date: Fri, 28 Jul 2000 01:57:03 +0200
> From: Jan Kara <jack@suse.cz>
>
> As I mentioned in previous mail to account quotas in
> bytes and not in blocks (needed for reiserfs) I need to
> know something like i_blocks but in bytes. So I added
> field i_bytes to inode. This field is used along with
> i_blocks and means (number of used bytes) % 512 (size
> of block used in i_blocks).
> This solution has advantage that we added only 16-bits
> to structure and we needn't to update any block oriented
> filesystem...
> Another thing needed is to propagate somehow this entry
> to struct stat so quotacheck may account bytes properly.
> Whom should I ask to propagate needed changes to libc?
>
>This is bogus! What's wrong with the existing i_size and st_size
>fields?

one problem I can see is that i_size isn't reflecting the on disk usage.

fd = creat("file"...);
ftruncate("file", 2*1024*1024*1024-1);

i_size is now 2 giga but i_blocks is still zero if the fs support holes.

Andrea


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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.165 / U:0.380 seconds]
©2003-2014 Jasper Spaans. Advertise on this site