HomeFreeBSD

ZIL: Do not clone blocks from the future

Description

ZIL: Do not clone blocks from the future

ZIL claim can not handle block pointers cloned from the future,
since they are not yet allocated at that point. It may happen
either if the block was just written when it was cloned, or if
the pool was frozen or somehow else rewound on import.

Handle it from two sides: prevent cloning of blocks with physical
birth time from not yet synced or frozen TXG, and abort ZIL claim
if we still detect such blocks due to rewind or something else.

While there, assert that any cloned blocks we claim are really
allocated by calling metaslab_check_free().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15617

Details

Provenance
mavAuthored on Dec 5 2023, 6:58 PM
GitHub <noreply@github.com>Committed on Dec 5 2023, 6:58 PM
Parents
rG014265f4e6fa: Add Ntfy notification support to ZED
Branches
Unknown
Tags
Unknown