xfs
[Top] [All Lists]

Re: [PATCH] xfs: remove unused "verbose" argument from xfs_setsize_bufta

To: Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Subject: Re: [PATCH] xfs: remove unused "verbose" argument from xfs_setsize_buftarg path
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Wed, 13 Nov 2013 13:42:36 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5283BC4B.9090204@xxxxxxxxxx>
References: <5283BC4B.9090204@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
On 11/13/2013 12:52 PM, Eric Sandeen wrote:
> The "verbose" argument has been unused since 
> ffe37436 xfs: stop using the page cache to back the buffer cache
> 
> Remove it, and then give the function a better (?) name since
> no flags are involved.
> 
> Fix inconsistent comment spacing while we're at it.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 2634700..85d916a 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1602,11 +1602,10 @@ xfs_free_buftarg(
>  }
>  
>  STATIC int
> -xfs_setsize_buftarg_flags(
> +__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,17 +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);
> +     return __xfs_setsize_buftarg(btp,
> +                     PAGE_SIZE, bdev_logical_block_size(bdev));
>  }
>  
>  int
> @@ -1646,7 +1645,7 @@ xfs_setsize_buftarg(
>       unsigned int            blocksize,
>       unsigned int            sectorsize)
>  {
> -     return xfs_setsize_buftarg_flags(btp, blocksize, sectorsize, 1);
> +     return __xfs_setsize_buftarg(btp, blocksize, sectorsize);
>  }
>  

At this point is there a need for the separate __xfs_setsize_buftarg()
helper? E.g., fold the implementation into xfs_setsize_buftarg() and let
xfs_setsize_buftarg_early() call xfs_setsize_buftarg()..?

Brian

>  xfs_buftarg_t *
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

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