* that we rewind to is invalid. Thus, we return -1 so
* zil_parse() doesn't attempt to read it.
*/
- if (bp->blk_birth >= first_txg)
+ if (BP_GET_LOGICAL_BIRTH(bp) >= first_txg)
return (-1);
if (zil_bp_tree_add(zilog, bp) != 0)
* Claim log block if not already committed and not already claimed.
* If tx == NULL, just verify that the block is claimable.
*/
- if (BP_IS_HOLE(bp) || bp->blk_birth < first_txg ||
+ if (BP_IS_HOLE(bp) || BP_GET_LOGICAL_BIRTH(bp) < first_txg ||
zil_bp_tree_add(zilog, bp) != 0)
return (0);
* waited for all writes to be stable first), so it is semantically
* correct to declare this the end of the log.
*/
- if (lr->lr_blkptr.blk_birth >= first_txg) {
+ if (BP_GET_LOGICAL_BIRTH(&lr->lr_blkptr) >= first_txg) {
error = zil_read_log_data(zilog, lr, NULL);
if (error != 0)
return (error);
* just in case lets be safe and just stop here now instead of
* corrupting the pool.
*/
- if (BP_PHYSICAL_BIRTH(bp) >= first_txg)
+ if (BP_GET_BIRTH(bp) >= first_txg)
return (SET_ERROR(ENOENT));
/*
/*
* If we previously claimed it, we need to free it.
*/
- if (bp->blk_birth >= claim_txg && zil_bp_tree_add(zilog, bp) == 0 &&
- !BP_IS_HOLE(bp)) {
+ if (BP_GET_LOGICAL_BIRTH(bp) >= claim_txg &&
+ zil_bp_tree_add(zilog, bp) == 0 && !BP_IS_HOLE(bp)) {
zio_free(zilog->zl_spa, dmu_tx_get_txg(tx), bp);
}
&slog);
}
if (error == 0) {
- ASSERT3U(bp->blk_birth, ==, txg);
+ ASSERT3U(BP_GET_LOGICAL_BIRTH(bp), ==, txg);
BP_SET_CHECKSUM(bp, nlwb->lwb_slim ? ZIO_CHECKSUM_ZILOG2 :
ZIO_CHECKSUM_ZILOG);
bp->blk_cksum = lwb->lwb_blk.blk_cksum;