Print this page
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_dataset.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_dataset.c
↓ open down ↓ 823 lines elided ↑ open up ↑
 824  824                  dsphys->ds_compressed_bytes =
 825  825                      origin->ds_phys->ds_compressed_bytes;
 826  826                  dsphys->ds_uncompressed_bytes =
 827  827                      origin->ds_phys->ds_uncompressed_bytes;
 828  828                  dsphys->ds_bp = origin->ds_phys->ds_bp;
 829  829                  dsphys->ds_flags |= origin->ds_phys->ds_flags;
 830  830  
 831  831                  dmu_buf_will_dirty(origin->ds_dbuf, tx);
 832  832                  origin->ds_phys->ds_num_children++;
 833  833  
 834      -                VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
      834 +                VERIFY0(dsl_dataset_hold_obj(dp,
 835  835                      origin->ds_dir->dd_phys->dd_head_dataset_obj, FTAG, &ohds));
 836  836                  dsphys->ds_deadlist_obj = dsl_deadlist_clone(&ohds->ds_deadlist,
 837  837                      dsphys->ds_prev_snap_txg, dsphys->ds_prev_snap_obj, tx);
 838  838                  dsl_dataset_rele(ohds, FTAG);
 839  839  
 840  840                  if (spa_version(dp->dp_spa) >= SPA_VERSION_NEXT_CLONES) {
 841  841                          if (origin->ds_phys->ds_next_clones_obj == 0) {
 842  842                                  origin->ds_phys->ds_next_clones_obj =
 843  843                                      zap_create(mos,
 844  844                                      DMU_OT_NEXT_CLONES, DMU_OT_NONE, 0, tx);
↓ open down ↓ 5 lines elided ↑ open up ↑
 850  850  
 851  851                  dmu_buf_will_dirty(dd->dd_dbuf, tx);
 852  852                  dd->dd_phys->dd_origin_obj = origin->ds_object;
 853  853                  if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) {
 854  854                          if (origin->ds_dir->dd_phys->dd_clones == 0) {
 855  855                                  dmu_buf_will_dirty(origin->ds_dir->dd_dbuf, tx);
 856  856                                  origin->ds_dir->dd_phys->dd_clones =
 857  857                                      zap_create(mos,
 858  858                                      DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx);
 859  859                          }
 860      -                        VERIFY3U(0, ==, zap_add_int(mos,
      860 +                        VERIFY0(zap_add_int(mos,
 861  861                              origin->ds_dir->dd_phys->dd_clones, dsobj, tx));
 862  862                  }
 863  863          }
 864  864  
 865  865          if (spa_version(dp->dp_spa) >= SPA_VERSION_UNIQUE_ACCURATE)
 866  866                  dsphys->ds_flags |= DS_FLAG_UNIQUE_ACCURATE;
 867  867  
 868  868          dmu_buf_rele(dbuf, FTAG);
 869  869  
 870  870          dmu_buf_will_dirty(dd->dd_dbuf, tx);
↓ open down ↓ 22 lines elided ↑ open up ↑
 893  893          dsl_dir_close(dd, FTAG);
 894  894  
 895  895          /*
 896  896           * If we are creating a clone, make sure we zero out any stale
 897  897           * data from the origin snapshots zil header.
 898  898           */
 899  899          if (origin != NULL) {
 900  900                  dsl_dataset_t *ds;
 901  901                  objset_t *os;
 902  902  
 903      -                VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
 904      -                VERIFY3U(0, ==, dmu_objset_from_ds(ds, &os));
      903 +                VERIFY0(dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
      904 +                VERIFY0(dmu_objset_from_ds(ds, &os));
 905  905                  bzero(&os->os_zil_header, sizeof (os->os_zil_header));
 906  906                  dsl_dataset_dirty(ds, tx);
 907  907                  dsl_dataset_rele(ds, FTAG);
 908  908          }
 909  909  
 910  910          return (dsobj);
 911  911  }
 912  912  
 913  913  /*
 914  914   * The snapshots must all be in the same pool.
↓ open down ↓ 582 lines elided ↑ open up ↑
1497 1497           * The err should not be ENOENT, but a bug in a previous version
1498 1498           * of the code could cause upgrade_clones_cb() to not set
1499 1499           * ds_next_snap_obj when it should, leading to a missing entry.
1500 1500           * If we knew that the pool was created after
1501 1501           * SPA_VERSION_NEXT_CLONES, we could assert that it isn't
1502 1502           * ENOENT.  However, at least we can check that we don't have
1503 1503           * too many entries in the next_clones_obj even after failing to
1504 1504           * remove this one.
1505 1505           */
1506 1506          if (err != ENOENT) {
1507      -                VERIFY3U(err, ==, 0);
     1507 +                VERIFY0(err);
1508 1508          }
1509      -        ASSERT3U(0, ==, zap_count(mos, ds->ds_phys->ds_next_clones_obj,
1510      -            &count));
     1509 +        ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj, &count));
