[PVFS2-CVS]
commit by pcarns in pvfs2/src/common/misc: pint-cached-config.c
CVS commit program
cvs at parl.clemson.edu
Fri Jul 23 12:24:31 EDT 2004
Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb:/tmp/cvs-serv11585/src/common/misc
Modified Files:
pint-cached-config.c
Log Message:
modify PINT_cached_config_get_next_io() so that it skips address resolution
if the io_addr_array argument is set to NULL
Index: pint-cached-config.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pint-cached-config.c,v
diff -p -u -r1.3 -r1.4
--- pint-cached-config.c 23 Jul 2004 16:16:00 -0000 1.3
+++ pint-cached-config.c 23 Jul 2004 15:24:31 -0000 1.4
@@ -302,6 +302,8 @@ int PINT_cached_config_get_next_meta(
* store new pieces of file data. This function is responsible for
* evenly distributing the file data storage load to all servers.
*
+ * NOTE: if io_addr_array is NULL, then don't resolve addresses
+ *
* returns 0 on success, -errno on failure
*/
int PINT_cached_config_get_next_io(
@@ -317,7 +319,7 @@ int PINT_cached_config_get_next_io(
struct qlist_head *hash_link = NULL;
struct config_fs_cache_s *cur_config_cache = NULL;
- if (config && num_servers && io_addr_array && io_handle_extent_array)
+ if (config && num_servers && io_handle_extent_array)
{
hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid));
if (hash_link)
@@ -346,11 +348,14 @@ int PINT_cached_config_get_next_io(
data_server_bmi_str = PINT_config_get_host_addr_ptr(
config,cur_mapping->alias_mapping->host_alias);
- ret = BMI_addr_lookup(io_addr_array,data_server_bmi_str);
- if (ret)
- {
- break;
- }
+ if(io_addr_array != NULL)
+ {
+ ret = BMI_addr_lookup(io_addr_array,data_server_bmi_str);
+ if (ret)
+ {
+ break;
+ }
+ }
io_handle_extent_array[i].extent_count =
cur_mapping->handle_extent_array.extent_count;
@@ -358,8 +363,9 @@ int PINT_cached_config_get_next_io(
cur_mapping->handle_extent_array.extent_array;
i++;
- io_addr_array++;
num_servers--;
+ if(io_addr_array != NULL)
+ io_addr_array++;
}
ret = ((num_servers == 0) ? 0 : ret);
}
More information about the PVFS2-CVS
mailing list