From d2fb898e9d0ce4c18e189f598416eaa58ab68d5b Mon Sep 17 00:00:00 2001 From: Sanoj Unnikrishnan Date: Tue, 22 May 2018 14:43:12 +0530 Subject: Quota: Fix crawling of files Problem: Running "find ." does not crawl files. It goes over the directories and lists all dentries with getdents system call. Hence the files are not looked up. Solution: explicitly triggerr stat on files with find . -exec stat {} \; since crawl can take slightly longer, updating timeout in test case Change-Id: If3c1fba2ed8e300c9cc08c1b5c1ba93cb8e4d6b6 fixes: bz#1533000 Signed-off-by: Sanoj Unnikrishnan --- xlators/mgmt/glusterd/src/glusterd-quota.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index 847c1a721d0..ed135d41f64 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -351,7 +351,9 @@ _glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, if (type == GF_QUOTA_OPTION_TYPE_ENABLE || type == GF_QUOTA_OPTION_TYPE_ENABLE_OBJECTS) - runner_add_args (&runner, "find", ".", NULL); + runner_add_args (&runner, "/usr/bin/find", ".", + "-exec", "/usr/bin/stat", + "{}", "\\", ";", NULL); else if (type == GF_QUOTA_OPTION_TYPE_DISABLE) { -- cgit