[PVFS2-CVS] commit by bradles in pvfs2/src/common/misc: pint-cached-config.c pint-cached-config.h

CVS commit program cvs at parl.clemson.edu
Fri Jul 23 13:16:00 EDT 2004


Update of /projects/cvsroot/pvfs2/src/common/misc
In directory styx.parl.clemson.edu:/tmp/cvs-serv13117/src/common/misc

Modified Files:
	pint-cached-config.c pint-cached-config.h 
Log Message:
Removed dependency to system interface from pint-cached-config.  Get_num_dfiles now takes number of dfiles requested as explicit param instead of attrs.


Index: pint-cached-config.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pint-cached-config.c,v
diff -c -p -u -r1.2 -r1.3
--- pint-cached-config.c	8 Jul 2004 21:02:20 -0000	1.2
+++ pint-cached-config.c	23 Jul 2004 16:16:00 -0000	1.3
@@ -596,31 +596,21 @@ int PINT_cached_config_map_to_server(
  */
 int PINT_cached_config_get_num_dfiles(PVFS_fs_id fsid,
                                PINT_dist* dist,
-                               PVFS_sys_attr attr,
+                               int num_dfiles_requested,
                                int* num_dfiles)
 {
-    int num_dfiles_req;
-    int num_servers_req;
+    int num_servers_requested;
     int ret;
 
-    /* Get the user's dfile count request (it may be ignored by dist) */
-    if (attr.mask & PVFS_ATTR_SYS_DFILE_COUNT)
-    {
-        num_dfiles_req = attr.dfile_count;
-    }
-    else
-    {
-        num_dfiles_req = 0;
-    }
-
     /* Get the number of available servers */
-    ret = PINT_cached_config_get_num_io(fsid, &num_servers_req);
+    ret = PINT_cached_config_get_num_io(fsid, &num_servers_requested);
+
     if (0 == ret)
     {
         /* Let the distribution determine the number of dfiles to use */
         *num_dfiles = dist->methods->get_num_dfiles(dist->params,
-                                                    num_servers_req,
-                                                    num_dfiles_req);
+                                                    num_servers_requested,
+                                                    num_dfiles_requested);
     }
     else
     {

Index: pint-cached-config.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pint-cached-config.h,v
diff -c -p -u -r1.3 -r1.4
--- pint-cached-config.h	8 Jul 2004 21:21:51 -0000	1.3
+++ pint-cached-config.h	23 Jul 2004 16:16:00 -0000	1.4
@@ -15,11 +15,6 @@
 #include "trove.h"
 #include "server-config.h"
 
-/* TODO: this is needed for usage of PVFS_sys_attr, but it seems like we
- * shouldn't be operatingon sys_attr structures at this level 
- */
-#include "pvfs2-sysint.h"
-
 /* This is the interface to the cached_config management component of the
  * system interface.  It is responsible for managing the list of meta
  * and data servers and mapping between handle ranges and servers.
@@ -67,9 +62,9 @@ int PINT_cached_config_map_to_server(PVF
 			      PVFS_fs_id fsid);
 
 int PINT_cached_config_get_num_dfiles(PVFS_fs_id fsid,
-                               PINT_dist* dist,
-                               PVFS_sys_attr attr,
-                               int* num_dfiles);
+                                      PINT_dist* dist,
+                                      int num_dfiles_requested,
+                                      int* num_dfiles);
 
 int PINT_cached_config_get_num_meta(PVFS_fs_id fsid,
 			     int *num_meta);



More information about the PVFS2-CVS mailing list