[Pvfs2-cvs] commit by pw in pvfs2/src/client/sysint: sys-lookup.sm
CVS commit program
cvs at parl.clemson.edu
Tue Jan 8 10:23:30 EST 2008
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb1:/tmp/cvs-serv13099/src/client/sysint
Modified Files:
sys-lookup.sm
Log Message:
Remove "fast path" initial lookup state. Per comments from Phil, the
ncache will never hit anything but a single element, and this full-path
query into the ncache is historical.
In the case that lookup is called on a single element, the first iteration
through the rest of the lookup states will find it anyway. That may cost
a few more states, but no extra server queries. Removing this code, however,
should make things easier to understand in the future.
Index: sys-lookup.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-lookup.sm,v
diff -u -p -p -u -r1.71 -r1.72
--- sys-lookup.sm 4 Jan 2008 16:45:58 -0000 1.71
+++ sys-lookup.sm 8 Jan 2008 15:23:29 -0000 1.72
@@ -43,7 +43,6 @@ enum
LOOKUP_TYPE_RELATIVE_LN = 5,
LOOKUP_TYPE_ABSOLUTE_LN = 6,
LOOKUP_TYPE_LN_NO_FOLLOW = 7,
- LOOKUP_NCACHE_HIT_FASTPATH = 8
};
static int lookup_segment_lookup_comp_fn(
@@ -62,14 +61,6 @@ static void finalize_context(
machine pvfs2_client_lookup_sm
{
- state lookup_init
- {
- run lookup_init;
- success => lookup_segment_lookup_setup_msgpair;
- LOOKUP_NCACHE_HIT_FASTPATH => lookup_cleanup;
- default => lookup_cleanup;
- }
-
state lookup_segment_lookup_setup_msgpair
{
run lookup_segment_lookup_setup_msgpair;
@@ -594,26 +585,6 @@ PVFS_error PVFS_sys_lookup(
/****************************************************************/
-static PINT_sm_action lookup_init(
- struct PINT_smcb *smcb, job_status_s *js_p)
-{
- struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
- gossip_debug(GOSSIP_CLIENT_DEBUG, "lookup state: lookup_init\n");
-
- assert(js_p->error_code == 0);
-
- /* check the ncache to see if we can bypass this entire lookup */
- if (PINT_ncache_get_cached_entry(
- (const char*)sm_p->u.lookup.orig_pathname,
- &sm_p->u.lookup.lookup_resp->ref,
- (const PVFS_object_ref*) &(sm_p->u.lookup.starting_refn)) == 0)
- {
- gossip_debug(GOSSIP_LOOKUP_DEBUG, "Lookup: ncache fast path!\n");
- js_p->error_code = LOOKUP_NCACHE_HIT_FASTPATH;
- }
- return SM_ACTION_COMPLETE;
-}
-
static PINT_sm_action lookup_segment_lookup_setup_msgpair(
struct PINT_smcb *smcb, job_status_s *js_p)
{
@@ -1016,12 +987,6 @@ static PINT_sm_action lookup_cleanup(
gossip_debug(GOSSIP_CLIENT_DEBUG, "lookup state: lookup_cleanup\n");
PINT_SM_GETATTR_STATE_CLEAR(sm_p->getattr);
-
- if (js_p->error_code == LOOKUP_NCACHE_HIT_FASTPATH)
- {
- gossip_debug(GOSSIP_LOOKUP_DEBUG, "Lookup fast path exiting\n");
- js_p->error_code = 0;
- }
sm_p->error_code = js_p->error_code;
More information about the Pvfs2-cvs
mailing list