summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2014-09-25 10:12:46 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-11-03 20:50:08 -0800
commit4a79fa4f2694888258942222db2c8390f168c731 (patch)
tree3b297d77ea100a25f4fe05c9a2c7207e5c07f433
parent0da374020c17256141fb3971ae792b62097d72df (diff)
features/quota: Use per-volume log file for crawler
Change-Id: I195b3309bae7e684b7dbf771e4f3b4778d0dac4c BUG: 1146377 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/8843 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index f1e0417dbe5..53c7f99913f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -173,10 +173,11 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname,
int type)
{
pid_t pid;
- int32_t ret = 0;
- int status = 0;
- char mountdir[] = "/tmp/mntXXXXXX";
- runner_t runner = {0};
+ int32_t ret = 0;
+ int status = 0;
+ char mountdir[] = "/tmp/mntXXXXXX";
+ char logfile[PATH_MAX] = {0,};
+ runner_t runner = {0};
if (mkdtemp (mountdir) == NULL) {
gf_log ("glusterd", GF_LOG_DEBUG,
@@ -184,6 +185,8 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname,
ret = -1;
goto out;
}
+ snprintf (logfile, sizeof (logfile),
+ DEFAULT_LOG_FILE_DIRECTORY"/%s-quota-crawl.log", volname);
runinit (&runner);
runner_add_args (&runner, SBIN_DIR"/glusterfs",
@@ -191,8 +194,7 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname,
"--volfile-id", volname,
"--use-readdirp=no",
"--client-pid", QUOTA_CRAWL_PID,
- "-l", DEFAULT_LOG_FILE_DIRECTORY"/quota-crawl.log",
- mountdir, NULL);
+ "-l", logfile, mountdir, NULL);
synclock_unlock (&priv->big_lock);
ret = runner_run_reuse (&runner);