> 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 know this (BTW st_blocks is in 512 bytes if I remember well) I was
just too lazy to write it precisely ;)

> 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.
  Here's another problem that I need to propagate something like i_blocks
but in bytes to userspace (for quotacheck). It probably means another
entry to stat structure...

                                        Bye
                                                Honza

Reply via email to