Linux: Unmount fails after rollback
System information
| Type | Version/Name |
|---|---|
| Distribution Name | Pop!_OS |
| Distribution Version | 21.04 |
| Kernel Version | 5.11.0-7620-generic |
| Architecture | x86_64 |
| OpenZFS Version | openzfs/zfs@4357552785acd59d225b1dc2aff2665f88bbf904 |
Describe the problem you're observing
After rollback of a parent dataset, unmounting a child dataset shortly thereafter fails. I have been able to reproduce this issue on Linux with master and zfs-2.1-release (I haven't tried other versions). I have not been able to reproduce this on FreeBSD.
Describe how to reproduce the problem
#!/bin/sh
POOL=storage
zfs create -p $POOL/test/child
zfs snapshot -r $POOL/test@snap
while :; do
zfs create -p $POOL/test/child
zfs rollback -r $POOL/test@snap
zfs destroy -rf $POOL/test/child || echo failed
done
On a desktop system this fails every time.
Include any warning/errors/backtraces from the system logs
+ zfs destroy -rf storage/test/child
cannot unmount '/mnt/storage/test/child': unmount failed
Inserting sleep 1 after each line in the loop causes the zfs destroy command to succeed more often than it fails, but it does still occasionally fail.
I see several rollback tests are marked maybe FAIL in zts-report, for some undocumented "known reason"
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.