Bug 241117

Summary: zfs_unlinked_drain takes "forever" for over-quota ZFS filesystems
Product: Base System Reporter: Peter Eriksson <pen>
Component: kernAssignee: freebsd-fs (Nobody) <fs>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: chris
Priority: ---    
Version: 11.2-RELEASE   
Hardware: Any   
OS: Any   

Description Peter Eriksson 2019-10-07 14:36:43 UTC
When rebooting a server "zfs mount -a" can take "forever" (or atleast a silly amount of time) if there is a ZFS filesystems that are at or over 'refquota' when the kernel tries to execute "zfs_unlinked_drain" (and that filesystem has unlinked stuff to drain).

This effective allows a user to cause a denial-of-service if the server happens to reboot due to a bug...

Workaround: 

Make sure "zfs mount" is done in the background in the /etc/rc.d/zfs startup script - so that you can get a login prompt, and then give the filesystem more quota so progress can continue.
Comment 1 Peter Eriksson 2021-02-20 12:43:29 UTC
I'm closing this bug. Hopefully things will behave nicer with OpenZFS in the future :-)