From nobody Mon Apr 17 09:25:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0M8v2brqz45dXr; Mon, 17 Apr 2023 09:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0M8v210fz3s8J; Mon, 17 Apr 2023 09:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWvlFZIfnDApP0kI74N1RBjD8w9QaH4lbtjjV8CNs1w=; b=MSD2yZJRNHx3+mSLKDi3jiped5dDgoszrgAj01UGGGzKHW2Ik7Vhxx6MdpP6POxL7zLEhI M1WqOtOPL0pqwLj/ZCgpdD7xUHox+Ln1Eh/i72spwGQ+UjKaeEtjgsqp8uVXoXWTqLwaQi TpOzmM/iGzArlqSS49elx0tUGwl+LCZp2zKPiMmuAZHFukI644Ve6YajrvtLwZlBGy3h+C AT0YBGvL/83791NWxXlIVRfZiOfWhcGmbF11sCozA7pJeNeDaAcllgFVSg28Q1CYlW5/2O DrNj9Cq0O0YChEXr5Bgv7M4j0sEuYrnZVhTQDPdDKVKv3t2KsU8tHYWVQdjYUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWvlFZIfnDApP0kI74N1RBjD8w9QaH4lbtjjV8CNs1w=; b=TGabNAgxHDVz72T8C7GRHFkHesQBvVcuj8+14ba6YOYsVc5ZUbtzzUO/5HOqFXXEF5amWi hhfz5Gd+U0tVqQXsR5GPmKZQWUpngQchw05ybBOka4QbCkepCGCAA1TCt5VqXqdVZQV2qq I2RH0LHAfDs2O497FZarWm1NG7SxssmKjFS2zYuFGxl7wrRoJZ3DBZWkdCunu12gtP9YJH aQaE32HkLNYR+MKUIlTPmvCZFfaYIvGidqWj3Fmtfmpuxlq5Mrgc/erODr1vHTYIY7aeha zKVGlYMjnW+SF7QAQ5cfxYQ4E3PDrGR9sFKV2ks2KiwRCEUUR56XVB4vXoxqig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681723519; a=rsa-sha256; cv=none; b=s+A4ghaMiWb+r7Z7aOr43GdhmKQ2qhK2SNZEBkEhTKzHx5q6xPP+7wFftwdwg5Fp9YH27A bmF8k1R6r6MOe/jHJPq0MqDrL0UysPpYTlEXGfHVuwT2pHgeGYsZ4LzZeYlFXyPzmnkxI0 gsibodiJupvOTEff/HzpuqHuV3Vc7tn15Beykc8uwE4PIV69C/QLFJuMUK0NutOxzpupmm 8ZTBW7RLLvdWzB/cJU190IU7ESWFDTCVo0Bib+fxqQHO7DA99+f8rpevFfjKODKg8PRw0I fvNu9Jw1/rVuWug4r7OGi9gaU6G/CgVbsl0ViwGdl//0xVdyaq2p8eJeqvabDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0M8v1108zNq5; Mon, 17 Apr 2023 09:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33H9PJi7042115; Mon, 17 Apr 2023 09:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H9PJoS042114; Mon, 17 Apr 2023 09:25:19 GMT (envelope-from git) Date: Mon, 17 Apr 2023 09:25:19 GMT Message-Id: <202304170925.33H9PJoS042114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: e0bb19992556 - main - zfs: cherry-pick openzfs/zfs@c71fe7164 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0bb199925565a3770733afd1a4d8bb2d4d0ce31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=e0bb199925565a3770733afd1a4d8bb2d4d0ce31 commit e0bb199925565a3770733afd1a4d8bb2d4d0ce31 Author: Pawel Jakub Dawidek AuthorDate: 2023-04-17 09:19:49 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2023-04-17 09:19:49 +0000 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 Reviewed-by: Brian Behlendorf Signed-off-by: Pawel Jakub Dawidek Issue #13392 Closes #14739 Approved by: oshogbo, mm --- sys/contrib/openzfs/module/zfs/dmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/dmu.c b/sys/contrib/openzfs/module/zfs/dmu.c index ce985d833f58..cda1472a77aa 100644 --- a/sys/contrib/openzfs/module/zfs/dmu.c +++ b/sys/contrib/openzfs/module/zfs/dmu.c @@ -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);