HomeFreeBSD

do not destroy 'snapdir' when it becomes inactive

Description

do not destroy 'snapdir' when it becomes inactive

That was just wrong. In fact, we can safely keep this static entry when
it's inactive.
Now the destructive action is moved to the reclaim method and the
function is renamed from zfsctl_snapdir_inactive(0 to
zfsctl_snapdir_reclaim().

Also, we can use gfs_vop_reclaim() instead of gfs_dir_inactive() +
kmem_free().

Lastly, we can just assert that the node does not any children when it
is reclaimed, even on the force unmount. That's because zfs_umount()
does an extra vflush() pass which should destroy all snapshot-mountpoint
vnodes that are the snapdir's children.

MFC after: 5 weeks

Details

Provenance
avgAuthored on
Parents
rS299950: Fix off by one error in index limit calculation
Branches
Unknown
Tags
Unknown