/* * This is embedded in an object that wants a callback before deleting * an xprt; intended for use by NFSv4.1, which needs to know when a * client's tcp connection (and hence possibly a backchannel) goes away.
*/ struct svc_xpt_user { struct list_head list; void (*callback)(struct svc_xpt_user *);
};
/* flag bits for xpt_flags */ enum {
XPT_BUSY, /* enqueued/receiving */
XPT_CONN, /* conn pending */
XPT_CLOSE, /* dead or dying */
XPT_DATA, /* data pending */
XPT_TEMP, /* connected transport */
XPT_DEAD, /* transport closed */
XPT_CHNGBUF, /* need to change snd/rcv buf sizes */
XPT_DEFERRED, /* deferred request pending */
XPT_OLD, /* used for xprt aging mark+sweep */
XPT_LISTENER, /* listening endpoint */
XPT_CACHE_AUTH, /* cache auth info */
XPT_LOCAL, /* connection from loopback interface */
XPT_KILL_TEMP, /* call xpo_kill_temp_xprt before closing */
XPT_CONG_CTRL, /* has congestion control */
XPT_HANDSHAKE, /* xprt requests a handshake */
XPT_TLS_SESSION, /* transport-layer security established */
XPT_PEER_AUTH, /* peer has been authenticated */
XPT_PEER_VALID, /* peer has presented a filehandle that * it has access to. It is NOT counted * in ->sv_tmpcnt.
*/
XPT_RPCB_UNREG, /* transport that needs unregistering * with rpcbind (TCP, UDP) on destroy
*/
};
/* * Maximum number of "tmp" connections - those without XPT_PEER_VALID - * permitted on any service.
*/ #define XPT_MAX_TMP_CONN 64
staticinlineint register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
{
spin_lock(&xpt->xpt_lock); if (test_bit(XPT_CLOSE, &xpt->xpt_flags)) { /* * The connection is about to be deleted soon (or, * worse, may already be deleted--in which case we've * already notified the xpt_users).
*/
spin_unlock(&xpt->xpt_lock); return -ENOTCONN;
}
list_add(&u->list, &xpt->xpt_users);
spin_unlock(&xpt->xpt_lock); return 0;
}
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.