ARGSUSED */
| 432 | |
| 433 | /* ARGSUSED */ |
| 434 | static int |
| 435 | zil_clear_log_block(zilog_t *zilog, const blkptr_t *bp, void *tx, |
| 436 | uint64_t first_txg) |
| 437 | { |
| 438 | ASSERT(!BP_IS_HOLE(bp)); |
| 439 | |
| 440 | /* |
| 441 | * As we call this function from the context of a rewind to a |
| 442 | * checkpoint, each ZIL block whose txg is later than the txg |
| 443 | * that we rewind to is invalid. Thus, we return -1 so |
| 444 | * zil_parse() doesn't attempt to read it. |
| 445 | */ |
| 446 | if (bp->blk_birth >= first_txg) |
| 447 | return (-1); |
| 448 | |
| 449 | if (zil_bp_tree_add(zilog, bp) != 0) |
| 450 | return (0); |
| 451 | |
| 452 | zio_free(zilog->zl_spa, first_txg, bp); |
| 453 | return (0); |
| 454 | } |
| 455 | |
| 456 | /* ARGSUSED */ |
| 457 | static int |
nothing calls this directly
no test coverage detected