[SSI] openssi/kernel/cluster/ssi/cfs cfs_subr.c,1.30,1.31
Roger Tsang <[email protected]> Wed, 15 Dec 2010 07:30:39 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv18756/kernel/cluster/ssi/cfs
Modified Files:
Tag: OPENSSI-FC
cfs_subr.c
Log Message:
- cfs_rebuild_attach_cnodes: use hfind(). fast path.
- cfs_rebuild_attach_cnodes: no need to acquire c_statelock for c_hp since CFS SB is down.
Index: cfs_subr.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/cfs_subr.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- cfs_subr.c 15 Dec 2010 06:44:25 -0000 1.30
+++ cfs_subr.c 15 Dec 2010 07:30:37 -0000 1.31
@@ -392,7 +392,7 @@
return "QRYRET";
case QRYFAIL:
return "QRYFAIL";
-#ifdef NOTUSED
+#ifdef CFS_POLICY
case HINT:
return "HINT";
#endif
@@ -687,6 +687,7 @@
SSI_ASSERT(mip != NULL);
SSI_ASSERT(CFS_SB_HARD_MIP(mip));
SSI_ASSERT(CFS_AT_SERVER_MIP(mip));
+ SSI_ASSERT(!CFS_SB_UP_MIP(mip));
/* Fetch processing list. */
LOCK_COND_LOCK(&mip->mi_cond_lock);
@@ -698,16 +699,15 @@
entry = 0;
while ((ipp = (struct inode **)ics_chunk_get_entry(icp, entry))) {
cp = itoc(*ipp);
- hp = svrtok_lookup(&cp->c_fh, NULL, NULL);
- /* Found? */
- if (hp == NULL) {
- printk("cfs_rebuild_attach_cnodes: "
- "svrcfstok structure not found\n");
- BUG();
- }
- LOCK_COND_LOCK(&cp->c_statelock);
+
+ hp = hfind(&cp->c_fh);
+ if (unlikely(hp == NULL))
+ panic("%s: svrcfstok structure not found\n",
+ __FUNCTION__);
+ /* NB: no need to acquire c_statelock for c_hp
+ * since CFS SB is down.
+ */
cp->c_hp = hp;
- UNLOCK_COND_LOCK(&cp->c_statelock);
/* Next. */
entry++;
}
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d