gluster-devel
[Top][All Lists]
Advanced

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

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


From: Krishnan Parthasarathi
Subject: [Gluster-devel] [RFC] Accounting directory blocks in marker
Date: Fri, 11 Oct 2013 07:18:34 -0400 (EDT)

All,

Today, marker xlator doesn't account for the blocks consumed by directories.
This document describes the approach we plan to use to add directory size
accounting.

Extended attributes to be added:
--------------------------------

key = trusted.quota.dir-blocks-contri.
value = no. of ia_blocks consumed by this directory inode, as seen via stat(3).
This will be referred to as "directory sizes" herein.

Note: This extended attribute will be set only on directories.

This value indicates the contribution by the directory (alone) that has been
accounted so far, towards the parent's size.

With the above extended attribute we can keep track of changes in directory
sizes similar to how we handle changes to file sizes. A directory's
contribution to its parent would be as below,

Total size of a directory = Total Contribution to parent
    = ValueOfXattr(trusted.quota.dir-blocks-contri) +
      ValueOfXattr(trusted.quota.size)

This relation must be used for both reporting disk-usage in the context of
quotas and for percolating (delta) accounting updates 'upwards'.

Let us know if you see any issues with this approach, as soon as possible.

thanks,
Krish





reply via email to

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