summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.h
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-08-28 18:05:03 -0700
committerAnand Avati <avati@redhat.com>2013-09-17 11:42:12 -0700
commitd7f7510f218e656cf2ba3bd821b80c14ab53846a (patch)
treecd5bfad76c9185035921323acfd1a37226409871 /api/src/glfs.h
parent8eb3898578a4fe359934da57c0e51cfaa21685d4 (diff)
gfapi: implement a minimial glfs_fini()
At the very least, we should PARENT_DOWN on the currently active graph and disconnect ourselves from glusterd. Further cleanups underway. Change-Id: I9276686a84b0975b5ce272b4cbec1b80920d5c5c BUG: 1004519 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5788 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'api/src/glfs.h')
-rw-r--r--api/src/glfs.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/api/src/glfs.h b/api/src/glfs.h
index 519a04036..8aac6f8b6 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -218,6 +218,36 @@ int glfs_set_logging (glfs_t *fs, const char *logfile, int loglevel);
int glfs_init (glfs_t *fs);
+/*
+ SYNOPSIS
+
+ glfs_fini: Cleanup and destroy the 'virtual mount'
+
+ DESCRIPTION
+
+ This function attempts to gracefully destroy glfs_t object. An attempt is
+ made to wait for all background processing to complete before returning.
+
+ glfs_fini() must be called after all operations on glfs_t is finished.
+
+ IMPORTANT
+
+ IT IS NECESSARY TO CALL glfs_fini() ON ALL THE INITIALIZED glfs_t
+ OBJECTS BEFORE TERMINATING THE PROGRAM. THERE MAY BE CACHED AND
+ UNWRITTEN / INCOMPLETE OPERATIONS STILL IN PROGRESS EVEN THOUGH THE
+ API CALLS HAVE RETURNED. glfs_fini() WILL WAIT FOR BACKGROUND OPERATIONS
+ TO COMPLETE BEFORE RETURNING, THEREBY MAKING IT SAFE FOR THE PROGRAM TO
+ EXIT.
+
+ PARAMETERS
+
+ @fs: The 'virtual mount' object to be destroyed.
+
+ RETURN VALUES
+
+ 0 : Success.
+*/
+
int glfs_fini (glfs_t *fs);
/*