Comment 0 for bug 1849665

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

When using zfs diff on an encrypted dataset, I frequently encounter this error:

# zfs diff nsnx/trusty-2a@snap1 nsnx/trusty-2a
+ /nsnx/trusty-2a/bin
Unable to determine path or stats for object 5 in nsnx/trusty-2a@zfs-diff-32359-000000010001f165: File exists

I believe this to be upstream bug https://github.com/zfsonlinux/zfs/issues/7678, fixed with https://github.com/zfsonlinux/zfs/pull/9343

Here is one way to reproduce it:

# mkdir /zfs-test
# cd /zfs-test
# truncate -s 10G file.img
# zpool create -o ashift=12 -O acltype=posixacl -O compression=lz4 -O xattr=sa -O normalization=formD -O dnodesize=auto tank $(pwd)/file.img
# zfs create tank/d1 -o encryption=on -o keyformat=passphrase
Enter passphrase:
Re-enter passphrase:
# dd if=/dev/urandom bs=4k of=/tank/d1/somedata.bin count=10240
10240+0 records in
10240+0 records out
41943040 bytes (42 MB, 40 MiB) copied, 0,304365 s, 138 MB/s
# zfs snapshot tank/d1@s1
# dd if=/dev/urandom bs=4k of=/tank/d1/somedata2.bin count=10240
10240+0 records in
10240+0 records out
41943040 bytes (42 MB, 40 MiB) copied, 0,305324 s, 137 MB/s
# zfs diff tank/d1@s1 tank/d1
Unable to determine path or stats for object 3 in tank/d1@s1: File exists

There may be a simpler way to test this, but this should be enough to start with.