Nathaniel W. Turner 6c06f072c2 xfs: copy li_lsn before dropping AIL lock
Access to log items on the AIL is generally protected by m_ail_lock;
this is particularly needed when we're getting or setting the 64-bit
li_lsn on a 32-bit platform.  This patch fixes a couple places where we
were accessing the log item after dropping the AIL lock on 32-bit
machines.

This can result in a partially-zeroed log->l_tail_lsn if
xfs_trans_ail_delete is racing with xfs_trans_ail_update, and in at
least some cases, this can leave the l_tail_lsn with a zero cycle
number, which means xlog_space_left will think the log is full (unless
CONFIG_XFS_DEBUG is set, in which case we'll trip an ASSERT), leading to
processes stuck forever in xlog_grant_log_space.

Thanks to Adrian VanderSpek for first spotting the race potential and to
Dave Chinner for debug assistance.

Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2009-11-17 10:26:49 -06:00
..
2009-11-02 08:43:45 -06:00
2009-10-01 16:11:16 -07:00
2009-07-12 12:22:34 -07:00
2009-10-04 15:05:10 -07:00
2009-09-23 07:39:28 -07:00
2009-09-30 12:19:44 -05:00
2009-07-12 12:22:34 -07:00
2009-11-04 10:24:52 +01:00
2009-07-12 12:22:34 -07:00
2009-09-23 18:13:10 -07:00
2009-10-20 18:02:33 -04:00
2009-09-23 07:39:30 -07:00
2009-09-24 08:41:47 -04:00
2009-09-24 08:41:47 -04:00
2009-09-24 07:21:01 -07:00
2009-09-24 07:21:03 -07:00
2009-09-24 07:21:01 -07:00
2009-09-24 07:47:27 -04:00
2009-10-22 08:11:44 +09:00
2009-10-04 15:05:10 -07:00
2009-09-23 07:39:29 -07:00