Re: New entry in inode/stat

From: Andrea Arcangeli (andrea@suse.de)
Date: Fri Jul 28 2000 - 06:18:58 EST


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/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:29 EST