diff options
author | vmallika <vmallika@redhat.com> | 2014-09-29 13:02:30 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2014-10-20 09:13:34 -0700 |
commit | b0ed286e9b53c5ad24f04686cd6ddfad940b87f3 (patch) | |
tree | 6e71cad3cf3100f7a918627055c02b4ead3705b3 /xlators/mgmt | |
parent | 30fab9575521fecc6498b67e5ec60b5150338aea (diff) |
glusterd/quota: Heal pgfid xattr on existing data when the quota is
enable
Backport of: http://review.gluster.org/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.
Change-Id: I956128907aa1d975cd5719ed3ab2f4f9b37d4c31
BUG: 1153900
Signed-off-by: vmallika <vmallika@redhat.com>
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8938
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-quota.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index 67ff65a3a62..8b170f5bafb 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -216,9 +216,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) |