All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>,
	Eric Sandeen <sandeen@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
Date: Wed, 13 Nov 2013 16:26:52 -0500	[thread overview]
Message-ID: <5283EE9C.6050008@redhat.com> (raw)
In-Reply-To: <5283E6D9.6070306@sandeen.net>

On 11/13/2013 03:53 PM, Eric Sandeen wrote:
> The "verbose" argument to xfs_setsize_buftarg_flags() has been
> unused since:
> 
> ffe37436 xfs: stop using the page cache to back the buffer cache
> 
> Remove it, and fold the function into xfs_setsize_buftarg()
> now that there's no need for different types of callers.
> 
> Fix inconsistent comment spacing while we're at it.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---

Looks good to me.

Reviewed-by: Brian Foster <bfoster@redhat.com>

> 
> V2: Fold old helper function into xfs_setsize_buftarg,
> per Brian's suggestion.
> 
>  xfs_buf.c |   26 ++++++++------------------
>  1 file changed, 8 insertions(+), 18 deletions(-)
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 2634700..0ce3b7b 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1601,12 +1601,11 @@ xfs_free_buftarg(
>  	kmem_free(btp);
>  }
>  
> -STATIC int
> -xfs_setsize_buftarg_flags(
> +int
> +xfs_setsize_buftarg(
>  	xfs_buftarg_t		*btp,
>  	unsigned int		blocksize,
> -	unsigned int		sectorsize,
> -	int			verbose)
> +	unsigned int		sectorsize)
>  {
>  	btp->bt_bsize = blocksize;
>  	btp->bt_sshift = ffs(sectorsize) - 1;
> @@ -1627,26 +1626,17 @@ xfs_setsize_buftarg_flags(
>  }
>  
>  /*
> - *	When allocating the initial buffer target we have not yet
> - *	read in the superblock, so don't know what sized sectors
> - *	are being used at this early stage.  Play safe.
> + * When allocating the initial buffer target we have not yet
> + * read in the superblock, so don't know what sized sectors
> + * are being used at this early stage.  Play safe.
>   */
>  STATIC int
>  xfs_setsize_buftarg_early(
>  	xfs_buftarg_t		*btp,
>  	struct block_device	*bdev)
>  {
> -	return xfs_setsize_buftarg_flags(btp,
> -			PAGE_SIZE, bdev_logical_block_size(bdev), 0);
> -}
> -
> -int
> -xfs_setsize_buftarg(
> -	xfs_buftarg_t		*btp,
> -	unsigned int		blocksize,
> -	unsigned int		sectorsize)
> -{
> -	return xfs_setsize_buftarg_flags(btp, blocksize, sectorsize, 1);
> +	return xfs_setsize_buftarg(btp, PAGE_SIZE,
> +				   bdev_logical_block_size(bdev));
>  }
>  
>  xfs_buftarg_t *
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 

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

  reply	other threads:[~2013-11-13 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 17:52 [PATCH] xfs: remove unused "verbose" argument from xfs_setsize_buftarg path Eric Sandeen
2013-11-13 18:42 ` Brian Foster
2013-11-13 18:50   ` Eric Sandeen
2013-11-13 20:53 ` [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg Eric Sandeen
2013-11-13 21:26   ` Brian Foster [this message]
2013-12-04 21:52   ` 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=5283EE9C.6050008@redhat.com \
    --to=bfoster@redhat.com \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.