openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.64k stars 1.75k forks source link

Linux: Unmount fails after rollback #12460

Open ghost opened 3 years ago

ghost commented 3 years ago

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
ghost commented 3 years ago

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.

ghost commented 3 years ago

I see several rollback tests are marked maybe FAIL in zts-report, for some undocumented "known reason"

stale[bot] commented 2 years ago

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.