Lines Matching refs:pd
214 prefetch_data_t *pd = td->td_pfd;
237 if (pd && !pd->pd_exited &&
238 ((pd->pd_flags & TRAVERSE_PREFETCH_DATA) ||
240 mutex_enter(&pd->pd_mtx);
241 ASSERT(pd->pd_blks_fetched >= 0);
242 while (pd->pd_blks_fetched == 0 && !pd->pd_exited)
243 cv_wait(&pd->pd_cv, &pd->pd_mtx);
244 pd->pd_blks_fetched--;
245 cv_broadcast(&pd->pd_cv);
246 mutex_exit(&pd->pd_mtx);
488 prefetch_data_t pd = { 0 };
508 td.td_pfd = &pd;
511 pd.pd_blks_max = zfs_pd_blks_max;
512 pd.pd_flags = flags;
513 mutex_init(&pd.pd_mtx, NULL, MUTEX_DEFAULT, NULL);
514 cv_init(&pd.pd_cv, NULL, CV_DEFAULT, NULL);
536 pd.pd_exited = B_TRUE;
542 mutex_enter(&pd.pd_mtx);
543 pd.pd_cancel = B_TRUE;
544 cv_broadcast(&pd.pd_cv);
545 while (!pd.pd_exited)
546 cv_wait(&pd.pd_cv, &pd.pd_mtx);
547 mutex_exit(&pd.pd_mtx);
549 mutex_destroy(&pd.pd_mtx);
550 cv_destroy(&pd.pd_cv);