]> git.proxmox.com Git - mirror_zfs.git/commit
Fix cloning into mmaped and cached file.
authorPawel Jakub Dawidek <pawel@dawidek.net>
Wed, 17 Jan 2024 16:51:07 +0000 (08:51 -0800)
committerGitHub <noreply@github.com>
Wed, 17 Jan 2024 16:51:07 +0000 (08:51 -0800)
commitf45dd90f34cf8dadecc0236f9016046a6bf54ee5
treec1540f69ef41f55a7591a24c23c1d2096e5dbe06
parentf0bf7a247dbb030d68c7fd2b5526dd111cc775d0
Fix cloning into mmaped and cached file.

If the destination file is mmaped and the mmaped region was already
read, so it is cached, we need to update mmaped pages after successful
clone using update_pages().

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Pointed out by: Ka Ho Ng <khng@freebsd.org>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #15772
module/zfs/zfs_vnops.c
tests/runfiles/common.run
tests/test-runner/bin/zts-report.py.in
tests/zfs-tests/cmd/.gitignore
tests/zfs-tests/cmd/Makefile.am
tests/zfs-tests/cmd/clone_mmap_cached.c [new file with mode: 0644]
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_cached.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/block_cloning/setup.ksh