[SSI] openssi/kernel/cluster/ssi/cfs cfstok.c,1.23,1.24
Roger Tsang <[email protected]>
| 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-serv14589/cluster/ssi/cfs
Modified Files:
Tag: OPENSSI-FC
cfstok.c
Log Message:
* CFS:
- Disable sharing mode detection flags. They were never used.
* CFS Token Architecture (#ifdef RCU_MSGSUP_HASH):
- In process_msgs() function
- Fix did not handle -EREMOTE from TRANSPORT(); error was discarded
and token never got to server.
- Remove "goto" statements.
- cfstok_send() optimize away RPC if server is down; just return
-EREMOTE.
Index: cfstok.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/cfstok.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cfstok.c 17 Dec 2009 06:43:50 -0000 1.23
+++ cfstok.c 2 Feb 2010 04:31:45 -0000 1.24
@@ -1561,15 +1561,21 @@
* Massage the operation if the SB is being rebuilt or belongs to
* a down soft mount.
*/
- if (!CFS_SB_UP_MIP(mip)
- && (!CFS_SB_HARD_MIP(mip) ||
- mip->mi_sb_state == MI_SB_STATE_REBUILD_HAVES)) {
- SSI_ASSERT(op == HAVE);
- if (op != HAVE) {
- if (op == GIVEBACK) {
- goto out;
+ if (!CFS_SB_UP_MIP(mip)) {
+ if (!CFS_SB_HARD_MIP(mip) ||
+ mip->mi_sb_state == MI_SB_STATE_REBUILD_HAVES) {
+ SSI_ASSERT(op == HAVE);
+ if (op != HAVE) {
+ if (op == GIVEBACK)
+ goto out;
+ op = 0;
}
- op = 0;
+ }
+ /* Optimize away RPC */
+ if (server != this_node) {
+ if (op == GIVEBACK)
+ goto out;
+ return -EREMOTE;
}
}
@@ -1664,12 +1670,21 @@
if (prio == 0)
ics_setpriority(0);
-out:
#ifdef DEBUG
- if (error && (error != EREMOTE || !clms_isnodedown(server)))
+ if (error && (error != -EREMOTE || !clms_isnodedown(server)))
printk(KERN_WARNING "cfstok_send: nsc_rcall error %d\n", error);
#endif
+ if (error == -EREMOTE) {
+ /* Server went down */
+ if (!CFS_SB_HARD_MIP(mip) ||
+ op == GIVEBACK) {
+ error = 0;
+ } else
+ return error;
+ }
+
+out:
iput(ip); /* undo HOLDOBJ() */
return error;
}
@@ -2351,6 +2366,7 @@
if (do_haves) {
int error;
+#ifdef SSI_CFS_SKIP
/* Turn off FSHIP til new server re-establishes state */
LOCK_COND_LOCK(&(ct)->c_statelock);
ct->c_flags &= ~CSHR_DOFSHIP;
@@ -2361,6 +2377,7 @@
*/
ct->c_flags &= ~CSHR_NOTSAFE;
UNLOCK_COND_LOCK(&(ct)->c_statelock);
+#endif
/* Set up svrcfstok with MHOLD and other cnode state */
error = cfstok_start_svrcfstok(ct);
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com