Bug 192715 - zfs diff does not report accurate file deletion differences
Summary: zfs diff does not report accurate file deletion differences
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.3-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2014-08-16 20:55 UTC by Kyle George
Modified: 2014-08-16 20:55 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Kyle George 2014-08-16 20:55:17 UTC
'zfs diff' does not report accurate file deletion differences.  I noticed this when I created a snapshot of a dataset, removed some files, and then performed a diff.  It did not show all the files that were removed.  Here's a recipe to reproduce:

[root@atlantis ~]# zfs create tank/test
[root@atlantis ~]# cd /tank/test
[root@atlantis /tank/test]# touch a
[root@atlantis /tank/test]# zfs snapshot tank/test@1
[root@atlantis /tank/test]# zfs snapshot tank/test@2
[root@atlantis /tank/test]# rm a
[root@atlantis /tank/test]# zfs diff tank/test@1
M       /tank/test/
-       /tank/test/a
[root@atlantis /tank/test]# zfs diff tank/test@2
M       /tank/test/
[root@atlantis /tank/test]#
[root@atlantis /tank/test]# uname -a

However, I'm not sure if this is the only case that triggers this bug.

I am running 9.3-RELEASE:

[root@atlantis /tank/test]# uname -a
FreeBSD atlantis 9.3-RELEASE FreeBSD 9.3-RELEASE #0 r268512: Thu Jul 10 23:44:39 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

I'm apparently not the only one experiencing this.  A search on Illumos' bug tracker let me to this issue:


which led to this issue in zfsonlinux:


For what it's worth, my zpool was originally created as v28 on 9.0-RELEASE and has been upgrated to v5000 with the following feature flags:

tank  feature@async_destroy          enabled                        local
tank  feature@empty_bpobj            active                         local
tank  feature@lz4_compress           enabled                        local
tank  feature@multi_vdev_crash_dump  enabled                        local
tank  feature@spacemap_histogram     active                         local
tank  feature@enabled_txg            active                         local
tank  feature@hole_birth             active                         local
tank  feature@extensible_dataset     enabled                        local
tank  feature@bookmarks              enabled                        local
tank  feature@filesystem_limits      enabled                        local