Lines Matching refs:nsp

139 shadcons_entry_remove(shadow_conspiracy_t *scp, shadow_conspiracy_entry_t *nsp)
141 shadow_hash_remove(scp->sc_hash, nsp);
142 shadow_close(nsp->swe_shadow);
143 free(nsp->swe_source);
144 free(nsp->swe_dataset);
145 free(nsp);
178 shadow_conspiracy_entry_t *nsp, *start, *min;
214 (nsp = shadow_hash_lookup(scp->sc_hash, dataset)) == NULL ||
215 (nsp = shadow_hash_next(scp->sc_hash, nsp)) == NULL)
216 nsp = shadow_hash_first(scp->sc_hash);
223 if (nsp == NULL) {
241 start = nsp;
243 while (nsp->swe_next > now) {
244 if (mintime == 0 || nsp->swe_next < mintime) {
245 min = nsp;
246 mintime = nsp->swe_next;
249 nsp = shadow_hash_next(scp->sc_hash, nsp);
250 if (nsp == NULL)
251 nsp = shadow_hash_first(scp->sc_hash);
253 if (nsp == start)
265 if (nsp->swe_next > now) {
267 nsp = min;
268 ASSERT(nsp->swe_next > now);
270 ts.tv_sec = (nsp->swe_next - now) / NANOSEC;
271 ts.tv_nsec = (nsp->swe_next - now) % NANOSEC;
274 "waiting\n", tid, (nsp->swe_next - now) / 1000);
287 if (shadow_migrate_only_errors(nsp->swe_shadow))
288 nsp->swe_next = gethrtime() + scp->sc_throttle;
290 nsp->swe_next = 0;
295 (void) pthread_rwlock_rdlock(&nsp->swe_rwlock);
302 ret = shadow_migrate_one(nsp->swe_shadow);
309 (void) strlcpy(dataset, nsp->swe_dataset, sizeof (dataset));
310 (void) pthread_rwlock_unlock(&nsp->swe_rwlock);
357 if ((nsp = shadow_hash_lookup(scp->sc_hash,
359 shadow_migrate_finalize(nsp->swe_shadow) == 0) {
373 shadcons_entry_remove(scp, nsp);
590 shadcons_suspend(shadow_conspiracy_t *scp, shadow_conspiracy_entry_t *nsp)
597 (void) pthread_rwlock_wrlock(&nsp->swe_rwlock);
601 * If 'nsp' is NULL, then this is a request to resume after removing an entry.
606 shadcons_resume(shadow_conspiracy_t *scp, shadow_conspiracy_entry_t *nsp)
614 if (nsp != NULL)
615 (void) pthread_rwlock_unlock(&nsp->swe_rwlock);
631 const shadow_conspiracy_entry_t *nsp = arg;
633 return (nsp->swe_dataset);
804 shadow_conspiracy_entry_t *nsp;
808 if ((nsp = shadow_hash_lookup(scp->sc_hash, dataset)) == NULL) {
813 shadcons_suspend(scp, nsp);
816 if (docancel && shadow_cancel(nsp->swe_shadow) != 0) {
818 shadcons_resume(scp, nsp);
824 nsp->swe_dataset);
826 shadcons_entry_remove(scp, nsp);
956 shadow_conspiracy_entry_t *nsp;
961 if ((nsp = shadow_hash_lookup(scp->sc_hash, dataset)) == NULL) {
966 shadow_get_status(nsp->swe_shadow, &stat);
967 statp->scs_complete = shadow_migrate_only_errors(nsp->swe_shadow);
1000 shadow_conspiracy_entry_t *nsp;
1023 nsp = shadow_hash_first(scp->sc_hash);
1024 while (nsp != NULL) {
1025 shadow_get_status(nsp->swe_shadow, &stat);
1029 shadow_strdup(scp->sc_hash->sh_convert(nsp));
1050 shadow_migrate_only_errors(nsp->swe_shadow);
1051 nsp = shadow_hash_next(scp->sc_hash, nsp);
1107 shadow_conspiracy_entry_t *nsp;
1117 while ((nsp = shadow_hash_first(scp->sc_hash)) != NULL) {
1118 shadcons_entry_remove(scp, nsp);