public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/4] xfs: use unhashed buffers for size checks
Date: Fri, 10 Sep 2010 13:14:52 +1000	[thread overview]
Message-ID: <20100910031452.GC24409@dastard> (raw)
In-Reply-To: <20100909013806.GC29825@infradead.org>

On Wed, Sep 08, 2010 at 09:38:07PM -0400, Christoph Hellwig wrote:
> > +struct xfs_buf *
> > +xfs_buf_read_uncached(
> > +	struct xfs_mount	*mp,
> > +	struct xfs_buftarg	*target,
> > +	xfs_daddr_t		daddr,
> > +	size_t			length)
> > +{
> > +	xfs_buf_t	*bp;
> > +	int		error;
> 
> struct xfs_buf and the same indentation as the parameters, please.
> 
> > +
> > +	bp = xfs_buf_get_noaddr(length, target);
> 
> I think both the buf_get and buf_read interfaces for the non-hash
> buffers should have the same name.  Either your uncached or maybe better
> unhashed?  (And certainly no noaddr, which is not very useful)

I'll rename it *_uncached, because the hash is going away ;)

> 
> > +	if (!bp || XFS_BUF_ISERROR(bp))
> > +		goto fail;
> 
> xfs_buf_get_noaddr never returns an error in the buffer.

I'll fix all these - they are just CNP from the previous patch.
> 
> Also this one returns the buffer locked, while buf_get_noaddr doesn't.
> I suspect we should also change buf_get_noaddr to return a locked buffer
> to make it consistant with all other buf_read/get interfaces.

None of the other callers require locked buffers. I'll leave this
for a separate patch set for the moment.

> > +struct xfs_buf * xfs_buf_read_uncached(struct xfs_mount *mp,
> > +				struct xfs_buftarg *target,
> > +				xfs_daddr_t daddr, size_t length);
> 
> wrong placement of the *
> 
> 
> This patch, or at least the introduction of the new read helper should
> be moved before patch 1 so that we don't add code that gets removed a
> little later.

Yes, I plan to do that.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2010-09-10  3:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 15:12 [RFC] [PATCH 0/4] Replace buffer cache hash with rbtrees Dave Chinner
2010-09-08 15:12 ` [PATCH 1/4] xfs: kill XBF_FS_MANAGED buffers Dave Chinner
2010-09-09  1:33   ` Christoph Hellwig
2010-09-10  3:10     ` Dave Chinner
2010-09-10 21:17   ` Alex Elder
2010-09-08 15:12 ` [PATCH 2/4] xfs: use unhashed buffers for size checks Dave Chinner
2010-09-09  1:38   ` Christoph Hellwig
2010-09-10  3:14     ` Dave Chinner [this message]
2010-09-10 21:33   ` Alex Elder
2010-09-08 15:12 ` [PATCH 3/4] xfs: remove buftarg hash for external devices Dave Chinner
2010-09-09  1:39   ` Christoph Hellwig
2010-09-08 15:12 ` [PATCH 4/4] xfs: convert buffer cache hash to rbtree Dave Chinner
2010-09-09  1:51   ` Christoph Hellwig
2010-09-10  3:22     ` Dave Chinner
2010-09-13 16:59     ` Alex Elder
2010-09-13 16:53   ` Alex Elder
2010-09-14  7:13     ` 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=20100910031452.GC24409@dastard \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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