diff options
author | Amar Tumballi <amarts@redhat.com> | 2019-03-14 10:04:28 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-14 05:25:14 +0000 |
commit | 6eaa561526c340c48b12f0cf149c6c5a2903d751 (patch) | |
tree | b756ed5bd9d08d74987f1dda5610735f4cfa156d /api/src/glfs.h | |
parent | 928395eddf4241433effc55e294a7996108da7d8 (diff) |
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 <amarts@redhat.com>
Diffstat (limited to 'api/src/glfs.h')
-rw-r--r-- | api/src/glfs.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/api/src/glfs.h b/api/src/glfs.h index 671478206b8..a6c12e128df 100644 --- a/api/src/glfs.h +++ b/api/src/glfs.h @@ -1453,5 +1453,33 @@ int glfs_setattr(struct glfs *fs, const char *path, struct glfs_stat *stat, int follow) __THROW GFAPI_PUBLIC(glfs_setattr, 6.0); +/* + SYNOPSIS + + glfs_set_statedump_path: Function to set statedump path. + + DESCRIPTION + + This function is used to set statedump directory + + PARAMETERS + + @fs: The 'virtual mount' object to be configured with the volume + specification file. + + @path: statedump path. Should be a directory. But the API won't fail if the + directory doesn't exist yet, as one may create it later. + + RETURN VALUES + + 0 : Success. + -1 : Failure. @errno will be set with the type of failure. + + */ + +int +glfs_set_statedump_path(struct glfs *fs, const char *path) __THROW + GFAPI_PUBLIC(glfs_set_statedump_path, future); + __END_DECLS #endif /* !_GLFS_H */ |