summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.h
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-04-02 13:43:36 -0700
committerNiels de Vos <ndevos@redhat.com>2014-05-09 19:06:36 -0700
commitba328340e878c3156418bb3443c35a7db02a0f4b (patch)
tree84a11a6dec7245a9e0457461b2c45cc5c2d6f3b0 /api/src/glfs.h
parente528724e793a8add1e3c21932913d8cb4e93da8c (diff)
gfapi: glfs_set_volfile_server() now entertains multiple calls
Backport from - http://review.gluster.org/7317 Previous API: glfs_set_volfile_server (..., const char *host, ...) - single call New API's: glfs_set_volfile_server (..., const char *host1, ...) glfs_set_volfile_server (..., const char *host2, ...) Multiple calls to this function with different volfile servers, port or transport-type would create a list of volfile servers which would be polled during `volfile_fetch_attempts()` glfs_unset_volfile_server (..., const char *host, ...) to remove a server from the list (this is provided for future usage) >> Change-Id: I313efbd3efbd0214e2a71465f33195788df406cc >> BUG: 986429 >> Signed-off-by: Harshavardhana <harsha@harshavardhana.net> >> Reviewed-on: http://review.gluster.org/7317 >> Tested-by: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Niels de Vos <ndevos@redhat.com> >> Reviewed-by: Anand Avati <avati@redhat.com> Change-Id: If0020f6b8775bdbe987563247c83d59a2d3744ad BUG: 986429 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7384 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'api/src/glfs.h')
-rw-r--r--api/src/glfs.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/api/src/glfs.h b/api/src/glfs.h
index bf298ce47a6..2210c26d34f 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -115,12 +115,12 @@ int glfs_set_volfile (glfs_t *fs, const char *volfile);
/*
SYNOPSIS
- glfs_set_volfile_server: Specify the address of management server.
+ glfs_set_volfile_server: Specify the list of addresses for management server.
DESCRIPTION
- This function specifies the address of the management server (glusterd)
- to connect, and establish the volume configuration. The @volname
+ This function specifies the list of addresses for the management server
+ (glusterd) to connect, and establish the volume configuration. The @volname
parameter passed to glfs_new() is the volume which will be virtually
mounted as the glfs_t object. All operations performed by the CLI at
the management server will automatically be reflected in the 'virtual
@@ -136,19 +136,22 @@ int glfs_set_volfile (glfs_t *fs, const char *volfile);
@transport: String specifying the transport used to connect to the
management daemon. Specifying NULL will result in the usage
- of the default (tcp) transport type. Permitted values
- are those what you specify as transport-type in a volume
- specification file (e.g "tcp", "rdma", "unix".)
+ of the default (tcp) transport type. Permitted values
+ are those what you specify as transport-type in a volume
+ specification file (e.g "tcp", "rdma" etc.)
- @host: String specifying the address of where to find the management
- daemon. Depending on the transport type this would either be
- an FQDN (e.g: "storage01.company.com"), ASCII encoded IP
- address "192.168.22.1", or a UNIX domain socket path (e.g
- "/tmp/glusterd.socket".)
+ @host: String specifying the address where to find the management daemon.
+ This would either be
+ - FQDN (e.g: "storage01.company.com") or
+ - ASCII (e.g: "192.168.22.1")
+
+ NOTE: This API is special, multiple calls to this function with different
+ volfile servers, port or transport-type would create a list of volfile
+ servers which would be polled during `volfile_fetch_attempts()`
@port: The TCP port number where gluster management daemon is listening.
Specifying 0 uses the default port number GF_DEFAULT_BASE_PORT.
- This parameter is unused if you are using a UNIX domain socket.
+ This parameter is unused if you are using a UNIX domain socket.
RETURN VALUES
@@ -158,8 +161,10 @@ int glfs_set_volfile (glfs_t *fs, const char *volfile);
*/
int glfs_set_volfile_server (glfs_t *fs, const char *transport,
- const char *host, int port);
+ const char *host, int port);
+int glfs_unset_volfile_server (glfs_t *fs, const char *transport,
+ const char *host, int port) __THROW;
/*
SYNOPSIS