public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/3] xfs: kill XBF_LOCK
Date: Tue, 10 Apr 2012 10:00:18 -0500	[thread overview]
Message-ID: <4F844B02.2030301@sgi.com> (raw)
In-Reply-To: <1334052213-26870-2-git-send-email-david@fromorbit.com>

On 04/10/12 05:03, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> Buffers are always returned locked from the lookup routines. Hence
> we don't need to tell the lookup routines to return locked buffers,
> on to try and lock them. Remove XBF_LOCK from all the callers and
> from internal buffer cache usage.
>
> Signed-off-by: Dave Chinner<dchinner@redhat.com>
> ---
>   fs/xfs/xfs_attr.c        |    5 ++---
>   fs/xfs/xfs_attr_leaf.c   |    2 +-
>   fs/xfs/xfs_buf.c         |   20 +++++---------------
>   fs/xfs/xfs_buf.h         |    4 +---
>   fs/xfs/xfs_fsops.c       |   13 +++++--------
>   fs/xfs/xfs_ialloc.c      |    3 +--
>   fs/xfs/xfs_inode.c       |   16 +++++++---------
>   fs/xfs/xfs_log_recover.c |    7 +++----
>   fs/xfs/xfs_rw.c          |    2 +-
>   fs/xfs/xfs_trans_buf.c   |    4 ++--
>   fs/xfs/xfs_vnodeops.c    |    2 +-
>   11 files changed, 29 insertions(+), 49 deletions(-)
>

> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 7a945fd..8d76df1 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -179,7 +179,7 @@ xfs_buf_alloc(
>   	/*
>   	 * We don't want certain flags to appear in b_flags.
>   	 */
> -	flags&= ~(XBF_LOCK|XBF_MAPPED|XBF_DONT_BLOCK|XBF_READ_AHEAD);
> +	flags&= ~(XBF_MAPPED|XBF_DONT_BLOCK|XBF_READ_AHEAD);
>
>   	atomic_set(&bp->b_hold, 1);
>   	atomic_set(&bp->b_lru_ref, 1);
> @@ -578,19 +578,14 @@ found:
>   		if (unlikely(error)) {
>   			xfs_warn(target->bt_mount,
>   				"%s: failed to map pages\n", __func__);
> -			goto no_buffer;
> +			xfs_buf_relse(bp);
> +			return NULL;
>   		}
>   	}
>
>   	XFS_STATS_INC(xb_get);
>   	trace_xfs_buf_get(bp, flags, _RET_IP_);
>   	return bp;
> -
> -no_buffer:
> -	if (flags&  (XBF_LOCK | XBF_TRYLOCK))
> -		xfs_buf_unlock(bp);
> -	xfs_buf_rele(bp);
> -	return NULL;
>   }


Do you have a new copy of the "xfs: fix buffer lookup race on allocation 
failure" patch. It would go about here in the sources.

The reason I ask, the sources that I have for xfs_buf_get() seems to 
still have a "goto no_buffer" for the failed xfs_buf_allocate_memory() 
call and this patch removes that call. I did not find anything in the 8 
buf clean-up series that would alter this area.


Thank-you,

--Mark Tinguely <tinguely@sgi.com>

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

  reply	other threads:[~2012-04-10 15:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 10:03 [PATCH 0/3] xfs: More xfs_buf cleanups Dave Chinner
2012-04-10 10:03 ` [PATCH 1/3] xfs: kill XBF_LOCK Dave Chinner
2012-04-10 15:00   ` Mark Tinguely [this message]
2012-04-10 22:20     ` Dave Chinner
2012-04-11 20:07       ` Christoph Hellwig
2012-04-11 22:51         ` Dave Chinner
2012-04-11 22:59           ` Christoph Hellwig
2012-04-11 23:16             ` Dave Chinner
2012-04-12 13:23         ` Mark Tinguely
2012-04-11 20:05   ` Christoph Hellwig
2012-04-10 10:03 ` [PATCH 2/3] xfs: kill xfs_read_buf() Dave Chinner
2012-04-11 20:06   ` Christoph Hellwig
2012-04-10 10:03 ` [PATCH 3/3] xfs: kill XBF_DONTBLOCK Dave Chinner
2012-04-11 20:06   ` Christoph Hellwig
2012-04-11 20:08 ` [PATCH 0/3] xfs: More xfs_buf cleanups Christoph Hellwig
2012-04-13 12:02   ` Dave Chinner

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=4F844B02.2030301@sgi.com \
    --to=tinguely@sgi.com \
    --cc=david@fromorbit.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