zfs: cherry-pick openzfs/zfs@c71fe7164
Fix data corruption when cloning embedded blocks Don't overwrite blk_phys_birth, as for embedded blocks it is part of the payload. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Issue #13392 Closes #14739 Approved by: oshogbo, mm
This commit is contained in:
parent
bf7aa99a55
commit
e0bb199925
@ -2312,9 +2312,11 @@ dmu_brt_clone(objset_t *os, uint64_t object, uint64_t offset, uint64_t length,
|
||||
dl->dr_overridden_by.blk_phys_birth = 0;
|
||||
} else {
|
||||
dl->dr_overridden_by.blk_birth = dr->dr_txg;
|
||||
if (!BP_IS_EMBEDDED(bp)) {
|
||||
dl->dr_overridden_by.blk_phys_birth =
|
||||
BP_PHYSICAL_BIRTH(bp);
|
||||
}
|
||||
}
|
||||
|
||||
mutex_exit(&db->db_mtx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user