Jan Kara wrote:
> 
>   Hello.
> 
>   I'm working on new quotafile format (to be ready for inclusion in 2.5). As a
> benefit we should be able to support 32-bit UIDs with quotas and also space
> will be accounted in bytes not in blocks (this is needed for ReiserFS).
> But there is one problem with byte accounting - there is no way to get
> real number of bytes file occupies. i_size includes holes and i_blocks
> is in blocks. Does anybody see any other way than creating new field
> in inode like i_realsize or something like that?

Quotas should count the disk space consumed by a file, not the file size
in bytes. The question is how to correctly report that information if
it's smaller than blocks. st_blocks of struct stat is the number of
blocks allocated, for example. Granularity smaller than 1024 bytes may
still be a good thing for other file systems (sub-block allocation).

I have another related problem with my extended attributes patch
(extended attributes of a file also require some disk space, obviously).
I'm adding the blocks consumed by EAs to the i_blocks field. That way,
even quotacheck works as expected.


Regards,
Andreas.

------------------------------------------------------------------------
 Andreas Gruenbacher, [EMAIL PROTECTED]
 Contact information: http://www.bestbits.at/~ag/

Reply via email to