HomeFreeBSD

Wait for all znodes to be released before tearing down the superblock

Description

Wait for all znodes to be released before tearing down the superblock

By the time we're tearing down our superblock the VFS has started releasing
all our inodes/znodes. Some of this work may have been handed off to our
iput taskq so we need to wait for that work to complete. However the iput
from the taskq can itself result in additional work being added to the
taskq:

dsl_pool_iput_taskq
iput

iput_final
 evict
  destroy_inode
   zpl_inode_destroy
    zfs_inode_destroy
     zfs_iput_async(ZTOI(zp->z_xattr_parent))
      taskq_dispatch(dsl_pool_iput_taskq..., iput, ...)

Let's wait until all our znodes have been released.

Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3281

Details

Provenance
Chris Dunlop <chris@onthe.net.au>Authored on May 2 2015, 5:47 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 6 2015, 9:13 PM
Parents
rG7a3066ffddcf: Illumos 5348 - zio_checksum_error() only fills in info if ECKSUM
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGf0da4d15082b: Wait for all znodes to be released before tearing down the superblock (authored by Chris Dunlop <chris@onthe.net.au>).May 6 2015, 9:13 PM