Lines Matching defs:bt

277 	be_transaction_data_t	bt = { 0 };
297 BE_ATTR_ORIG_BE_NAME, DATA_TYPE_STRING, &bt.obe_name, NULL) != 0) {
304 if (bt.obe_name == NULL) {
305 if ((ret = be_find_current_be(&bt)) != BE_SUCCESS) {
310 if (!be_valid_be_name(bt.obe_name)) {
312 "invalid BE name %s\n"), bt.obe_name);
318 if (nvlist_lookup_string(be_attrs, BE_ATTR_SNAP_NAME, &bt.obe_snap_name)
326 if ((zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt)) == 0) {
328 "failed to find zpool for BE (%s)\n"), bt.obe_name);
338 be_make_root_ds(bt.obe_zpool, bt.obe_name, obe_root_ds,
340 bt.obe_root_ds = obe_root_ds;
343 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET)) == NULL) {
346 bt.obe_root_ds, libzfs_error_description(g_zfs));
355 if ((ret = be_rollback_check_callback(zhp, bt.obe_snap_name)) != 0) {
361 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET)) == NULL) {
364 bt.obe_root_ds, libzfs_error_description(g_zfs));
373 if ((ret = be_rollback_callback(zhp, bt.obe_snap_name)) != 0) {
376 "failed to rollback BE %s to %s\n"), bt.obe_name,
377 bt.obe_snap_name);
412 be_transaction_data_t bt = { 0 };
430 /* Set parameters in bt structure */
431 bt.obe_name = be_name;
432 bt.obe_snap_name = *snap_name;
433 bt.policy = policy;
436 if (bt.obe_name == NULL) {
437 if ((ret = be_find_current_be(&bt)) != BE_SUCCESS) {
444 if ((zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt))
447 "find zpool for BE (%s)\n"), bt.obe_name);
456 bt.obe_zpool = altpool;
459 be_make_root_ds(bt.obe_zpool, bt.obe_name, root_ds,
461 bt.obe_root_ds = root_ds;
469 if (!be_zone_is_bootable(bt.obe_root_ds)) {
477 if (bt.policy == NULL) {
478 bt.policy = be_default_policy();
481 if (!valid_be_policy(bt.policy)) {
483 "invalid BE policy type (%s)\n"), bt.policy);
492 if (bt.obe_snap_name == NULL) {
494 if ((bt.obe_snap_name = be_auto_snap_name())
504 (void) snprintf(ss, sizeof (ss), "%s@%s", bt.obe_root_ds,
505 bt.obe_snap_name);
508 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET))
512 bt.obe_root_ds, libzfs_error_description(g_zfs));
538 bt.policy) != 0) {
576 free(bt.obe_snap_name);
577 if ((bt.obe_snap_name =
588 bt.obe_root_ds, bt.obe_snap_name);
617 free(bt.obe_snap_name);
618 bt.obe_snap_name = NULL;
628 if (autoname && bt.obe_snap_name) {
629 *snap_name = bt.obe_snap_name;
656 be_transaction_data_t bt = { 0 };
669 /* Set parameters in bt structure */
670 bt.obe_name = be_name;
671 bt.obe_snap_name = snap_name;
674 if (bt.obe_name == NULL) {
675 if ((err = be_find_current_be(&bt)) != BE_SUCCESS) {
681 if ((ret = zpool_iter(g_zfs, be_find_zpool_callback, &bt)) == 0) {
683 "failed to find zpool for BE (%s)\n"), bt.obe_name);
692 be_make_root_ds(bt.obe_zpool, bt.obe_name, root_ds, sizeof (root_ds));
693 bt.obe_root_ds = root_ds;
700 if (!be_zone_is_bootable(bt.obe_root_ds)) {
707 zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET);
714 bt.obe_root_ds, libzfs_error_description(g_zfs));
720 (void) snprintf(ss, sizeof (ss), "%s@%s", bt.obe_name,
721 bt.obe_snap_name);
734 if (zfs_destroy_snaps(zhp, bt.obe_snap_name, B_FALSE) != 0) {