From 3dcb313572082edb07ed61145570b73a898c51e2 Mon Sep 17 00:00:00 2001 From: vmallika Date: Mon, 29 Sep 2014 13:02:30 +0530 Subject: glusterd/quota: Heal pgfid xattr on existing data when the quota is enable This is a backport of http://review.gluster.org/#/c/8878/ The pgfid extended attributes are used to construct the ancestry path (from the file to the volume root) for nameless lookups on files. As NFS relies on nameless lookups heavily, quota enforcement through NFS would be inconsistent if quota were to be enabled on a volume with existing data. Solution is to heal the pgfid extended attributes as a part of lookup perfomed by quota-crawl process. In a posix lookup check for pgfid xattr and if it is missing set the xattr. BUG: 1147953 Change-Id: I707d91a056e07452bfd1e070af5eddaa752a84ac Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/8890 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-quota.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index 857c4643e75..7338e826ca9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -225,9 +225,9 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname, runinit (&runner); if (type == GF_QUOTA_OPTION_TYPE_ENABLE) - - runner_add_args (&runner, "/usr/bin/find", "find", ".", - NULL); + runner_add_args (&runner, "/usr/bin/find", ".", + "-exec", "/usr/bin/stat", + "{}", "\\", ";", NULL); else if (type == GF_QUOTA_OPTION_TYPE_DISABLE) { -- cgit