xfs: remove unused "verbose" argument from xfs_setsize_buftarg path
PATCH 1/1 xfs: remove unused "verbose" argument from xfs_setsize_buftarg path
The "verbose" argument has been unused sinceffe37436 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.
---
fs/xfs/xfs_buf.c +8 -9
@@ -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 intxfs_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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 53 lines · Eric Sandeen
The "verbose" argument has been unused since
ffe37436xfs: stop using the page cache to back the buffer cacheRemove 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 <[email protected]>---
fs/xfs/xfs_buf.c +7
-8@@ -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 intxfs_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
fs/xfs/xfs_buf.c xfs_setsize_buftarg( · line 1650
Quoted 7 lines
fs/xfs/xfs_buf.c +1
-1@@ -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
Quoted 7 lines
fs/xfs/xfs_buf.c +0
-0xfs_buftarg_t *_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 66 lines · Brian Foster
Quoted 53 lines · Eric Sandeen
The "verbose" argument has been unused since
ffe37436xfs: stop using the page cache to back the buffer cacheRemove 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 <[email protected]>---
fs/xfs/xfs_buf.c +7
-8@@ -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 intxfs_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 fs/xfs/xfs_buf.c xfs_setsize_buftarg( · line 1650
Quoted 7 lines
fs/xfs/xfs_buf.c +1
-1@@ -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 intoxfs_setsize_buftarg()and letxfs_setsize_buftarg_early()callxfs_setsize_buftarg()..?
Quoted 2 lines
Brian
Oh that probably makes sense. :) I got tunnel vision. I'll send V2.
Thanks,
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v2 1/1 xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
In reply to Eric SandeenThe "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.
---
V2: Fold old helper function into xfs_setsize_buftarg, per Brian's suggestion.
xfs_buf.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-)
fs/xfs/xfs_buf.c +8 -18
@@ -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 intxfs_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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
Quoted 5 lines · Eric Sandeen
The "verbose" argument to
xfs_setsize_buftarg_flags()has been unused since:
ffe37436xfs: stop using the page cache to back the buffer cache
Quoted 7 lines
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 <[email protected]>---
Looks good to me.
Quoted 60 lines
V2: Fold old helper function into
xfs_setsize_buftarg, per Brian's suggestion.xfs_buf.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-)fs/xfs/xfs_buf.c +8
-18@@ -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 intxfs_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 *
Quoted 5 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Ben Myers
AppliedRe: [PATCH V2] xfs: simplify xfs_setsize_buftarg callchain; remove unused arg
In reply to Eric SandeenQuoted 11 lines · Eric Sandeen
The "verbose" argument to
xfs_setsize_buftarg_flags()has been unused since:
ffe37436xfs: stop using the page cache to back the buffer cacheRemove 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 <[email protected]>
Applied.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs