The "zfs diff" command does not properly display a file that has moved to a new directory. Instead, it shows a moved file as a modified file. Steps to reproduce: # zpool create tank da0 # touch /tank/foo # mkdir /tank/bar # zfs snapshot tank@1 # mv /tank/foo /tank/bar/ # zfs snapshot tank@2 # zfs diff tank@1 tank@2 M /tank/ M /tank/foo M /tank/bar OpenZFS has already fixed this issue in git revision aab04418a72c0a29040a5da7eec08efe19dbef04 back in Oct-2015. We should import it into FreeBSD.
A commit references this bug: Author: asomers Date: Fri Aug 4 23:01:14 UTC 2017 New revision: 322069 URL: https://svnweb.freebsd.org/changeset/base/322069 Log: Add a regression test for PR 221234 etc/mtree/BSD.tests.dist tests/sys/cddl/zfs/tests/cli_root/Makefile tests/sys/cddl/zfs/tests/cli_root/zfs_diff/... Add an automated test that checks the typical output of "zfs diff". The is the first and only automated test for "zfs diff". It currently fails for a file that gets moved to a new directory. PR: 221234 Sponsored by: Spectra Logic Corp Changes: projects/zfsd/head/etc/mtree/BSD.tests.dist projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/Makefile projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/Makefile projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/cleanup.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/setup.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/zfs_diff.cfg projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/zfs_diff_001_pos.golden projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/zfs_diff_001_pos.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/zfs_diff_test.sh
Assign to committer.
Fixed by avg in svn r324346, MFCed to stable/11 in 325147 and to stable/10 in r325148.
A commit references this bug: Author: asomers Date: Fri Feb 9 15:54:25 UTC 2018 New revision: 329065 URL: https://svnweb.freebsd.org/changeset/base/329065 Log: Clear an expected failure that was fixed in r324346 PR: 221234 Sponsored by: Spectra Logic Corp Changes: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/zfs_diff_test.sh