[Pvfs2-cvs] commit by shuangy in pvfs2/src/client/sysint:
sys-mkdir.sm
CVS commit program
cvs at parl.clemson.edu
Mon Dec 6 16:25:59 EST 2010
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb1:/tmp/cvs-serv5672/src/client/sysint
Modified Files:
Tag: Orange-Elaine-Distr-Dir-Branch
sys-mkdir.sm
Log Message:
1. add >InitNumDirdataHandles< field to fs_config and default value set to 2. 2. add command line options >-n, --init-num-dirdata< to pvfs2-mkdir to set initial number of dirdata handles for a directory. (not yet applied to kernel module.)
Index: sys-mkdir.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-mkdir.sm,v
diff -p -u -r1.66.36.11 -r1.66.36.12
--- sys-mkdir.sm 3 Dec 2010 22:17:46 -0000 1.66.36.11
+++ sys-mkdir.sm 6 Dec 2010 21:25:59 -0000 1.66.36.12
@@ -607,7 +607,6 @@ static PINT_sm_action mkdir_parent_getat
struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
PVFS_object_attr *attr = NULL;
int i;
- int ret = -PVFS_EINVAL;
gossip_debug(GOSSIP_CLIENT_DEBUG, "mkdir state: parent_getattr_inspect\n");
@@ -636,28 +635,16 @@ static PINT_sm_action mkdir_parent_getat
/* note that permission checking is left to server even in this case */
}
- /* TODO: use settings from the config file, or from parent dir? */
- /* Determine the number of dirent files. For now just assume we will use
- * all the metadata servers.
- */
- ret = PINT_cached_config_get_num_meta(sm_p->object_ref.fs_id,
- &sm_p->u.mkdir.num_dirent_files);
- if(ret < 0)
- {
- gossip_err("Error: failed to get number of metadata servers\n");
- js_p->error_code = ret;
- return SM_ACTION_COMPLETE;
- }
-
-#if 0
/* set value of num_dirent_files,
- * max(max(parent_num, command_line) [client], config_file)[server] */
- sm_p->u.mkdir.num_dirent_files = attr->u.dir.dist_dir_attr.num_servers;
+ * not considering parent_# since it doesn't have direct relation.
+ * here, if user has inputs, send it, otherwise, send 0.
+ * on server side, if met 0, use config_file data, otherwise use user set value */
+
+ /* get command line value of NumDirdata from sys_attr */
+ sm_p->u.mkdir.num_dirent_files = sm_p->u.mkdir.sys_attr.dirdata_count;
- /* TODO: get command line value of NumDirdata */
/* note: if select less # of dirdata servers, need to modify getattr, etc. to contact only active servers, not all dirdata servers */
-#endif
return SM_ACTION_COMPLETE;
}
More information about the Pvfs2-cvs
mailing list