From 6eaa561526c340c48b12f0cf149c6c5a2903d751 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 14 Mar 2019 10:04:28 +0530 Subject: gfapi: provide an api for setting statedump path Currently for an application using glfsapi to use glusterfs, when a statedump is taken, it uses /var/run/gluster dir to dump info. There can be concerns as this directory may be owned by some other user, and hence it may fail taking statedump. Such applications should have an option to use different path. This patch provides an API to do so. Updates: bz#1689097 Change-Id: I8918e002bc823d83614c972b6c738baa04681b23 Signed-off-by: Amar Tumballi --- tests/basic/gfapi/glfsxmp-coverage.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/basic') diff --git a/tests/basic/gfapi/glfsxmp-coverage.c b/tests/basic/gfapi/glfsxmp-coverage.c index a55616ef739..11860c526e0 100644 --- a/tests/basic/gfapi/glfsxmp-coverage.c +++ b/tests/basic/gfapi/glfsxmp-coverage.c @@ -1782,6 +1782,11 @@ main(int argc, char *argv[]) ret = glfs_set_logging(fs2, "/dev/stderr", 7); + ret = glfs_set_statedump_path(fs2, "/tmp"); + if (ret) { + fprintf(stderr, "glfs_set_statedump_path: %s\n", strerror(errno)); + } + ret = glfs_init(fs2); fprintf(stderr, "glfs_init: returned %d\n", ret); -- cgit