summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorHumble Devassy Chirammal <hchiramm@redhat.com>2015-03-13 19:08:38 +0530
committerNiels de Vos <ndevos@redhat.com>2015-03-16 02:49:43 -0700
commit393cdb2613250031fce92cab8dede9154514f816 (patch)
treeddb50423a90cbd31d4edf781ae34f5d665b2cbbd /api
parent0ab4cb8174f478e8f725f13e96f608a6186e8384 (diff)
gfapi: improve source comments and error messages.
Change-Id: I0bfa44eb5b5f21e381af3e71c26ea863e4adc46f BUG:1202274 Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/9878 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-internal.h6
-rw-r--r--api/src/glfs-resolve.c2
-rw-r--r--api/src/glfs.c8
3 files changed, 11 insertions, 5 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index 11a9a76f68e..b704c558722 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -301,9 +301,9 @@ struct glfs *glfs_new_from_ctx (glusterfs_ctx_t *ctx)
DESCRIPTION
The glfs_t object allocated by glfs_new_from_ctx() must be released
- by the caller using this routine. The usage is restricted to NFS
- MOUNT over UDP i.e.
- __mnt3udp_get_export_subdir_inode ()
+ by the caller using this routine. The usage can be found
+ at glfs_fini() or NFS, MOUNT over UDP i.e.
+ __mnt3udp_get_export_subdir_inode ()
=> glfs_resolve_at().
PARAMETERS
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 3c69d78e487..0111a96799e 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -563,7 +563,7 @@ glfs_migrate_fd_locks_safe (struct glfs *fs, xlator_t *oldsubvol, fd_t *oldfd,
if (!dict_get (lockinfo, GF_XATTR_LOCKINFO_KEY)) {
gf_log (fs->volname, GF_LOG_WARNING,
- "missing lokinfo key (%s) on graph %s (%d)",
+ "missing lockinfo key (%s) on graph %s (%d)",
uuid_utoa_r (oldfd->inode->gfid, uuid1),
graphid_str (oldsubvol), oldsubvol->graph->id);
goto out;
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 2b98a2843e0..421374d9731 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -242,7 +242,7 @@ get_volfp (struct glfs *fs)
if ((specfp = fopen (cmd_args->volfile, "r")) == NULL) {
gf_log ("glfs", GF_LOG_ERROR,
- "volume file %s: %s",
+ "volume file %s open failed: %s",
cmd_args->volfile,
strerror (errno));
return NULL;
@@ -546,6 +546,12 @@ glfs_poller (void *data)
return NULL;
}
+/*
+ * please note all the variable initializations done here probably
+ * need to be added in 'glfs_new_from_ctx()' as well, so that,
+ * we do not miss out while adding new members in 'fs'.
+*/
+
struct glfs *
pub_glfs_new (const char *volname)