diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-11-30 05:15:46 +0100 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-12-01 14:40:20 +0100 |
commit | de25c1818c44f580ff556cb9e0f7a1c687ed870b (patch) | |
tree | a8fafd9317cf4841b6004119f6e84ddbece73af3 /fs/xfs/xfs_error.h | |
parent | xfs: delayed alloc blocks beyond EOF are valid after writeback (diff) | |
download | linux-de25c1818c44f580ff556cb9e0f7a1c687ed870b.tar.xz linux-de25c1818c44f580ff556cb9e0f7a1c687ed870b.zip |
xfs: avoid moving stale inodes in the AIL
When an inode has been marked stale because the cluster is being
freed, we don't want to (re-)insert this inode into the AIL. There
is a race condition where the cluster buffer may be unpinned before
the inode is inserted into the AIL during transaction committed
processing. If the buffer is unpinned before the inode item has been
committed and inserted, then it is possible for the buffer to be
released and hence processthe stale inode callbacks before the inode
is inserted into the AIL.
In this case, we then insert a clean, stale inode into the AIL which
will never get removed by an IO completion. It will, however, get
reclaimed and that triggers an assert in xfs_inode_free()
complaining about freeing an inode still in the AIL.
This race can be avoided by not moving stale inodes forward in the AIL
during transaction commit completion processing. This closes the
race condition by ensuring we never insert clean stale inodes into
the AIL. It is safe to do this because a dirty stale inode, by
definition, must already be in the AIL.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_error.h')
0 files changed, 0 insertions, 0 deletions