Re: [RFC] Accounting directory blocks in marker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> This sounds Ok to me, but is there any reason we couldn't use the
> existing marker xattr naming scheme instead of creating a new key? E.g.,
> a directory gets the same contribution xattr that a file gets, only it
> happens to contribute to itself? Alternatively, maybe there's room for
> an optimization here where the directory stat data can simply be folded
> into the directory size. Thoughts?

Yes, I think we can do away with an extra xattr indicating contribution of directory file size if we change the semantics of contribution variable to "size contributed from this directory towards its parent, where size is sum of directory file size and size of directory subtree". This way we can always calculate delta as:

delta = (disk usage of directory subtree stored in size xattrs) + (disk usage of directory file as indicated by st_blocks) - (value stored in contribution xattrs).

If delta is non-zero, it needs to be updated till root.

regards,
Raghavendra.



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux