Print this page
XXXX introduce drv_sectohz


1024                                 ASSERT(nargs_head == NULL);
1025                                 nargs_head = next;
1026                                 esi_first = esi;
1027                                 (void) strlcpy(hostlist,
1028                                     esi_first->esi_hostname, MAXPATHLEN);
1029                         } else {
1030                                 ASSERT(nargs_head != NULL);
1031                                 nargs->nfs_ext_u.nfs_extB.next = next;
1032                                 (void) strlcat(hostlist, ",", MAXPATHLEN);
1033                                 (void) strlcat(hostlist, esi->esi_hostname,
1034                                     MAXPATHLEN);
1035                                 /* esi was only needed for hostname & nargs */
1036                                 nfs4_trigger_esi_destroy(esi, vp);
1037                         }
1038 
1039                         nargs = next;
1040                 }
1041 
1042                 /* if we've had no response at all, wait a second */
1043                 if (esi_first == NULL)
1044                         delay(drv_usectohz(1000000));
1045 
1046         } while (esi_first == NULL);
1047         ASSERT(nargs_head != NULL);
1048 
1049         dma = kmem_zalloc(sizeof (domount_args_t), KM_SLEEP);
1050         dma->dma_esi = esi_first;
1051         dma->dma_hostlist = hostlist;
1052         dma->dma_nargs = nargs_head;
1053         *dmap = dma;
1054 
1055         return (0);
1056 }
1057 
1058 static void
1059 nfs4_trigger_domount_args_destroy(domount_args_t *dma, vnode_t *vp)
1060 {
1061         if (dma != NULL) {
1062                 if (dma->dma_esi != NULL && vp != NULL)
1063                         nfs4_trigger_esi_destroy(dma->dma_esi, vp);
1064 




1024                                 ASSERT(nargs_head == NULL);
1025                                 nargs_head = next;
1026                                 esi_first = esi;
1027                                 (void) strlcpy(hostlist,
1028                                     esi_first->esi_hostname, MAXPATHLEN);
1029                         } else {
1030                                 ASSERT(nargs_head != NULL);
1031                                 nargs->nfs_ext_u.nfs_extB.next = next;
1032                                 (void) strlcat(hostlist, ",", MAXPATHLEN);
1033                                 (void) strlcat(hostlist, esi->esi_hostname,
1034                                     MAXPATHLEN);
1035                                 /* esi was only needed for hostname & nargs */
1036                                 nfs4_trigger_esi_destroy(esi, vp);
1037                         }
1038 
1039                         nargs = next;
1040                 }
1041 
1042                 /* if we've had no response at all, wait a second */
1043                 if (esi_first == NULL)
1044                         delay(drv_sectohz(1));
1045 
1046         } while (esi_first == NULL);
1047         ASSERT(nargs_head != NULL);
1048 
1049         dma = kmem_zalloc(sizeof (domount_args_t), KM_SLEEP);
1050         dma->dma_esi = esi_first;
1051         dma->dma_hostlist = hostlist;
1052         dma->dma_nargs = nargs_head;
1053         *dmap = dma;
1054 
1055         return (0);
1056 }
1057 
1058 static void
1059 nfs4_trigger_domount_args_destroy(domount_args_t *dma, vnode_t *vp)
1060 {
1061         if (dma != NULL) {
1062                 if (dma->dma_esi != NULL && vp != NULL)
1063                         nfs4_trigger_esi_destroy(dma->dma_esi, vp);
1064