xfs
[Top] [All Lists]

TAKE - inode create / reclaim deadlock

To: linux-xfs@xxxxxxxxxxx
Subject: TAKE - inode create / reclaim deadlock
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 12 Jun 2003 22:11:40 -0500
Sender: linux-xfs-bounce@xxxxxxxxxxx
Fix deadlock between xfs_finish_reclaim and xfs_iget_core. An inode being
reclaimed and removed from memory by one thread while another thread
is attempting to reuse the inode and bring it back to life. There
was a window between the iget starting to reuse the inode and the
reclaim starting. Close the window by marking the inode as being
reused under the hash lock, and by abandoning the reclaim if this
is detected when it obtains the hash lock.

This has been around for a long time, but I can only hit it with
4 cpus and a lot of parallel create/remove activity - and the new
sync code.

Date:  Thu Jun 12 20:08:42 PDT 2003
Workarea:  jen.americas.sgi.com:/src/lord/xfs-linux.2.4

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:151123a
linux/fs/xfs/xfs_vnodeops.c - 1.592
        - Set XFS_IRECLAIMABLE when disconnecting an xfs_inode from the linux 
          inode. This is safe from the iget path because of the I_LOCK which is
          held in both cases. In xfs_finish_reclaim, after obtaining the hash
          lock, check that XFS_IRECLAIMABLE is set in the case where there is
          no vnode, abandon the reclaim if it is not. We can also reduce the
          locking use in a couple of paths here.

linux/fs/xfs/xfs_iget.c - 1.189
        - When a candidate inode is found in xfs_iget_core which has the 
potential
          to be reclaimed, remove the XFS_IRECLAIMABLE flag under the inode hash
          lock.

linux/fs/xfs/xfs_inode.h - 1.182
        - Define XFS_IRECLAIMABLE



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE - inode create / reclaim deadlock, Steve Lord <=