HomeFreeBSD

Fix raw receive with different indirect block size.

Description

Fix raw receive with different indirect block size.

Unlike regular receive, raw receive require destination to have the
same block structure as the source. In case of dnode reclaim this
triggers two special cases, requiring special handling:

  • If dn_nlevels == 1, we can change the ibs, but dnode_set_blksz()

should not dirty the data buffer if block size does not change, or
durign receive dbuf_dirty_lightweight() will trigger assertion.

  • If dn_nlevels > 1, we just can't change the ibs, dnode_set_blksz()

would fail and receive_object would trigger assertion, so we should
destroy and recreate the dnode from scratch.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15039

(cherry picked from commit c4e8742149e31a77dc074f3baacfefed3ccb800e)

Details

Provenance
mavAuthored on Jul 14 2023, 11:16 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 20 2023, 3:58 PM
Parents
rGe613e4bbe397: Avoid extra snprintf() in dsl_deadlist_merge().
Branches
Unknown
Tags
Unknown

Event Timeline