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
This commit is contained in:
Pawel Jakub Dawidek
2024-01-17 08:51:07 -08:00
committed by Brian Behlendorf
parent d2f7b2e557
commit ef527958c6
10 changed files with 247 additions and 1 deletions
+1
View File
@@ -185,6 +185,7 @@ export ZFSTEST_FILES='badsend
btree_test
chg_usr_exec
clonefile
clone_mmap_cached
clone_mmap_write
devname2devid
dir_rd_update