* during spa_errlog_sync().
*/
void
-spa_log_error(spa_t *spa, const zbookmark_phys_t *zb, const uint64_t *birth)
+spa_log_error(spa_t *spa, const zbookmark_phys_t *zb, const uint64_t birth)
{
spa_error_entry_t search;
spa_error_entry_t *new;
new->se_zep.zb_object = zb->zb_object;
new->se_zep.zb_level = zb->zb_level;
new->se_zep.zb_blkid = zb->zb_blkid;
-
- /*
- * birth may end up being NULL, e.g. in zio_done(). We
- * will handle this in process_error_block().
- */
- if (birth != NULL)
- new->se_zep.zb_birth = *birth;
+ new->se_zep.zb_birth = birth;
}
avl_insert(tree, new, where);
if (error == 0 && BP_IS_HOLE(&bp))
error = SET_ERROR(ENOENT);
- *birth_txg = bp.blk_birth;
+ *birth_txg = BP_GET_LOGICAL_BIRTH(&bp);
rw_exit(&dn->dn_struct_rwlock);
dnode_rele(dn, FTAG);
return (error);
*/
zbookmark_phys_t zb;
zep_to_zb(head_ds, zep, &zb);
- spa_remove_error(spa, &zb, &zep->zb_birth);
+ spa_remove_error(spa, &zb, zep->zb_birth);
}
return (error);
*/
static void
spa_add_healed_error(spa_t *spa, uint64_t obj, zbookmark_phys_t *healed_zb,
- const uint64_t *birth)
+ const uint64_t birth)
{
char name[NAME_MAX_LEN];
healed_zep.zb_object = healed_zb->zb_object;
healed_zep.zb_level = healed_zb->zb_level;
healed_zep.zb_blkid = healed_zb->zb_blkid;
-
- if (birth != NULL)
- healed_zep.zb_birth = *birth;
- else
- healed_zep.zb_birth = 0;
+ healed_zep.zb_birth = birth;
errphys_to_name(&healed_zep, name, sizeof (name));
* later in spa_remove_healed_errors().
*/
void
-spa_remove_error(spa_t *spa, zbookmark_phys_t *zb, const uint64_t *birth)
+spa_remove_error(spa_t *spa, zbookmark_phys_t *zb, uint64_t birth)
{
spa_add_healed_error(spa, spa->spa_errlog_last, zb, birth);
spa_add_healed_error(spa, spa->spa_errlog_scrub, zb, birth);
if (error == EACCES)
error = 0;
else if (!error)
- zep.zb_birth = bp.blk_birth;
+ zep.zb_birth = BP_GET_LOGICAL_BIRTH(&bp);
rw_exit(&dn->dn_struct_rwlock);
dnode_rele(dn, FTAG);