From f95a25c35e1ced6a3c05030d34555b757b14e1c9 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 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. Change-Id: I5912ea96787625c496bde56d43ac9162596032e9 BUG: 1147378 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/8878 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