Lines Matching defs:sharedp
4431 rsm_import_share_t *sharedp;
4441 sharedp = seg->s_share;
4443 switch (sharedp->rsmsi_state) {
4447 sharedp->rsmsi_state = RSMSI_STATE_ABORT_CONNECT;
4453 if (sharedp->rsmsi_node != my_nodeid) {
4455 rsm_disconnect(sharedp->rsmsi_handle);
4459 sharedp->rsmsi_segid, e));
4462 sharedp->rsmsi_handle = NULL;
4464 sharedp->rsmsi_state = RSMSI_STATE_CONN_QUIESCE;
4470 if (sharedp->rsmsi_node != my_nodeid) {
4477 rsm_disconnect(sharedp->rsmsi_handle);
4480 sharedp->rsmsi_segid, e));
4483 sharedp->rsmsi_handle = NULL;
4485 sharedp->rsmsi_state = RSMSI_STATE_MAP_QUIESCE;
4569 rsm_import_share_t *sharedp;
4585 sharedp = seg->s_share;
4594 if ((sharedp->rsmsi_state == RSMSI_STATE_CONNECTED) ||
4595 (sharedp->rsmsi_state == RSMSI_STATE_MAPPED)) {
4597 seg->s_handle.in = sharedp->rsmsi_handle;
4605 sharedp->rsmsi_refcnt--;
4606 cookie = (void *)sharedp->rsmsi_cookie;
4608 if (sharedp->rsmsi_refcnt == 0) {
4609 ASSERT(sharedp->rsmsi_mapcnt == 0);
4613 mutex_destroy(&sharedp->rsmsi_lock);
4614 cv_destroy(&sharedp->rsmsi_cv);
4615 kmem_free((void *)(sharedp),
4647 if (sharedp->rsmsi_state != RSMSI_STATE_MAPPED) {
4665 sharedp->rsmsi_refcnt--;
4667 sharedp->rsmsi_mapcnt--;
4670 if (sharedp->rsmsi_refcnt == 0) {
4671 ASSERT(sharedp->rsmsi_mapcnt == 0);
4675 mutex_destroy(&sharedp->rsmsi_lock);
4676 cv_destroy(&sharedp->rsmsi_cv);
4677 kmem_free((void *)(sharedp),
4699 seg->s_handle.in = sharedp->rsmsi_handle;
4715 seg->s_mapinfo = sharedp->rsmsi_mapinfo;
4744 rsm_import_share_t *sharedp;
4753 sharedp = seg->s_share;
4760 if ((sharedp->rsmsi_state != RSMSI_STATE_CONN_QUIESCE) &&
4761 (sharedp->rsmsi_state != RSMSI_STATE_MAP_QUIESCE)) {
4767 if (sharedp->rsmsi_node != my_nodeid) {
4769 hwaddr = get_remote_hwaddr(adapter, sharedp->rsmsi_node);
4773 sharedp->rsmsi_segid, &sharedp->rsmsi_handle);
4777 sharedp->rsmsi_segid, e));
4781 sharedp->rsmsi_handle = NULL;
4782 sharedp->rsmsi_state = RSMSI_STATE_DISCONNECTED;
4784 cv_broadcast(&sharedp->rsmsi_cv);
4789 if (sharedp->rsmsi_state == RSMSI_STATE_CONN_QUIESCE) {
4790 sharedp->rsmsi_state = RSMSI_STATE_CONNECTED;
4792 cv_broadcast(&sharedp->rsmsi_cv);
4796 ASSERT(sharedp->rsmsi_state == RSMSI_STATE_MAP_QUIESCE);
4799 if (sharedp->rsmsi_node != my_nodeid) {
4809 p = sharedp->rsmsi_mapinfo;
4815 sharedp->rsmsi_handle, p->start_offset,
4843 if (p != sharedp->rsmsi_mapinfo) {
4848 rsm_unmap(sharedp->rsmsi_handle);
4851 rsm_free_mapinfo(sharedp->rsmsi_mapinfo);
4852 sharedp->rsmsi_mapinfo = NULL;
4855 rsm_disconnect(sharedp->rsmsi_handle);
4859 sharedp->rsmsi_segid, err));
4861 sharedp->rsmsi_handle = NULL;
4862 sharedp->rsmsi_state = RSMSI_STATE_DISCONNECTED;
4865 cv_broadcast(&sharedp->rsmsi_cv);
4872 sharedp->rsmsi_state = RSMSI_STATE_MAPPED;
4875 cv_broadcast(&sharedp->rsmsi_cv);
6097 rsm_import_share_t *sharedp;
6163 sharedp = rsmshare_get(msg->key, msg->nodeid, adapter, seg);
6171 "rsm_connect:RSMSI_STATE=%d\n", sharedp->rsmsi_state));
6172 switch (sharedp->rsmsi_state) {
6174 sharedp->rsmsi_state = RSMSI_STATE_CONNECTING;
6182 while ((sharedp->rsmsi_state ==
6184 (sharedp->rsmsi_state ==
6186 (sharedp->rsmsi_state ==
6188 if (cv_wait_sig(&sharedp->rsmsi_cv,
6189 &sharedp->rsmsi_lock) == 0) {
6217 sharedp->rsmsi_state = RSMSI_STATE_CONNECTING;
6224 if (sharedp->rsmsi_state == RSMSI_STATE_CONNECTING) {
6260 request.rsmipc_segment_cookie = sharedp;
6294 sharedp->rsmsi_mode = reply.rsmipc_mode;
6295 sharedp->rsmsi_uid = reply.rsmipc_uid;
6296 sharedp->rsmsi_gid = reply.rsmipc_gid;
6297 sharedp->rsmsi_seglen = reply.rsmipc_seglen;
6298 sharedp->rsmsi_cookie = sharedp;
6315 shared_cookie = sharedp->rsmsi_cookie;
6318 (sharedp->rsmsi_state == RSMSI_STATE_ABORT_CONNECT)) {
6327 if (!(sharedp->rsmsi_flags & RSMSI_FLAGS_ABORTDONE)) {
6332 sharedp->rsmsi_flags |= RSMSI_FLAGS_ABORTDONE;
6342 cv_broadcast(&sharedp->rsmsi_cv);
6355 e = rsm_access(sharedp->rsmsi_uid, sharedp->rsmsi_gid,
6356 access & sharedp->rsmsi_mode,
6370 if (sharedp->rsmsi_state == RSMSI_STATE_CONNECTING) {
6377 sharedp->rsmsi_state = RSMSI_STATE_NEW;
6378 cv_broadcast(&sharedp->rsmsi_cv);
6388 seg->s_segid = sharedp->rsmsi_segid;
6389 seg->s_len = sharedp->rsmsi_seglen;
6390 seg->s_mode = access & sharedp->rsmsi_mode;
6395 if (sharedp->rsmsi_state == RSMSI_STATE_CONNECTING) {
6398 addr, seg->s_segid, &sharedp->rsmsi_handle);
6425 sharedp->rsmsi_state = RSMSI_STATE_NEW;
6426 cv_broadcast(&sharedp->rsmsi_cv);
6442 seg->s_handle.in = sharedp->rsmsi_handle;
6461 msg->len = (int)sharedp->rsmsi_seglen;
6506 rsm_import_share_t *sharedp;
6525 sharedp = seg->s_share;
6533 ASSERT(sharedp->rsmsi_state == RSMSI_STATE_MAPPED ||
6534 sharedp->rsmsi_state == RSMSI_STATE_MAP_QUIESCE);
6543 ASSERT(sharedp->rsmsi_mapcnt > 0);
6545 sharedp->rsmsi_mapcnt--;
6547 if (sharedp->rsmsi_mapcnt == 0) {
6548 if (sharedp->rsmsi_state == RSMSI_STATE_MAPPED) {
6552 ASSERT(sharedp->rsmsi_handle != NULL);
6554 rsm_unmap(sharedp->rsmsi_handle);
6557 rsm_free_mapinfo(sharedp->rsmsi_mapinfo);
6558 sharedp->rsmsi_mapinfo = NULL;
6560 sharedp->rsmsi_state = RSMSI_STATE_CONNECTED;
6562 sharedp->rsmsi_state = RSMSI_STATE_CONN_QUIESCE;
6605 rsm_import_share_t *sharedp;
6635 sharedp = seg->s_share;
6637 ASSERT(sharedp != NULL);
6650 if ((sharedp->rsmsi_state == RSMSI_STATE_CONNECTED) &&
6651 (sharedp->rsmsi_node != my_nodeid)) {
6653 if (sharedp->rsmsi_refcnt == 1) {
6655 ASSERT(sharedp->rsmsi_mapcnt == 0);
6658 rsm_disconnect(sharedp->rsmsi_handle);
6669 sharedp->rsmsi_refcnt--;
6671 if (sharedp->rsmsi_refcnt == 0) {
6672 *cookie = (void *)sharedp->rsmsi_cookie;
6673 sharedp->rsmsi_state = RSMSI_STATE_DISCONNECTED;
6674 sharedp->rsmsi_handle = NULL;
6678 mutex_destroy(&sharedp->rsmsi_lock);
6679 cv_destroy(&sharedp->rsmsi_cv);
6680 kmem_free((void *)(sharedp), sizeof (rsm_import_share_t));
8565 rsm_import_share_t *sharedp;
8691 sharedp = seg->s_share;
8694 "rsm_segmap:RSMSI_STATE=%d\n", sharedp->rsmsi_state));
8696 if ((sharedp->rsmsi_state != RSMSI_STATE_CONNECTED) &&
8697 (sharedp->rsmsi_state != RSMSI_STATE_MAPPED)) {
8702 sharedp->rsmsi_state));
8727 ASSERT(sharedp->rsmsi_state == RSMSI_STATE_CONNECTED ||
8728 sharedp->rsmsi_state == RSMSI_STATE_MAPPED);
8730 if (sharedp->rsmsi_state == RSMSI_STATE_CONNECTED) {
8754 p->next = sharedp->rsmsi_mapinfo;
8755 sharedp->rsmsi_mapinfo = p;
8761 seg->s_mapinfo = sharedp->rsmsi_mapinfo;
8765 if (sharedp->rsmsi_mapinfo != NULL) {
8771 rsm_unmap(sharedp->rsmsi_handle);
8772 rsm_free_mapinfo(sharedp->
8775 sharedp->rsmsi_mapinfo = NULL;
8776 sharedp->rsmsi_state = RSMSI_STATE_CONNECTED;
8794 sharedp->rsmsi_state = RSMSI_STATE_MAPPED;
8797 seg->s_mapinfo = sharedp->rsmsi_mapinfo;
8800 sharedp->rsmsi_mapcnt++;
8819 ASSERT(sharedp->rsmsi_state == RSMSI_STATE_MAPPED);
8821 sharedp->rsmsi_mapcnt--;
8822 if (sharedp->rsmsi_mapcnt == 0) {
8824 ASSERT(sharedp->rsmsi_handle != NULL);
8826 rsm_unmap(sharedp->rsmsi_handle);
8827 rsm_free_mapinfo(sharedp->rsmsi_mapinfo);
8828 sharedp->rsmsi_mapinfo = NULL;
8829 sharedp->rsmsi_state = RSMSI_STATE_CONNECTED;
8902 ASSERT(sharedp->rsmsi_state == RSMSI_STATE_CONNECTED ||
8903 sharedp->rsmsi_state == RSMSI_STATE_MAPPED);
8905 sharedp->rsmsi_mapcnt++;
8906 sharedp->rsmsi_state = RSMSI_STATE_MAPPED;
8931 ASSERT(sharedp->rsmsi_state == RSMSI_STATE_MAPPED);
8933 sharedp->rsmsi_mapcnt--;
8934 if (sharedp->rsmsi_mapcnt == 0) {
8935 sharedp->rsmsi_mapinfo = NULL;
8936 sharedp->rsmsi_state = RSMSI_STATE_CONNECTED;