mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: when replaying bmap operations, don't let unlinked inodes get reaped
Log recovery will iget an inode to replay BUI items and iput the inode when it's done. Unfortunately, if the inode was unlinked, the iput will see that i_nlink == 0 and decide to truncate & free the inode, which prevents us from replaying subsequent BUIs. We can't skip the BUIs because we have to replay all the redo items to ensure that atomic operations complete. Since unlinked inode recovery will reap the inode anyway, we can safely introduce a new inode flag to indicate that an inode is in this 'unlinked recovery' state and should not be auto-reaped in the drop_inode path. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
9f3afb57d5
commit
17c12bcd30
6 changed files with 29 additions and 0 deletions
|
@ -1850,6 +1850,7 @@ xfs_inactive(
|
|||
}
|
||||
|
||||
mp = ip->i_mount;
|
||||
ASSERT(!xfs_iflags_test(ip, XFS_IRECOVERY));
|
||||
|
||||
/* If this is a read-only mount, don't do this (would generate I/O) */
|
||||
if (mp->m_flags & XFS_MOUNT_RDONLY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue