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/zfs_vfsops.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_vfsops.c
↓ open down ↓ 2235 lines elided ↑ open up ↑
2236 2236          if (newvers >= ZPL_VERSION_SA && !zfsvfs->z_use_sa) {
2237 2237                  uint64_t sa_obj;
2238 2238  
2239 2239                  ASSERT3U(spa_version(dmu_objset_spa(zfsvfs->z_os)), >=,
2240 2240                      SPA_VERSION_SA);
2241 2241                  sa_obj = zap_create(os, DMU_OT_SA_MASTER_NODE,
2242 2242                      DMU_OT_NONE, 0, tx);
2243 2243  
2244 2244                  error = zap_add(os, MASTER_NODE_OBJ,
2245 2245                      ZFS_SA_ATTRS, 8, 1, &sa_obj, tx);
2246      -                ASSERT3U(error, ==, 0);
     2246 +                ASSERT0(error);
2247 2247  
2248 2248                  VERIFY(0 == sa_set_sa_object(os, sa_obj));
2249 2249                  sa_register_update_callback(os, zfs_sa_upgrade);
2250 2250          }
2251 2251  
2252 2252          spa_history_log_internal_ds(dmu_objset_ds(os), "upgrade", tx,
2253 2253              "from %llu to %llu", zfsvfs->z_version, newvers);
2254 2254  
2255 2255          dmu_tx_commit(tx);
2256 2256  
↓ open down ↓ 61 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX