[Pvfs2-cvs] commit by bligon in pvfs2/src/common/misc:
pint-cached-config.c pint-cached-config.h
CVS commit program
cvs at parl.clemson.edu
Thu Jun 25 12:56:02 EDT 2009
Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv7317/src/common/misc
Modified Files:
Tag: Orange-Branch
pint-cached-config.c pint-cached-config.h
Log Message:
Merged ORANGE-BECKY-BRANCH - Last of mirror changes.
Index: pint-cached-config.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pint-cached-config.c,v
diff -p -u -r1.32 -r1.32.10.1
--- pint-cached-config.c 8 Sep 2008 15:42:41 -0000 1.32
+++ pint-cached-config.c 25 Jun 2009 16:56:01 -0000 1.32.10.1
@@ -1787,6 +1787,52 @@ static int load_handle_lookup_table(
return(0);
}
+/* PINT_cached_config_server_names()
+ *
+ * Returns a list of pointers to the IO server names currently running in this
+ * file system.
+ *
+ * returns 0 on success, -PVFS_error on failure
+ */
+int PINT_cached_config_io_server_names( char ***list
+ , int *size
+ , PVFS_fs_id fsid)
+{
+ int i;
+ struct qlist_head *hash_link = NULL;
+ struct config_fs_cache_s *cur_config_cache = NULL;
+
+ assert(PINT_fsid_config_cache_table);
+
+ hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid));
+ if(!hash_link)
+ {
+ return(-PVFS_ENOENT);
+ }
+
+ cur_config_cache = qlist_entry(
+ hash_link, struct config_fs_cache_s, hash_link);
+
+ assert(cur_config_cache);
+
+ *size = cur_config_cache->io_server_count;
+
+ *list = malloc(sizeof(char *) * (*size));
+
+ if (! (*list) )
+ return(-PVFS_ENOMEM);
+
+ memset(*list,0,sizeof(char *) * (*size));
+
+ for (i=0; i<(*size); i++)
+ {
+ /*addr_string originates from the alias mapping->bmi_address*/
+ (*list)[i] = cur_config_cache->io_server_array[i].addr_string;
+ }
+
+ return(0);
+}
+
/*
* Local variables:
* c-indent-level: 4
Index: pint-cached-config.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pint-cached-config.h,v
diff -p -u -r1.13 -r1.13.10.1
--- pint-cached-config.h 8 Sep 2008 15:42:42 -0000 1.13
+++ pint-cached-config.h 25 Jun 2009 16:56:01 -0000 1.13.10.1
@@ -135,6 +135,11 @@ int PINT_cached_config_get_server_list(
int PINT_cached_config_reinitialize(
struct server_configuration_s *config);
+int PINT_cached_config_io_server_names(
+ char ***list,
+ int *size,
+ PVFS_fs_id fsid);
+
#endif /* __PINT_CACHED_CONFIG_H */
/*
More information about the Pvfs2-cvs
mailing list