Lines Matching defs:prov
306 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
324 if ((old_elem = dict_get(prov->pkc_elements, elem)) != NULL) {
330 if (dict_put(prov->pkc_elements, elem, elem) != NULL) {
350 if (eo->eo_item.ei_uint64 > prov->pkc_lotime) {
351 if (eo->eo_item.ei_uint64 > prov->pkc_ltime)
352 prov->pkc_ltime = eo->eo_item.ei_uint64;
386 elem->pke_ltime = prov->pkc_ltime;
403 if ((old_elem = dict_get(prov->pkc_elements, elem)) !=
410 if (dict_put(prov->pkc_elements, elem, elem) !=
443 if ((old_elem = dict_get(prov->pkc_elements, elem)) !=
450 if (dict_put(prov->pkc_elements, elem, elem) !=
476 if ((old_elem = dict_get(prov->pkc_elements, elem)) !=
484 if (dict_put(prov->pkc_elements, elem, elem) !=
638 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
640 if (close(prov->pkc_fd) < 0) {
645 * Rollback any pending changes before freeing the prov. This
654 pool_knl_connection_free(prov);
660 * the configuration map (prov->pkc_elements).
669 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
671 assert(dict_remove(prov->pkc_elements, pke) != NULL);
691 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
694 if (pke->pke_ltime < prov->pkc_ltime)
712 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
722 if (log_size(prov->pkc_log) != 0) {
733 if (ioctl(prov->pkc_fd, POOL_QUERY, &query) < 0) {
743 if (ioctl(prov->pkc_fd, POOL_QUERY, &query) < 0) {
764 prov->pkc_lotime = prov->pkc_ltime;
782 dict_map(prov->pkc_elements, find_dead_elems, dead_map);
810 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
816 if (ioctl(prov->pkc_fd, POOL_COMMIT, lock) < 0) {
825 if (prov->pkc_log->l_state == LS_FAIL) {
833 assert(ioctl(prov->pkc_fd, POOL_COMMIT, lock) >= 0);
839 if (log_walk(prov->pkc_log, log_item_commit) != PO_SUCCESS) {
846 assert(ioctl(prov->pkc_fd, POOL_COMMIT, lock) >= 0);
855 assert(ioctl(prov->pkc_fd, POOL_COMMIT, lock) >= 0);
859 (void) log_walk(prov->pkc_log, log_item_release);
860 log_empty(prov->pkc_log);
1204 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1206 prov->pkc_log->l_state = LS_RECOVER;
1207 if (log_reverse_walk(prov->pkc_log, log_item_undo) != PO_SUCCESS) {
1209 prov->pkc_log->l_state = LS_FAIL;
1213 prov->pkc_log->l_state = LS_DO;
1223 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1225 prov->pkc_log->l_state = LS_UNDO;
1226 if (log_reverse_walk(prov->pkc_log, log_item_undo) != PO_SUCCESS) {
1228 (void) log_walk(prov->pkc_log, log_item_release);
1229 log_empty(prov->pkc_log);
1230 prov->pkc_log->l_state = LS_FAIL;
1234 (void) log_walk(prov->pkc_log, log_item_release);
1235 log_empty(prov->pkc_log);
1236 prov->pkc_log->l_state = LS_DO;
1316 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1368 dict_map(prov->pkc_elements, build_result_set, &qo);
1431 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1444 if (ioctl(prov->pkc_fd, POOL_BINDQ, &bindq) < 0) {
1487 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1499 while ((ret = ioctl(prov->pkc_fd, POOL_BIND, &bind)) < 0 &&
1518 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1531 if (ioctl(prov->pkc_fd, POOL_BINDQ, &bindq) < 0) {
1680 pool_knl_connection_t *prov = (pool_knl_connection_t *)conf->pc_prov;
1736 if (dict_put(prov->pkc_elements, elem, elem) != NULL) {
1742 if (prov->pkc_log->l_state != LS_DO)
1776 if (log_append(prov->pkc_log, POOL_CREATE, (void *)create) !=
1791 pool_knl_connection_t *prov;
1794 prov = (pool_knl_connection_t *)(TO_CONF(pe))->pc_prov;
1796 if (dict_remove(prov->pkc_elements, pe) == NULL) {
1800 if (prov->pkc_log->l_state != LS_DO) {
1824 if (log_append(prov->pkc_log, POOL_DESTROY, (void *)destroy) !=
1865 pool_knl_connection_t *prov =
1868 if (prov->pkc_log->l_state != LS_DO) {
1921 if (log_append(prov->pkc_log, POOL_XTRANSFER, (void *)xtransfer) !=
1986 pool_knl_connection_t *prov;
2000 prov = (pool_knl_connection_t *)(TO_CONF(TO_ELEM(pool)))->pc_prov;
2002 if (prov->pkc_log->l_state != LS_DO) {
2021 if (log_append(prov->pkc_log, POOL_ASSOC, (void *)assoc) !=
2040 pool_knl_connection_t *prov;
2048 prov = (pool_knl_connection_t *)(TO_CONF(TO_ELEM(pool)))->pc_prov;
2050 if (prov->pkc_log->l_state != LS_DO) {
2068 if (log_append(prov->pkc_log, POOL_DISSOC, (void *)dissoc) !=
2094 pool_knl_connection_t *prov;
2096 if ((prov = malloc(sizeof (pool_knl_connection_t))) == NULL) {
2100 (void) memset(prov, 0, sizeof (pool_knl_connection_t));
2104 prov->pc_name = strdup("kernel");
2105 prov->pc_store_type = KERNEL_DATA_STORE;
2106 prov->pc_oflags = oflags;
2110 prov->pc_close = pool_knl_close;
2111 prov->pc_validate = pool_knl_validate;
2112 prov->pc_commit = pool_knl_commit;
2113 prov->pc_export = pool_knl_export;
2114 prov->pc_rollback = pool_knl_rollback;
2115 prov->pc_exec_query = pool_knl_exec_query;
2116 prov->pc_elem_create = pool_knl_elem_create;
2117 prov->pc_remove = pool_knl_remove;
2118 prov->pc_res_xfer = pool_knl_res_transfer;
2119 prov->pc_res_xxfer = pool_knl_res_xtransfer;
2120 prov->pc_get_binding = pool_knl_get_binding;
2121 prov->pc_set_binding = pool_knl_set_binding;
2122 prov->pc_get_resource_binding = pool_knl_get_resource_binding;
2126 conf->pc_prov = (pool_connection_t *)prov;
2136 if ((prov->pkc_fd = blocking_open(pool_dynamic_location(),
2138 free(prov);
2144 if ((prov->pkc_fd = open(pool_info_location, O_RDWR)) < 0) {
2145 free(prov);
2154 if ((prov->pkc_elements = dict_new((int (*)(const void *, const void *))
2156 (void) close(prov->pkc_fd);
2157 free(prov);
2163 if ((prov->pkc_leaks = dict_new(NULL, NULL)) == NULL) {
2164 dict_free(&prov->pkc_elements);
2165 (void) close(prov->pkc_fd);
2166 free(prov);
2175 if ((prov->pkc_log = log_alloc(conf)) == NULL) {
2177 dict_free(&prov->pkc_leaks);
2179 dict_free(&prov->pkc_elements);
2180 (void) close(prov->pkc_fd);
2181 free(prov);
2196 dict_free(&prov->pkc_leaks);
2198 dict_free(&prov->pkc_elements);
2199 (void) close(prov->pkc_fd);
2200 free(prov);
2269 pool_knl_connection_free(pool_knl_connection_t *prov)
2271 if (prov->pkc_log != NULL) {
2272 (void) log_walk(prov->pkc_log, log_item_release);
2273 log_free(prov->pkc_log);
2275 if (prov->pkc_elements != NULL) {
2276 dict_map(prov->pkc_elements, pool_knl_elem_free_cb, NULL);
2278 dprintf("dict length is %llu\n", dict_length(prov->pkc_leaks));
2279 dict_map(prov->pkc_leaks, pool_knl_elem_printf_cb,
2280 prov->pkc_elements);
2281 assert(dict_length(prov->pkc_leaks) == 0);
2282 dict_free(&prov->pkc_leaks);
2284 dict_free(&prov->pkc_elements);
2286 free((void *)prov->pc_name);
2287 free(prov);
2334 pool_knl_connection_t *prov;
2354 prov = (pool_knl_connection_t *)(TO_CONF(pe))->pc_prov;
2355 if (ioctl(prov->pkc_fd, POOL_PROPGET, &propget) < 0) {
2393 pool_knl_connection_t *prov =
2415 if (prov->pkc_log->l_state != LS_DO) {
2469 if (log_append(prov->pkc_log, POOL_PROPPUT, (void *)propput) !=
2488 pool_knl_connection_t *prov =
2505 if (prov->pkc_log->l_state != LS_DO) {
2530 if (log_append(prov->pkc_log, POOL_PROPRM, (void *)proprm) !=
2781 pool_knl_connection_t *prov =
2815 (void) dict_remove(prov->pkc_elements,
2818 if (ioctl(prov->pkc_fd, POOL_CREATE, &create->pcu_ioctl) < 0) {
2835 assert(dict_put(prov->pkc_elements, create->pcu_elem,
2859 (void) dict_remove(prov->pkc_elements,
2861 while ((ret = ioctl(prov->pkc_fd, POOL_DESTROY,
2881 while ((ret = ioctl(prov->pkc_fd, POOL_ASSOC,
2896 while ((ret = ioctl(prov->pkc_fd, POOL_DISSOC,
2934 ioctl(prov->pkc_fd, POOL_XTRANSFER,
2959 if (ioctl(prov->pkc_fd, POOL_PROPPUT,
2974 if (ioctl(prov->pkc_fd, POOL_PROPRM, &proprm->pru_ioctl) < 0) {
3003 pool_knl_connection_t *prov =
3030 (void) dict_remove(prov->pkc_elements, create->pcu_elem);
3043 assert(dict_put(prov->pkc_elements, destroy->pdu_elem,
3157 while ((ret = ioctl(prov->pkc_fd, POOL_DESTROY,
3172 if (ioctl(prov->pkc_fd, POOL_CREATE, &u_create) < 0) {
3189 if (dict_put(prov->pkc_elements, destroy->pdu_elem,
3224 if (ioctl(prov->pkc_fd, POOL_PROPPUT, &u_propput) < 0) {
3246 if (ioctl(prov->pkc_fd, POOL_ASSOC, &u_assoc) < 0) {
3260 while ((ret = ioctl(prov->pkc_fd, POOL_ASSOC, &u_assoc)) < 0 &&
3276 while ((ret = ioctl(prov->pkc_fd, POOL_ASSOC, &u_assoc)) < 0 &&
3299 if (ioctl(prov->pkc_fd, POOL_XTRANSFER, &u_xtransfer) < 0) {
3322 if (ioctl(prov->pkc_fd, POOL_PROPPUT,
3351 if (ioctl(prov->pkc_fd, POOL_PROPRM,
3392 if (ioctl(prov->pkc_fd, POOL_PROPPUT, &u_propput) < 0) {