1511 1510          ASSERT3U(count, <=, ds->ds_phys->ds_num_children - 2);
1512 1511  }
1513 1512  
1514 1513  static void
1515 1514  dsl_dataset_remove_clones_key(dsl_dataset_t *ds, uint64_t mintxg, dmu_tx_t *tx)
1516 1515  {
1517 1516          objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset;
1518 1517          zap_cursor_t zc;
1519 1518          zap_attribute_t za;
1520 1519  
↓ open down ↓ 3 lines elided ↑ open up ↑
1524 1523           * doesn't matter.
1525 1524           */
1526 1525          if (ds->ds_dir->dd_phys->dd_clones == 0)
1527 1526                  return;
1528 1527  
1529 1528          for (zap_cursor_init(&zc, mos, ds->ds_dir->dd_phys->dd_clones);
1530 1529              zap_cursor_retrieve(&zc, &za) == 0;
1531 1530              zap_cursor_advance(&zc)) {
1532 1531                  dsl_dataset_t *clone;
1533 1532  
1534      -                VERIFY3U(0, ==, dsl_dataset_hold_obj(ds->ds_dir->dd_pool,
     1533 +                VERIFY0(dsl_dataset_hold_obj(ds->ds_dir->dd_pool,
1535 1534                      za.za_first_integer, FTAG, &clone));
1536 1535                  if (clone->ds_dir->dd_origin_txg > mintxg) {
1537 1536                          dsl_deadlist_remove_key(&clone->ds_deadlist,
1538 1537                              mintxg, tx);
1539 1538                          dsl_dataset_remove_clones_key(clone, mintxg, tx);
1540 1539                  }
1541 1540                  dsl_dataset_rele(clone, FTAG);
1542 1541          }
1543 1542          zap_cursor_fini(&zc);
1544 1543  }
↓ open down ↓ 37 lines elided ↑ open up ↑
1582 1581          dsl_pool_t *dp = ds->ds_dir->dd_pool;
1583 1582          objset_t *mos = dp->dp_meta_objset;
1584 1583  
1585 1584          ASSERT(ds->ds_deadlist.dl_oldfmt);
1586 1585          ASSERT(ds_next->ds_deadlist.dl_oldfmt);
1587 1586  
1588 1587          poa.ds = ds;
1589 1588          poa.ds_prev = ds_prev;
1590 1589          poa.after_branch_point = after_branch_point;
1591 1590          poa.pio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
1592      -        VERIFY3U(0, ==, bpobj_iterate(&ds_next->ds_deadlist.dl_bpobj,
     1591 +        VERIFY0(bpobj_iterate(&ds_next->ds_deadlist.dl_bpobj,
1593 1592              process_old_cb, &poa, tx));
1594      -        VERIFY3U(zio_wait(poa.pio), ==, 0);
     1593 +        VERIFY0(zio_wait(poa.pio));
1595 1594          ASSERT3U(poa.used, ==, ds->ds_phys->ds_unique_bytes);
1596 1595  
1597 1596          /* change snapused */
1598 1597          dsl_dir_diduse_space(ds->ds_dir, DD_USED_SNAP,
1599 1598              -poa.used, -poa.comp, -poa.uncomp, tx);
1600 1599  
1601 1600          /* swap next's deadlist to our deadlist */
1602 1601          dsl_deadlist_close(&ds->ds_deadlist);
1603 1602          dsl_deadlist_close(&ds_next->ds_deadlist);
1604 1603          SWITCH64(ds_next->ds_phys->ds_deadlist_obj,
↓ open down ↓ 14 lines elided ↑ open up ↑
1619 1618           * the previous snapshot, if we are a clone)
1620 1619           *
1621 1620           * NB: this should be very quick, because we already
1622 1621           * freed all the objects in open context.
1623 1622           */
1624 1623          ka.ds = ds;
1625 1624          ka.tx = tx;
1626 1625          err = traverse_dataset(ds,
1627 1626              ds->ds_phys->ds_prev_snap_txg, TRAVERSE_POST,
1628 1627              kill_blkptr, &ka);
1629      -        ASSERT3U(err, ==, 0);
     1628 +        ASSERT0(err);
1630 1629          ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) || ds->ds_phys->ds_unique_bytes == 0);
1631 1630  
1632 1631          return (err);
1633 1632  }
1634 1633  
1635 1634  void
1636 1635  dsl_dataset_destroy_sync(void *arg1, void *tag, dmu_tx_t *tx)
1637 1636  {
1638 1637          struct dsl_ds_destroyarg *dsda = arg1;
1639 1638          dsl_dataset_t *ds = dsda->ds;
↓ open down ↓ 35 lines elided ↑ open up ↑
1675 1674          if (ds->ds_reserved != 0) {
1676 1675                  dsl_prop_setarg_t psa;
1677 1676                  uint64_t value = 0;
1678 1677  
1679 1678                  dsl_prop_setarg_init_uint64(&psa, "refreservation",
1680 1679                      (ZPROP_SRC_NONE | ZPROP_SRC_LOCAL | ZPROP_SRC_RECEIVED),
1681 1680                      &value);
1682 1681                  psa.psa_effective_value = 0;    /* predict default value */
1683 1682  
1684 1683                  dsl_dataset_set_reservation_sync(ds, &psa, tx);
1685      -                ASSERT3U(ds->ds_reserved, ==, 0);
     1684 +                ASSERT0(ds->ds_reserved);
1686 1685          }
1687 1686  
1688 1687          ASSERT(RW_WRITE_HELD(&dp->dp_config_rwlock));
1689 1688  
1690 1689          dsl_scan_ds_destroyed(ds, tx);
1691 1690  
1692 1691          obj = ds->ds_object;
1693 1692  
1694 1693          if (ds->ds_phys->ds_prev_snap_obj != 0) {
1695 1694                  if (ds->ds_prev) {
↓ open down ↓ 116 lines elided ↑ open up ↑
1812 1811                          dsl_deadlist_space_range(&ds_nextnext->ds_deadlist,
1813 1812                              ds->ds_phys->ds_prev_snap_txg,
1814 1813                              ds->ds_phys->ds_creation_txg,
1815 1814                              &used, &comp, &uncomp);
1816 1815                          ds_next->ds_phys->ds_unique_bytes += used;
1817 1816                          dsl_dataset_rele(ds_nextnext, FTAG);
1818 1817                          ASSERT3P(ds_next->ds_prev, ==, NULL);
1819 1818  
1820 1819                          /* Collapse range in this head. */
1821 1820                          dsl_dataset_t *hds;
1822      -                        VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
     1821 +                        VERIFY0(dsl_dataset_hold_obj(dp,
1823 1822                              ds->ds_dir->dd_phys->dd_head_dataset_obj,
1824 1823                              FTAG, &hds));
1825 1824                          dsl_deadlist_remove_key(&hds->ds_deadlist,
1826 1825                              ds->ds_phys->ds_creation_txg, tx);
1827 1826                          dsl_dataset_rele(hds, FTAG);
1828 1827  
1829 1828                  } else {
1830 1829                          ASSERT3P(ds_next->ds_prev, ==, ds);
1831 1830                          dsl_dataset_drop_ref(ds_next->ds_prev, ds_next);
1832 1831                          ds_next->ds_prev = NULL;
↓ open down ↓ 68 lines elided ↑ open up ↑
1901 1900                              &ds->ds_phys->ds_bp, ds->ds_phys->ds_prev_snap_txg,
1902 1901                              used, comp, uncomp, tx);
1903 1902                          dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD,
1904 1903                              -used, -comp, -uncomp, tx);
1905 1904                          dsl_dir_diduse_space(dp->dp_free_dir, DD_USED_HEAD,
1906 1905                              used, comp, uncomp, tx);
1907 1906                  }
1908 1907  
1909 1908                  if (ds->ds_prev != NULL) {
1910 1909                          if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) {
1911      -                                VERIFY3U(0, ==, zap_remove_int(mos,
     1910 +                                VERIFY0(zap_remove_int(mos,
1912 1911                                      ds->ds_prev->ds_dir->dd_phys->dd_clones,
1913 1912                                      ds->ds_object, tx));
1914 1913                          }
1915 1914                          dsl_dataset_rele(ds->ds_prev, ds);
1916 1915                          ds->ds_prev = ds_prev = NULL;
1917 1916                  }
1918 1917          }
1919 1918  
1920 1919          /*
1921 1920           * This must be done after the dsl_traverse(), because it will
↓ open down ↓ 17 lines elided ↑ open up ↑
1939 1938                  ASSERT(ds->ds_phys->ds_snapnames_zapobj == 0);
1940 1939                  VERIFY(0 == dsl_dataset_hold_obj(dp,
1941 1940                      ds->ds_dir->dd_phys->dd_head_dataset_obj, FTAG, &ds_head));
1942 1941                  VERIFY(0 == dsl_dataset_get_snapname(ds));
1943 1942  #ifdef ZFS_DEBUG
1944 1943                  {
1945 1944                          uint64_t val;
1946 1945  
1947 1946                          err = dsl_dataset_snap_lookup(ds_head,
1948 1947                              ds->ds_snapname, &val);
1949      -                        ASSERT3U(err, ==, 0);
     1948 +                        ASSERT0(err);
1950 1949                          ASSERT3U(val, ==, obj);
1951 1950                  }
1952 1951  #endif
1953 1952                  err = dsl_dataset_snap_remove(ds_head, ds->ds_snapname, tx);
1954 1953                  ASSERT(err == 0);
1955 1954                  dsl_dataset_rele(ds_head, FTAG);
1956 1955          }
1957 1956  
1958 1957          if (ds_prev && ds->ds_prev != ds_prev)
1959 1958                  dsl_dataset_rele(ds_prev, FTAG);
↓ open down ↓ 146 lines elided ↑ open up ↑
2106 2105                      ds->ds_object ||
2107 2106                      ds->ds_prev->ds_phys->ds_num_children > 1);
2108 2107                  if (ds->ds_prev->ds_phys->ds_next_snap_obj == ds->ds_object) {
2109 2108                          dmu_buf_will_dirty(ds->ds_prev->ds_dbuf, tx);
2110 2109                          ASSERT3U(ds->ds_phys->ds_prev_snap_txg, ==,
2111 2110                              ds->ds_prev->ds_phys->ds_creation_txg);
2112 2111                          ds->ds_prev->ds_phys->ds_next_snap_obj = dsobj;
2113 2112                  } else if (next_clones_obj != 0) {
2114 2113                          remove_from_next_clones(ds->ds_prev,
2115 2114                              dsphys->ds_next_snap_obj, tx);
2116      -                        VERIFY3U(0, ==, zap_add_int(mos,
     2115 +                        VERIFY0(zap_add_int(mos,
2117 2116                              next_clones_obj, dsobj, tx));
2118 2117                  }
2119 2118          }
2120 2119  
2121 2120          /*
2122 2121           * If we have a reference-reservation on this dataset, we will
2123 2122           * need to increase the amount of refreservation being charged
2124 2123           * since our unique space is going to zero.
2125 2124           */
2126 2125          if (ds->ds_reserved) {
↓ open down ↓ 69 lines elided ↑ open up ↑
2196 2195          rw_enter(&ds->ds_dir->dd_pool->dp_config_rwlock, RW_READER);
2197 2196          VERIFY(nvlist_alloc(&propval, NV_UNIQUE_NAME, KM_SLEEP) == 0);
2198 2197          VERIFY(nvlist_alloc(&val, NV_UNIQUE_NAME, KM_SLEEP) == 0);
2199 2198  
2200 2199          /*
2201 2200           * There may me missing entries in ds_next_clones_obj
2202 2201           * due to a bug in a previous version of the code.
2203 2202           * Only trust it if it has the right number of entries.
2204 2203           */
2205 2204          if (ds->ds_phys->ds_next_clones_obj != 0) {
2206      -                ASSERT3U(0, ==, zap_count(mos, ds->ds_phys->ds_next_clones_obj,
     2205 +                ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj,
2207 2206                      &count));
2208 2207          }
2209 2208          if (count != ds->ds_phys->ds_num_children - 1) {
2210 2209                  goto fail;
2211 2210          }
2212 2211          for (zap_cursor_init(&zc, mos, ds->ds_phys->ds_next_clones_obj);
2213 2212              zap_cursor_retrieve(&zc, &za) == 0;
2214 2213              zap_cursor_advance(&zc)) {
2215 2214                  dsl_dataset_t *clone;
2216 2215                  char buf[ZFS_MAXNAMELEN];
↓ open down ↓ 218 lines elided ↑ open up ↑
2435 2434          dsl_dataset_t *hds;
2436 2435          int err;
2437 2436  
2438 2437          ASSERT(ds->ds_phys->ds_next_snap_obj != 0);
2439 2438  
2440 2439          VERIFY(0 == dsl_dataset_hold_obj(dd->dd_pool,
2441 2440              dd->dd_phys->dd_head_dataset_obj, FTAG, &hds));
2442 2441  
2443 2442          VERIFY(0 == dsl_dataset_get_snapname(ds));
2444 2443          err = dsl_dataset_snap_remove(hds, ds->ds_snapname, tx);
2445      -        ASSERT3U(err, ==, 0);
     2444 +        ASSERT0(err);
2446 2445          mutex_enter(&ds->ds_lock);
2447 2446          (void) strcpy(ds->ds_snapname, newsnapname);
2448 2447          mutex_exit(&ds->ds_lock);
2449 2448          err = zap_add(mos, hds->ds_phys->ds_snapnames_zapobj,
2450 2449              ds->ds_snapname, 8, 1, &ds->ds_object, tx);
2451      -        ASSERT3U(err, ==, 0);
     2450 +        ASSERT0(err);
2452 2451  
2453 2452          spa_history_log_internal_ds(ds, "rename", tx,
2454 2453              "-> @%s", newsnapname);
2455 2454          dsl_dataset_rele(hds, FTAG);
2456 2455  }
2457 2456  
2458 2457  struct renamesnaparg {
2459 2458          dsl_sync_task_group_t *dstg;
2460 2459          char failed[MAXPATHLEN];
2461 2460          char *oldsnap;
↓ open down ↓ 337 lines elided ↑ open up ↑
2799 2798          /* change origin's next snap */
2800 2799          dmu_buf_will_dirty(origin_ds->ds_dbuf, tx);
2801 2800          oldnext_obj = origin_ds->ds_phys->ds_next_snap_obj;
2802 2801          snap = list_tail(&pa->clone_snaps);
2803 2802          ASSERT3U(snap->ds->ds_phys->ds_prev_snap_obj, ==, origin_ds->ds_object);
2804 2803          origin_ds->ds_phys->ds_next_snap_obj = snap->ds->ds_object;
2805 2804  
2806 2805          /* change the origin's next clone */
2807 2806          if (origin_ds->ds_phys->ds_next_clones_obj) {
2808 2807                  remove_from_next_clones(origin_ds, snap->ds->ds_object, tx);
2809      -                VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
     2808 +                VERIFY0(zap_add_int(dp->dp_meta_objset,
2810 2809                      origin_ds->ds_phys->ds_next_clones_obj,
2811 2810                      oldnext_obj, tx));
2812 2811          }
2813 2812  
2814 2813          /* change origin */
2815 2814          dmu_buf_will_dirty(dd->dd_dbuf, tx);
2816 2815          ASSERT3U(dd->dd_phys->dd_origin_obj, ==, origin_ds->ds_object);
2817 2816          dd->dd_phys->dd_origin_obj = odd->dd_phys->dd_origin_obj;
2818 2817          dd->dd_origin_txg = origin_head->ds_dir->dd_origin_txg;
2819 2818          dmu_buf_will_dirty(odd->dd_dbuf, tx);
2820 2819          odd->dd_phys->dd_origin_obj = origin_ds->ds_object;
2821 2820          origin_head->ds_dir->dd_origin_txg =
2822 2821              origin_ds->ds_phys->ds_creation_txg;
2823 2822  
2824 2823          /* change dd_clone entries */
2825 2824          if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) {
2826      -                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
     2825 +                VERIFY0(zap_remove_int(dp->dp_meta_objset,
2827 2826                      odd->dd_phys->dd_clones, hds->ds_object, tx));
2828      -                VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
     2827 +                VERIFY0(zap_add_int(dp->dp_meta_objset,
2829 2828                      pa->origin_origin->ds_dir->dd_phys->dd_clones,
2830 2829                      hds->ds_object, tx));
2831 2830  
2832      -                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
     2831 +                VERIFY0(zap_remove_int(dp->dp_meta_objset,
2833 2832                      pa->origin_origin->ds_dir->dd_phys->dd_clones,
2834 2833                      origin_head->ds_object, tx));
2835 2834                  if (dd->dd_phys->dd_clones == 0) {
2836 2835                          dd->dd_phys->dd_clones = zap_create(dp->dp_meta_objset,
2837 2836                              DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx);
2838 2837                  }
2839      -                VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
     2838 +                VERIFY0(zap_add_int(dp->dp_meta_objset,
2840 2839                      dd->dd_phys->dd_clones, origin_head->ds_object, tx));
2841 2840  
2842 2841          }
2843 2842  
2844 2843          /* move snapshots to this dir */
2845 2844          for (snap = list_head(&pa->shared_snaps); snap;
2846 2845              snap = list_next(&pa->shared_snaps, snap)) {
2847 2846                  dsl_dataset_t *ds = snap->ds;
2848 2847  
2849 2848                  /* unregister props as dsl_dir is changing */
↓ open down ↓ 32 lines elided ↑ open up ↑
2882 2881                                  uint64_t o;
2883 2882  
2884 2883                                  if (za.za_first_integer == oldnext_obj) {
2885 2884                                          /*
2886 2885                                           * We've already moved the
2887 2886                                           * origin's reference.
2888 2887                                           */
2889 2888                                          continue;
2890 2889                                  }
2891 2890  
2892      -                                VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
     2891 +                                VERIFY0(dsl_dataset_hold_obj(dp,
2893 2892                                      za.za_first_integer, FTAG, &cnds));
2894 2893                                  o = cnds->ds_dir->dd_phys->dd_head_dataset_obj;
2895 2894  
2896 2895                                  VERIFY3U(zap_remove_int(dp->dp_meta_objset,
2897 2896                                      odd->dd_phys->dd_clones, o, tx), ==, 0);
2898 2897                                  VERIFY3U(zap_add_int(dp->dp_meta_objset,
2899 2898                                      dd->dd_phys->dd_clones, o, tx), ==, 0);
2900 2899                                  dsl_dataset_rele(cnds, FTAG);
2901 2900                          }
2902 2901                          zap_cursor_fini(&zc);
2903 2902                  }
2904 2903  
2905      -                ASSERT3U(dsl_prop_numcb(ds), ==, 0);
     2904 +                ASSERT0(dsl_prop_numcb(ds));
2906 2905          }
2907 2906  
2908 2907          /*
2909 2908           * Change space accounting.
2910 2909           * Note, pa->*usedsnap and dd_used_breakdown[SNAP] will either
2911 2910           * both be valid, or both be 0 (resulting in delta == 0).  This
2912 2911           * is true for each of {clone,origin} independently.
2913 2912           */
2914 2913  
2915 2914          delta = pa->cloneusedsnap -
↓ open down ↓ 684 lines elided ↑ open up ↑
3600 3599  void
3601 3600  dsl_register_onexit_hold_cleanup(dsl_dataset_t *ds, const char *htag,
3602 3601      minor_t minor)
3603 3602  {
3604 3603          zfs_hold_cleanup_arg_t *ca;
3605 3604  
3606 3605          ca = kmem_alloc(sizeof (zfs_hold_cleanup_arg_t), KM_SLEEP);
3607 3606          ca->dp = ds->ds_dir->dd_pool;
3608 3607          ca->dsobj = ds->ds_object;
3609 3608          (void) strlcpy(ca->htag, htag, sizeof (ca->htag));
3610      -        VERIFY3U(0, ==, zfs_onexit_add_cb(minor,
     3609 +        VERIFY0(zfs_onexit_add_cb(minor,
3611 3610              dsl_dataset_user_release_onexit, ca, NULL));
3612 3611  }
3613 3612  
3614 3613  /*
3615 3614   * If you add new checks here, you may need to add
3616 3615   * additional checks to the "temporary" case in
3617 3616   * snapshot_check() in dmu_objset.c.
3618 3617   */
3619 3618  static int
3620 3619  dsl_dataset_user_hold_check(void *arg1, void *arg2, dmu_tx_t *tx)
↓ open down ↓ 683 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX