* [PATCH] xfs: remove unused "verbose" argument from xfs_setsize_buftarg path
@ 2013-11-13 17:52 Eric Sandeen
2013-11-13 18:42 ` Brian Foster
2013-11-13 20:53 ` [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg Eric Sandeen
0 siblings, 2 replies; 6+ messages in thread
From: Eric Sandeen @ 2013-11-13 17:52 UTC (permalink / raw)
To: xfs-oss
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@redhat.com>
---
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);
}
xfs_buftarg_t *
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: remove unused "verbose" argument from xfs_setsize_buftarg path
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
1 sibling, 1 reply; 6+ messages in thread
From: Brian Foster @ 2013-11-13 18:42 UTC (permalink / raw)
To: Eric Sandeen, xfs-oss
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@redhat.com>
> ---
>
> 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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: remove unused "verbose" argument from xfs_setsize_buftarg path
2013-11-13 18:42 ` Brian Foster
@ 2013-11-13 18:50 ` Eric Sandeen
0 siblings, 0 replies; 6+ messages in thread
From: Eric Sandeen @ 2013-11-13 18:50 UTC (permalink / raw)
To: Brian Foster, xfs-oss
On 11/13/13, 12:42 PM, Brian Foster wrote:
> 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@redhat.com>
>> ---
>>
>> 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
>
Oh that probably makes sense. :) I got tunnel vision. I'll send V2.
Thanks,
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
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 20:53 ` Eric Sandeen
2013-11-13 21:26 ` Brian Foster
2013-12-04 21:52 ` Ben Myers
1 sibling, 2 replies; 6+ messages in thread
From: Eric Sandeen @ 2013-11-13 20:53 UTC (permalink / raw)
To: Eric Sandeen, xfs-oss
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
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
2013-12-04 21:52 ` Ben Myers
1 sibling, 0 replies; 6+ messages in thread
From: Brian Foster @ 2013-11-13 21:26 UTC (permalink / raw)
To: Eric Sandeen, Eric Sandeen, xfs-oss
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
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
@ 2013-12-04 21:52 ` Ben Myers
1 sibling, 0 replies; 6+ messages in thread
From: Ben Myers @ 2013-12-04 21:52 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss
On Wed, Nov 13, 2013 at 02:53:45PM -0600, 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>
Applied.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-04 21:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-12-04 21:52 ` Ben Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox