]> granicus.if.org Git - zfs/commit
Wait for all znodes to be released before tearing down the superblock
authorChris Dunlop <chris@onthe.net.au>
Sat, 2 May 2015 05:47:06 +0000 (15:47 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 6 May 2015 21:13:19 +0000 (14:13 -0700)
commitf0da4d15082be83547e5370e4479d3c04b56451d
treedef5b4ed713efeddb85aa081eea7348d119a3852
parent7a3066ffddcf4f87470e33a1cd414e558b90249c
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
module/zfs/zfs_vfsops.c