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
This commit is contained in:
parent
6e015933f8
commit
c71fe71640
@ -2312,8 +2312,10 @@ 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;
|
||||
dl->dr_overridden_by.blk_phys_birth =
|
||||
BP_PHYSICAL_BIRTH(bp);
|
||||
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