ZTS: Test for clone, mmap and write for block cloning
commit995734ed12de767f98e1c02ba39efe9595e710b8
authorUmer Saleem <usaleem@ixsystems.com>
Tue, 16 Jan 2024 21:15:10 +0000 (17 02:15 +0500)
committerGitHub <noreply@github.com>
Tue, 16 Jan 2024 21:15:10 +0000 (16 13:15 -0800)
treec99d9b62940ad453795f816743c82f0bdada4d7e
parenta1771d243a57524c6599d7beedcb2085e5c05395
ZTS: Test for clone, mmap and write for block cloning

For block cloning, if we mmap the cloned file and write from the
map into the file, it triggers a panic in dbuf_redirty() on Linux.

The same scenario causes data corruption on FreeBSD. Both these
issues are fixed under PR#15656 and PR#15665.

It would be good to add a test for this scenario in ZTS. The test
program and issue was produced by @robn.

Reviewed-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #15717
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_write.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_write.ksh [new file with mode: 0755]