/* we're delaying our quorum decision so that heartbeat will have timed *outtrulydeadnodesbythetimewecomearoundtomakingdecisions
* on their number */ #define O2NET_QUORUM_DELAY_MS ((o2hb_dead_threshold + 2) * O2HB_REGION_TIMEOUT_MS)
struct o2net_node { /* this is never called from int/bh */
spinlock_t nn_lock;
/* set the moment an sc is allocated and a connect is started */ struct o2net_sock_container *nn_sc; /* _valid is only set after the handshake passes and tx can happen */ unsigned nn_sc_valid:1; /* if this is set tx just returns it */ int nn_persistent_error; /* It is only set to 1 after the idle time out. */
atomic_t nn_timeout;
/* threads waiting for an sc to arrive wait on the wq for generation *toincrease.itisincreasedwhenaconnectingsocketsucceeds
* or fails or when an accepted socket is attached. */
wait_queue_head_t nn_sc_wq;
/* connects are attempted from when heartbeat comes up until either hb *goesdown,thenodeisunconfigured,oraconnectsucceeds. *connect_workisqueuedfromset_nn_statebothfromhbupandfrom *itselfifaconnectattemptfailsandsocanbeself-arming. *shutdowniscarefultofirstmarkthennsuchthatnoconnectswill *beattemptedbeforecancelingdelayedconnectworkandflushingthe
* queue. */ struct delayed_work nn_connect_work; unsignedlong nn_last_connect_attempt;
/* this is queued as nodes come up and is canceled when a connection is *established.thisexpiringgivesuponthenodeanderrorsout
* transmits */ struct delayed_work nn_connect_expired;
/* after we give up on a socket we wait a while before deciding *thatitisstillheartbeatingandthatweshoulddosome
* quorum work */ struct delayed_work nn_still_up;
};
struct o2net_sock_container { struct kref sc_kref; /* the next two are valid for the life time of the sc */ struct socket *sc_sock; struct o2nm_node *sc_node;
/* all of these sc work structs hold refs on the sc while they are *queued.theyshouldnotbeabletorefafreedsc.theteardown
* race is with o2net_wq destruction in o2net_stop_listening() */
/* rx and connect work are generated from socket callbacks. sc
* shutdown removes the callbacks and then flushes the work queue */ struct work_struct sc_rx_work; struct work_struct sc_connect_work; /* shutdown work is triggered in two ways. the simple way is *foracodepathcallsensure_shutdownwhichgetsalock,removes *thescfromthenn,andqueuesthework.inthiscasethe *workissingle-shot.theworkisalsoqueuedfromasock *callback,though,andinthiscasetheworkwillfindthesc *stillonthennandwillcallensure_shutdownitself..this *endsuptriggeringtheshutdownworkagain,thoughnothing *willbedoneinthatseconditeration.soworkqueueteardown *hastobecarefultoremovethescfromthennbeforewaiting *ontheworkqueuesothattheshutdownworkdoesn'tremovethe *scandrearmitself.
*/ struct work_struct sc_shutdown_work;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.