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

Reviewed by Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed by George Wilson <george.wilson@delphix.com>
Approved by Eric Schrock <eric.schrock@delphix.com>

References:
  illumos/illumos-gate@fb09f5aad4
  https://illumos.org/issues/3006

Requires:
  zfsonlinux/spl@1c6d149feb

Ported-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1509
This commit is contained in:
Madhav Suresh
2013-05-10 14:17:03 -07:00
committed by Brian Behlendorf
parent 9eaf0832ad
commit c99c90015e
32 changed files with 198 additions and 186 deletions
+3 -3
View File
@@ -373,7 +373,7 @@ dbuf_verify(dmu_buf_impl_t *db)
} else if (db->db_blkid == DMU_SPILL_BLKID) {
ASSERT(dn != NULL);
ASSERT3U(db->db.db_size, >=, dn->dn_bonuslen);
ASSERT3U(db->db.db_offset, ==, 0);
ASSERT0(db->db.db_offset);
} else {
ASSERT3U(db->db.db_offset, ==, db->db_blkid * db->db.db_size);
}
@@ -2433,7 +2433,7 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, dmu_tx_t *tx)
dbuf_dirty_record_t **drp;
ASSERT(*datap != NULL);
ASSERT3U(db->db_level, ==, 0);
ASSERT0(db->db_level);
ASSERT3U(dn->dn_phys->dn_bonuslen, <=, DN_MAX_BONUSLEN);
bcopy(*datap, DN_BONUS(dn->dn_phys), dn->dn_phys->dn_bonuslen);
DB_DNODE_EXIT(db);
@@ -2636,7 +2636,7 @@ dbuf_write_done(zio_t *zio, arc_buf_t *buf, void *vdb)
uint64_t txg = zio->io_txg;
dbuf_dirty_record_t **drp, *dr;
ASSERT3U(zio->io_error, ==, 0);
ASSERT0(zio->io_error);
ASSERT(db->db_blkptr == bp);
if (zio->io_flags & ZIO_FLAG_IO_REWRITE) {