return 0;
}
-#ifndef __KERNEL__
- /* Racing is impossible in single-threaded userland selftest */
- LBUG();
-#endif
return EBUSY; /* racing with sfw_session_expired() */
}
spin_lock(&sfw_data.fw_lock);
}
-#ifndef __KERNEL__
-
-int
-sfw_session_removed (void)
-{
- return (sfw_data.fw_session == NULL) ? 1 : 0;
-}
-
-#endif
static void
sfw_session_expired (void *data)
LASSERT(rpc->crpc_bulk.bk_niov == 0);
LASSERT(list_empty(&rpc->crpc_list));
LASSERT(atomic_read(&rpc->crpc_refcount) == 0);
-#ifndef __KERNEL__
- LASSERT(rpc->crpc_bulk.bk_pages == NULL);
-#endif
CDEBUG(D_NET, "Outgoing framework RPC done: "
"service %d, peer %s, status %s:%d:%d\n",
}
LASSERT (bk != NULL);
-#ifndef __KERNEL__
- LASSERT (bk->bk_pages != NULL);
-#endif
LASSERT (bk->bk_niov * SFW_ID_PER_PAGE >= (unsigned int)ndest);
LASSERT((unsigned int)bk->bk_len >=
sizeof(lnet_process_id_packed_t) * ndest);
lnet_process_id_packed_t id;
int j;
-#ifdef __KERNEL__
dests = page_address(bk->bk_iovs[i / SFW_ID_PER_PAGE].kiov_page);
LASSERT (dests != NULL); /* my pages are within KVM always */
-#else
- dests = page_address(bk->bk_pages[i / SFW_ID_PER_PAGE]);
-#endif
id = dests[i % SFW_ID_PER_PAGE];
if (msg->msg_magic != SRPC_MSG_MAGIC)
sfw_unpack_id(id);
rpc->srpc_done = sfw_server_rpc_done;
spin_lock(&sfw_data.fw_lock);
-#ifdef __KERNEL__
if (!sfw_data.fw_shuttingdown)
sfw_add_session_timer();
-#else
- LASSERT(!sfw_data.fw_shuttingdown);
- sfw_add_session_timer();
-#endif
sfw_data.fw_active_srpc = NULL;
spin_unlock(&sfw_data.fw_lock);
spin_lock(&sfw_data.fw_lock);
-#ifdef __KERNEL__
if (!sfw_data.fw_shuttingdown)
sfw_add_session_timer();
-#else
- LASSERT(!sfw_data.fw_shuttingdown);
- sfw_add_session_timer();
-#endif
sfw_data.fw_active_srpc = NULL;
spin_unlock(&sfw_data.fw_lock);
srpc_service_t *sv;
sfw_test_case_t *tsc;
-#ifndef __KERNEL__
- char *s;
-
- s = getenv("SESSION_TIMEOUT");
- session_timeout = s != NULL ? atoi(s) : session_timeout;
-
- s = getenv("RPC_TIMEOUT");
- rpc_timeout = s != NULL ? atoi(s) : rpc_timeout;
-#endif
if (session_timeout < 0) {
CERROR ("Session timeout must be non-negative: %d\n",
spin_lock(&sfw_data.fw_lock);
sfw_data.fw_shuttingdown = 1;
-#ifdef __KERNEL__
lst_wait_until(sfw_data.fw_active_srpc == NULL, sfw_data.fw_lock,
"waiting for active RPC to finish.\n");
-#else
- LASSERT (sfw_data.fw_active_srpc == NULL);
-#endif
if (sfw_del_session_timer() != 0)
lst_wait_until(sfw_data.fw_session == NULL, sfw_data.fw_lock,