xfs
[Top] [All Lists]

[PATCH v4 2/2] xfs: remove log force from xfs_buf_trylock()

To: xfs@xxxxxxxxxxx
Subject: [PATCH v4 2/2] xfs: remove log force from xfs_buf_trylock()
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Mon, 11 Feb 2013 10:08:22 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1360595302-15865-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1360595302-15865-1-git-send-email-bfoster@xxxxxxxxxx>
The trylock log force invoked via xfs_buf_item_push() can attempt
to acquire xa_lock, thus leading to a recursion bug when called
with xa_lock held.

This log force was originally added to xfs_buf_trylock() to address
xfsaild stalls due to pinned and stale buffers. Since the addition
of this behavior, the log item pushing code had been reworked to
detect and track pinned items to inform xfsaild to issue a log
force itself when necessary. As such, the log force on trylock
failure is redundant and safe to remove.

Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
---
 fs/xfs/xfs_buf.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index fbbb9eb..4e8f0df 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -951,8 +951,6 @@ xfs_buf_trylock(
        locked = down_trylock(&bp->b_sema) == 0;
        if (locked)
                XB_SET_OWNER(bp);
-       else if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE))
-               xfs_log_force(bp->b_target->bt_mount, 0);
 
        trace_xfs_buf_trylock(bp, _RET_IP_);
        return locked;
-- 
1.7.7.6

<Prev in Thread] Current Thread [Next in Thread>