Lines Matching full:cbr

316 	dsl_prop_cb_record_t *cbr;  in dsl_prop_register()  local
326 cbr = kmem_alloc(sizeof (dsl_prop_cb_record_t), KM_SLEEP); in dsl_prop_register()
327 cbr->cbr_ds = ds; in dsl_prop_register()
328 cbr->cbr_func = callback; in dsl_prop_register()
329 cbr->cbr_arg = cbarg; in dsl_prop_register()
335 cbr->cbr_pr = pr; in dsl_prop_register()
336 list_insert_head(&pr->pr_cbs, cbr); in dsl_prop_register()
337 list_insert_head(&ds->ds_prop_cbs, cbr); in dsl_prop_register()
340 cbr->cbr_func(cbr->cbr_arg, value); in dsl_prop_register()
479 dsl_prop_cb_record_t *cbr; in dsl_prop_unregister() local
482 for (cbr = list_head(&ds->ds_prop_cbs); in dsl_prop_unregister()
483 cbr; cbr = list_next(&ds->ds_prop_cbs, cbr)) { in dsl_prop_unregister()
484 if (cbr->cbr_ds == ds && in dsl_prop_unregister()
485 cbr->cbr_func == callback && in dsl_prop_unregister()
486 cbr->cbr_arg == cbarg && in dsl_prop_unregister()
487 strcmp(cbr->cbr_pr->pr_propname, propname) == 0) in dsl_prop_unregister()
491 if (cbr == NULL) { in dsl_prop_unregister()
496 list_remove(&ds->ds_prop_cbs, cbr); in dsl_prop_unregister()
497 list_remove(&cbr->cbr_pr->pr_cbs, cbr); in dsl_prop_unregister()
499 kmem_free(cbr, sizeof (dsl_prop_cb_record_t)); in dsl_prop_unregister()
511 dsl_prop_cb_record_t *cbr, *next_cbr; in dsl_prop_unregister_all() local
518 cbr = next_cbr; in dsl_prop_unregister_all()
519 next_cbr = list_next(&ds->ds_prop_cbs, cbr); in dsl_prop_unregister_all()
520 if (cbr->cbr_arg == cbarg) { in dsl_prop_unregister_all()
521 list_remove(&ds->ds_prop_cbs, cbr); in dsl_prop_unregister_all()
522 list_remove(&cbr->cbr_pr->pr_cbs, cbr); in dsl_prop_unregister_all()
523 kmem_free(cbr, sizeof (dsl_prop_cb_record_t)); in dsl_prop_unregister_all()
541 dsl_prop_cb_record_t *cbr; in dsl_prop_notify_all_cb() local
546 for (cbr = list_head(&pr->pr_cbs); cbr; in dsl_prop_notify_all_cb()
547 cbr = list_next(&pr->pr_cbs, cbr)) { in dsl_prop_notify_all_cb()
572 if (ds != cbr->cbr_ds && in dsl_prop_notify_all_cb()
573 !dsl_dataset_try_add_ref(dp, cbr->cbr_ds, FTAG)) in dsl_prop_notify_all_cb()
576 if (dsl_prop_get_ds(cbr->cbr_ds, in dsl_prop_notify_all_cb()
577 cbr->cbr_pr->pr_propname, sizeof (value), 1, in dsl_prop_notify_all_cb()
579 cbr->cbr_func(cbr->cbr_arg, value); in dsl_prop_notify_all_cb()
581 if (ds != cbr->cbr_ds) in dsl_prop_notify_all_cb()
582 dsl_dataset_rele(cbr->cbr_ds, FTAG); in dsl_prop_notify_all_cb()
609 dsl_prop_cb_record_t *cbr; in dsl_prop_changed_notify() local
637 for (cbr = list_head(&pr->pr_cbs); cbr; in dsl_prop_changed_notify()
638 cbr = list_next(&pr->pr_cbs, cbr)) { in dsl_prop_changed_notify()
642 * cbr->cbr_ds may be invalidated due to eviction, in dsl_prop_changed_notify()
647 if (!dsl_dataset_try_add_ref(dp, cbr->cbr_ds, FTAG)) in dsl_prop_changed_notify()
650 propobj = dsl_dataset_phys(cbr->cbr_ds)->ds_props_obj; in dsl_prop_changed_notify()
658 cbr->cbr_func(cbr->cbr_arg, value); in dsl_prop_changed_notify()
660 dsl_dataset_rele(cbr->cbr_ds, FTAG); in dsl_prop_changed_notify()
862 dsl_prop_cb_record_t *cbr; in dsl_prop_set_sync_impl() local
869 for (cbr = list_head(&ds->ds_prop_cbs); cbr; in dsl_prop_set_sync_impl()
870 cbr = list_next(&ds->ds_prop_cbs, cbr)) { in dsl_prop_set_sync_impl()
871 if (strcmp(cbr->cbr_pr->pr_propname, in dsl_prop_set_sync_impl()
873 cbr->cbr_func(cbr->cbr_arg, intval); in dsl_prop_set_sync_impl()