Skip to content

Commit

Permalink
zap_deref_leaf: enable recovery from invalid zap_magic
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrd committed May 7, 2013
1 parent 5165473 commit 920d03a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion module/zfs/zap.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,14 @@ zap_deref_leaf(zap_t *zap, uint64_t h, dmu_tx_t *tx, krw_t lt, zap_leaf_t **lp)

ASSERT(zap->zap_dbuf == NULL ||
zap->zap_f.zap_phys == zap->zap_dbuf->db_data);
ASSERT3U(zap->zap_f.zap_phys->zap_magic, ==, ZAP_MAGIC);
if (zap->zap_f.zap_phys->zap_magic != ZAP_MAGIC) {
zfs_panic_recover("zfs: "
"zap->zap_u.zap_fat.zap_phys->zap_magic == 0x2F52AB2ABULL "
"failed (%lu == %lu) for object %lu",
zap->zap_u.zap_fat.zap_phys->zap_magic, 0x2F52AB2ABULL
zap->zap_object);
return (EFAULT);
}
idx = ZAP_HASH_IDX(h, zap->zap_f.zap_phys->zap_ptrtbl.zt_shift);
err = zap_idx_to_blk(zap, idx, &blk);
if (err != 0)
Expand Down

0 comments on commit 920d03a

Please sign in to comment.