gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] [RFC] Accounting directory blocks in marker


From: Raghavendra Gowdappa
Subject: Re: [Gluster-devel] [RFC] Accounting directory blocks in marker
Date: Mon, 14 Oct 2013 22:18:56 -0400 (EDT)

> 
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]