From 393cdb2613250031fce92cab8dede9154514f816 Mon Sep 17 00:00:00 2001 From: Humble Devassy Chirammal Date: Fri, 13 Mar 2015 19:08:38 +0530 Subject: gfapi: improve source comments and error messages. Change-Id: I0bfa44eb5b5f21e381af3e71c26ea863e4adc46f BUG:1202274 Signed-off-by: Humble Devassy Chirammal Reviewed-on: http://review.gluster.org/9878 Tested-by: Gluster Build System Reviewed-by: Niels de Vos --- api/src/glfs-internal.h | 6 +++--- api/src/glfs-resolve.c | 2 +- api/src/glfs.c | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'api') 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) -- cgit