]> git.proxmox.com Git - mirror_zfs.git/commit
dbuf: Set dr_data when unoverriding after clone
authorAlexander Motin <mav@FreeBSD.org>
Tue, 12 Dec 2023 20:59:24 +0000 (15:59 -0500)
committerGitHub <noreply@github.com>
Tue, 12 Dec 2023 20:59:24 +0000 (12:59 -0800)
commit86e115e21e5bdeee73c88c5a1a73a29d9637380a
treef55b339c2279421417b33f87d8fcdfeb6622556c
parent86063d90319ac8a785d81ba7e3f8037a7f5389f3
dbuf: Set dr_data when unoverriding after clone

Block cloning normally creates dirty record without dr_data.  But if
the block is read after cloning, it is moved into DB_CACHED state and
receives the data buffer.  If after that we call dbuf_unoverride()
to convert the dirty record into normal write, we should give it the
data buffer from dbuf and release one.

Reviewed-by: Kay Pedersen <mail@mkwg.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15654
Closes #15656
module/zfs/dbuf.c