path: root/libglusterfs
diff options
authorVarun Shastry <>2013-10-22 16:12:58 +0530
committerVijay Bellur <>2014-01-16 02:01:23 -0800
commit39968c09626074b34b62541af5940f44ba70cc06 (patch)
tree72fc0d3fcd636e88f1572a805ee2f3afff5315b2 /libglusterfs
parent902276ebd7d6d7b3158d7c4796cdd392b6e958c3 (diff)
features/quota: Metadata cleanup
Quota and marker uses 'trusted.glusterfs.quota*' and 'trusted.pgfid*' xattrs to store its configurations and accounting information and also to build the parent inode chain in case of absense of path. Problem: After disabling and then enabling quota back, the xattrs may contain stale data leading to impaired accounting and thus improper enforcement. Solution: Clean up all the quota related xattrs after quota disable. Marker xlator implements a virtual xattr to cleanup quota and pgfid xattrs. In this approach glusterd mounts an auxiliary mount and sends the below command to all the files by crawling the mountpoint. #setfattr -n "glusterfs.quota-xattr-cleanup" -v 1 <path/to/file> Credit: Krishnan Parthasarathi <> Varun Shastry <> Change-Id: I9380eca58a285dc27dd572de1767aac8f2cd8049 BUG: 969461 Signed-off-by: Varun Shastry <> Reviewed-on: Reviewed-by: Raghavendra G <> Tested-by: Gluster Build System <> Reviewed-by: Krishnan Parthasarathi <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'libglusterfs')
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 6dc2fe6df..09b26ecf3 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -87,6 +87,7 @@
#define GF_XATTR_GET_REAL_FILENAME_KEY "glusterfs.get_real_filename:"
#define GF_XATTR_USER_PATHINFO_KEY "glusterfs.pathinfo"
#define QUOTA_LIMIT_KEY "trusted.glusterfs.quota.limit-set"
+#define VIRTUAL_QUOTA_XATTR_CLEANUP_KEY "glusterfs.quota-xattr-cleanup"
#define GF_READDIR_SKIP_DIRS "readdir-filter-directories"