public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v4 1/2] xfs: recheck buffer pinned status after push trylock failure
Date: Tue, 12 Feb 2013 08:53:05 +1100	[thread overview]
Message-ID: <20130211215305.GF8257@dastard> (raw)
In-Reply-To: <1360595302-15865-2-git-send-email-bfoster@redhat.com>

On Mon, Feb 11, 2013 at 10:08:21AM -0500, Brian Foster wrote:
> The buffer pinned check and trylock sequence in xfs_buf_item_push()
> can race with an active transaction on marking the buffer pinned.
> This can result in the buffer becoming pinned and stale after the
> initial check and the trylock failure, but before the check in
> xfs_buf_trylock() that issues a log force. If the log force is
> issued from this context, a spinlock recursion occurs on xa_lock.
> 
> Prepare xfs_buf_item_push() to handle the race by detecting a
> pinned buffer after the trylock failure so xfsaild issues a log
> force from a safe context. This, along with various previous fixes,
> renders the log force in xfs_buf_trylock() redundant.
> 
> Signed-off-by: Brian Foster <bfoster@redhat.com>

Looks good, doesn't seem to cause any problems I can see here.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-02-11 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 15:08 [PATCH v4 0/2] fix spinlock recursion on xa_lock in xfs_buf_item_push Brian Foster
2013-02-11 15:08 ` [PATCH v4 1/2] xfs: recheck buffer pinned status after push trylock failure Brian Foster
2013-02-11 21:53   ` Dave Chinner [this message]
2013-02-11 15:08 ` [PATCH v4 2/2] xfs: remove log force from xfs_buf_trylock() Brian Foster
2013-02-11 21:53   ` Dave Chinner
2013-02-14 23:32 ` [PATCH v4 0/2] fix spinlock recursion on xa_lock in xfs_buf_item_push Ben Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130211215305.GF8257@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox