* [PATCH 00/19] xfs: remove a bunch of unused function args
@ 2014-04-07 19:58 Eric Sandeen
2014-04-07 19:58 ` [PATCH 01/19] xfs: remove unused tp arg from xfs_bmap_last_offset() and callers Eric Sandeen
` (19 more replies)
0 siblings, 20 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
I did some mindless work during a plane ride. ;)
If the granularity of these patches is just too much, I could certainly
collapse them into fewer, bigger patches, but I figured that this would
make them super-trivial to review.
Most have no interesting commit messages aside from the subject, because
the subject says it all.
Compile-tested only, TBH.
Thanks,
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 01/19] xfs: remove unused tp arg from xfs_bmap_last_offset() and callers
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 02/19] xfs: remove unused mp arg from xfs_attr3_rmt_hdr_ok() Eric Sandeen
` (18 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
remove unused transaction pointer from various
callchains leading to xfs_bmap_last_offset().
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_bmap.c | 1 -
fs/xfs/xfs_bmap.h | 4 ++--
fs/xfs/xfs_dir2.c | 26 ++++++++++++--------------
fs/xfs/xfs_dir2.h | 4 ++--
fs/xfs/xfs_dir2_leaf.c | 2 +-
fs/xfs/xfs_dir2_node.c | 2 +-
fs/xfs/xfs_dir2_readdir.c | 2 +-
fs/xfs/xfs_iomap.c | 2 +-
8 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 152543c..b308097 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -1675,7 +1675,6 @@ xfs_bmap_isaeof(
*/
int
xfs_bmap_last_offset(
- struct xfs_trans *tp,
struct xfs_inode *ip,
xfs_fileoff_t *last_block,
int whichfork)
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 33b41f3..52ad38d 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -146,8 +146,8 @@ int xfs_bmap_first_unused(struct xfs_trans *tp, struct xfs_inode *ip,
xfs_extlen_t len, xfs_fileoff_t *unused, int whichfork);
int xfs_bmap_last_before(struct xfs_trans *tp, struct xfs_inode *ip,
xfs_fileoff_t *last_block, int whichfork);
-int xfs_bmap_last_offset(struct xfs_trans *tp, struct xfs_inode *ip,
- xfs_fileoff_t *unused, int whichfork);
+int xfs_bmap_last_offset(struct xfs_inode *ip, xfs_fileoff_t *unused,
+ int whichfork);
int xfs_bmap_one_block(struct xfs_inode *ip, int whichfork);
int xfs_bmap_read_extents(struct xfs_trans *tp, struct xfs_inode *ip,
int whichfork);
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index ce16ef0..7575a3b 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -230,11 +230,11 @@ xfs_dir_createname(
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
rval = xfs_dir2_sf_addname(&args);
- else if ((rval = xfs_dir2_isblock(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isblock(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_block_addname(&args);
- else if ((rval = xfs_dir2_isleaf(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isleaf(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_leaf_addname(&args);
@@ -303,11 +303,11 @@ xfs_dir_lookup(
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
rval = xfs_dir2_sf_lookup(&args);
- else if ((rval = xfs_dir2_isblock(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isblock(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_block_lookup(&args);
- else if ((rval = xfs_dir2_isleaf(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isleaf(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_leaf_lookup(&args);
@@ -360,11 +360,11 @@ xfs_dir_removename(
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
rval = xfs_dir2_sf_removename(&args);
- else if ((rval = xfs_dir2_isblock(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isblock(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_block_removename(&args);
- else if ((rval = xfs_dir2_isleaf(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isleaf(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_leaf_removename(&args);
@@ -410,11 +410,11 @@ xfs_dir_replace(
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
rval = xfs_dir2_sf_replace(&args);
- else if ((rval = xfs_dir2_isblock(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isblock(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_block_replace(&args);
- else if ((rval = xfs_dir2_isleaf(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isleaf(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_leaf_replace(&args);
@@ -456,11 +456,11 @@ xfs_dir_canenter(
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
rval = xfs_dir2_sf_addname(&args);
- else if ((rval = xfs_dir2_isblock(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isblock(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_block_addname(&args);
- else if ((rval = xfs_dir2_isleaf(tp, dp, &v)))
+ else if ((rval = xfs_dir2_isleaf(dp, &v)))
return rval;
else if (v)
rval = xfs_dir2_leaf_addname(&args);
@@ -525,7 +525,6 @@ xfs_dir2_grow_inode(
*/
int
xfs_dir2_isblock(
- xfs_trans_t *tp,
xfs_inode_t *dp,
int *vp) /* out: 1 is block, 0 is not block */
{
@@ -534,7 +533,7 @@ xfs_dir2_isblock(
int rval;
mp = dp->i_mount;
- if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK)))
+ if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK)))
return rval;
rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize;
ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize);
@@ -547,7 +546,6 @@ xfs_dir2_isblock(
*/
int
xfs_dir2_isleaf(
- xfs_trans_t *tp,
xfs_inode_t *dp,
int *vp) /* out: 1 is leaf, 0 is not leaf */
{
@@ -556,7 +554,7 @@ xfs_dir2_isleaf(
int rval;
mp = dp->i_mount;
- if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK)))
+ if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK)))
return rval;
*vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog);
return 0;
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h
index cec70e0..64a6b19 100644
--- a/fs/xfs/xfs_dir2.h
+++ b/fs/xfs/xfs_dir2.h
@@ -142,8 +142,8 @@ extern int xfs_dir2_sf_to_block(struct xfs_da_args *args);
/*
* Interface routines used by userspace utilities
*/
-extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *r);
-extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *r);
+extern int xfs_dir2_isblock(struct xfs_inode *dp, int *r);
+extern int xfs_dir2_isleaf(struct xfs_inode *dp, int *r);
extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
struct xfs_buf *bp);
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index ae47ec6..f8170bc 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -1707,7 +1707,7 @@ xfs_dir2_node_to_leaf(
/*
* Get the last offset in the file.
*/
- if ((error = xfs_bmap_last_offset(tp, dp, &fo, XFS_DATA_FORK))) {
+ if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK))) {
return error;
}
fo -= mp->m_dirblkfsbs;
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index 48c7d18..807946d 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -1726,7 +1726,7 @@ xfs_dir2_node_addname_int(
if (dbno == -1) {
xfs_fileoff_t fo; /* freespace block number */
- if ((error = xfs_bmap_last_offset(tp, dp, &fo, XFS_DATA_FORK)))
+ if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK)))
return error;
lastfbno = xfs_dir2_da_to_db(mp, (xfs_dablk_t)fo);
fbno = ifbno;
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index aead369..a18000f 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -687,7 +687,7 @@ xfs_readdir(
lock_mode = xfs_ilock_data_map_shared(dp);
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
rval = xfs_dir2_sf_getdents(dp, ctx);
- else if ((rval = xfs_dir2_isblock(NULL, dp, &v)))
+ else if ((rval = xfs_dir2_isblock(dp, &v)))
;
else if (v)
rval = xfs_dir2_block_getdents(dp, ctx);
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 22d1cbe..2b2739c 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -734,7 +734,7 @@ xfs_iomap_write_allocate(
*/
nimaps = 1;
end_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip));
- error = xfs_bmap_last_offset(NULL, ip, &last_block,
+ error = xfs_bmap_last_offset(ip, &last_block,
XFS_DATA_FORK);
if (error)
goto trans_cancel;
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 02/19] xfs: remove unused mp arg from xfs_attr3_rmt_hdr_ok()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
2014-04-07 19:58 ` [PATCH 01/19] xfs: remove unused tp arg from xfs_bmap_last_offset() and callers Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 03/19] xfs: remove unused mp arg from xfs_bmdr_maxrecs() Eric Sandeen
` (17 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_attr_remote.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_attr_remote.c b/fs/xfs/xfs_attr_remote.c
index 5549d69..90b2b58 100644
--- a/fs/xfs/xfs_attr_remote.c
+++ b/fs/xfs/xfs_attr_remote.c
@@ -68,7 +68,6 @@ xfs_attr3_rmt_blocks(
*/
static bool
xfs_attr3_rmt_hdr_ok(
- struct xfs_mount *mp,
void *ptr,
xfs_ino_t ino,
uint32_t offset,
@@ -254,7 +253,7 @@ xfs_attr_rmtval_copyout(
byte_cnt = min(*valuelen, byte_cnt);
if (xfs_sb_version_hascrc(&mp->m_sb)) {
- if (!xfs_attr3_rmt_hdr_ok(mp, src, ino, *offset,
+ if (!xfs_attr3_rmt_hdr_ok(src, ino, *offset,
byte_cnt, bno)) {
xfs_alert(mp,
"remote attribute header mismatch bno/off/len/owner (0x%llx/0x%x/Ox%x/0x%llx)",
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 03/19] xfs: remove unused mp arg from xfs_bmdr_maxrecs()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
2014-04-07 19:58 ` [PATCH 01/19] xfs: remove unused tp arg from xfs_bmap_last_offset() and callers Eric Sandeen
2014-04-07 19:58 ` [PATCH 02/19] xfs: remove unused mp arg from xfs_attr3_rmt_hdr_ok() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 04/19] xfs: remove unused mp arg from xfs_bmap_forkoff_reset() Eric Sandeen
` (16 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_bmap.c | 2 +-
fs/xfs/xfs_bmap_btree.c | 8 +++-----
fs/xfs/xfs_bmap_btree.h | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index b308097..eeb673b 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -94,7 +94,7 @@ xfs_bmap_compute_maxlevels(
maxleafents = MAXAEXTNUM;
sz = XFS_BMDR_SPACE_CALC(MINABTPTRS);
}
- maxrootrecs = xfs_bmdr_maxrecs(mp, sz, 0);
+ maxrootrecs = xfs_bmdr_maxrecs(sz, 0);
minleafrecs = mp->m_bmap_dmnr[0];
minnoderecs = mp->m_bmap_dmnr[1];
maxblocks = (maxleafents + minleafrecs - 1) / minleafrecs;
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index 706bc3f..a9d6b7b 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -84,7 +84,7 @@ xfs_bmdr_to_bmbt(
rblock->bb_level = dblock->bb_level;
ASSERT(be16_to_cpu(rblock->bb_level) > 0);
rblock->bb_numrecs = dblock->bb_numrecs;
- dmxr = xfs_bmdr_maxrecs(mp, dblocklen, 0);
+ dmxr = xfs_bmdr_maxrecs(dblocklen, 0);
fkp = XFS_BMDR_KEY_ADDR(dblock, 1);
tkp = XFS_BMBT_KEY_ADDR(mp, rblock, 1);
fpp = XFS_BMDR_PTR_ADDR(dblock, 1, dmxr);
@@ -443,7 +443,7 @@ xfs_bmbt_to_bmdr(
ASSERT(rblock->bb_level != 0);
dblock->bb_level = rblock->bb_level;
dblock->bb_numrecs = rblock->bb_numrecs;
- dmxr = xfs_bmdr_maxrecs(mp, dblocklen, 0);
+ dmxr = xfs_bmdr_maxrecs(dblocklen, 0);
fkp = XFS_BMBT_KEY_ADDR(mp, rblock, 1);
tkp = XFS_BMDR_KEY_ADDR(dblock, 1);
fpp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, rblocklen);
@@ -672,8 +672,7 @@ xfs_bmbt_get_dmaxrecs(
{
if (level != cur->bc_nlevels - 1)
return cur->bc_mp->m_bmap_dmxr[level != 0];
- return xfs_bmdr_maxrecs(cur->bc_mp, cur->bc_private.b.forksize,
- level == 0);
+ return xfs_bmdr_maxrecs(cur->bc_private.b.forksize, level == 0);
}
STATIC void
@@ -914,7 +913,6 @@ xfs_bmbt_maxrecs(
*/
int
xfs_bmdr_maxrecs(
- struct xfs_mount *mp,
int blocklen,
int leaf)
{
diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h
index 6e42e1e..819a8a4 100644
--- a/fs/xfs/xfs_bmap_btree.h
+++ b/fs/xfs/xfs_bmap_btree.h
@@ -130,7 +130,7 @@ extern void xfs_bmbt_to_bmdr(struct xfs_mount *, struct xfs_btree_block *, int,
xfs_bmdr_block_t *, int);
extern int xfs_bmbt_get_maxrecs(struct xfs_btree_cur *, int level);
-extern int xfs_bmdr_maxrecs(struct xfs_mount *, int blocklen, int leaf);
+extern int xfs_bmdr_maxrecs(int blocklen, int leaf);
extern int xfs_bmbt_maxrecs(struct xfs_mount *, int blocklen, int leaf);
extern int xfs_bmbt_change_owner(struct xfs_trans *tp, struct xfs_inode *ip,
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 04/19] xfs: remove unused mp arg from xfs_bmap_forkoff_reset()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (2 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 03/19] xfs: remove unused mp arg from xfs_bmdr_maxrecs() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 05/19] xfs: remove unused level arg from xfs_btree_read_buf_block() Eric Sandeen
` (15 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_bmap.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index eeb673b..03b6ff2 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -233,7 +233,6 @@ xfs_default_attroffset(
*/
STATIC void
xfs_bmap_forkoff_reset(
- xfs_mount_t *mp,
xfs_inode_t *ip,
int whichfork)
{
@@ -905,7 +904,7 @@ xfs_bmap_local_to_extents_empty(
ASSERT(ifp->if_bytes == 0);
ASSERT(XFS_IFORK_NEXTENTS(ip, whichfork) == 0);
- xfs_bmap_forkoff_reset(ip->i_mount, ip, whichfork);
+ xfs_bmap_forkoff_reset(ip, whichfork);
ifp->if_flags &= ~XFS_IFINLINE;
ifp->if_flags |= XFS_IFEXTENTS;
XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_EXTENTS);
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 05/19] xfs: remove unused level arg from xfs_btree_read_buf_block()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (3 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 04/19] xfs: remove unused mp arg from xfs_bmap_forkoff_reset() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 06/19] xfs: remove unused blocksize arg from xfs_setsize_buftarg() Eric Sandeen
` (14 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_btree.c | 32 +++++++++++++-------------------
1 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index 9adaae4..e20d61b 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -1161,7 +1161,6 @@ STATIC int
xfs_btree_read_buf_block(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *ptr,
- int level,
int flags,
struct xfs_btree_block **block,
struct xfs_buf **bpp)
@@ -1519,8 +1518,8 @@ xfs_btree_increment(
union xfs_btree_ptr *ptrp;
ptrp = xfs_btree_ptr_addr(cur, cur->bc_ptrs[lev], block);
- error = xfs_btree_read_buf_block(cur, ptrp, --lev,
- 0, &block, &bp);
+ --lev;
+ error = xfs_btree_read_buf_block(cur, ptrp, 0, &block, &bp);
if (error)
goto error0;
@@ -1618,8 +1617,8 @@ xfs_btree_decrement(
union xfs_btree_ptr *ptrp;
ptrp = xfs_btree_ptr_addr(cur, cur->bc_ptrs[lev], block);
- error = xfs_btree_read_buf_block(cur, ptrp, --lev,
- 0, &block, &bp);
+ --lev;
+ error = xfs_btree_read_buf_block(cur, ptrp, 0, &block, &bp);
if (error)
goto error0;
xfs_btree_setbuf(cur, lev, bp);
@@ -1669,7 +1668,7 @@ xfs_btree_lookup_get_block(
return 0;
}
- error = xfs_btree_read_buf_block(cur, pp, level, 0, blkp, &bp);
+ error = xfs_btree_read_buf_block(cur, pp, 0, blkp, &bp);
if (error)
return error;
@@ -2020,7 +2019,7 @@ xfs_btree_lshift(
goto out0;
/* Set up the left neighbor as "left". */
- error = xfs_btree_read_buf_block(cur, &lptr, level, 0, &left, &lbp);
+ error = xfs_btree_read_buf_block(cur, &lptr, 0, &left, &lbp);
if (error)
goto error0;
@@ -2204,7 +2203,7 @@ xfs_btree_rshift(
goto out0;
/* Set up the right neighbor as "right". */
- error = xfs_btree_read_buf_block(cur, &rptr, level, 0, &right, &rbp);
+ error = xfs_btree_read_buf_block(cur, &rptr, 0, &right, &rbp);
if (error)
goto error0;
@@ -2472,7 +2471,7 @@ xfs_btree_split(
* point back to right instead of to left.
*/
if (!xfs_btree_ptr_is_null(cur, &rrptr)) {
- error = xfs_btree_read_buf_block(cur, &rrptr, level,
+ error = xfs_btree_read_buf_block(cur, &rrptr,
0, &rrblock, &rrbp);
if (error)
goto error0;
@@ -2686,8 +2685,7 @@ xfs_btree_new_root(
lbp = bp;
xfs_btree_buf_to_ptr(cur, lbp, &lptr);
left = block;
- error = xfs_btree_read_buf_block(cur, &rptr,
- cur->bc_nlevels - 1, 0, &right, &rbp);
+ error = xfs_btree_read_buf_block(cur, &rptr, 0, &right, &rbp);
if (error)
goto error0;
bp = rbp;
@@ -2698,8 +2696,7 @@ xfs_btree_new_root(
xfs_btree_buf_to_ptr(cur, rbp, &rptr);
right = block;
xfs_btree_get_sibling(cur, right, &lptr, XFS_BB_LEFTSIB);
- error = xfs_btree_read_buf_block(cur, &lptr,
- cur->bc_nlevels - 1, 0, &left, &lbp);
+ error = xfs_btree_read_buf_block(cur, &lptr, 0, &left, &lbp);
if (error)
goto error0;
bp = lbp;
@@ -3651,8 +3648,7 @@ xfs_btree_delrec(
rptr = cptr;
right = block;
rbp = bp;
- error = xfs_btree_read_buf_block(cur, &lptr, level,
- 0, &left, &lbp);
+ error = xfs_btree_read_buf_block(cur, &lptr, 0, &left, &lbp);
if (error)
goto error0;
@@ -3669,8 +3665,7 @@ xfs_btree_delrec(
lptr = cptr;
left = block;
lbp = bp;
- error = xfs_btree_read_buf_block(cur, &rptr, level,
- 0, &right, &rbp);
+ error = xfs_btree_read_buf_block(cur, &rptr, 0, &right, &rbp);
if (error)
goto error0;
@@ -3742,8 +3737,7 @@ xfs_btree_delrec(
/* If there is a right sibling, point it to the remaining block. */
xfs_btree_get_sibling(cur, left, &cptr, XFS_BB_RIGHTSIB);
if (!xfs_btree_ptr_is_null(cur, &cptr)) {
- error = xfs_btree_read_buf_block(cur, &cptr, level,
- 0, &rrblock, &rrbp);
+ error = xfs_btree_read_buf_block(cur, &cptr, 0, &rrblock, &rrbp);
if (error)
goto error0;
xfs_btree_set_sibling(cur, rrblock, &lptr, XFS_BB_LEFTSIB);
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 06/19] xfs: remove unused blocksize arg from xfs_setsize_buftarg()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (4 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 05/19] xfs: remove unused level arg from xfs_btree_read_buf_block() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 07/19] xfs: remove unused args from xfs_alloc_buftarg() Eric Sandeen
` (13 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_buf.c | 4 +---
fs/xfs/xfs_buf.h | 2 +-
fs/xfs/xfs_super.c | 5 +----
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 9c061ef..03742ea 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1596,7 +1596,6 @@ xfs_free_buftarg(
int
xfs_setsize_buftarg(
xfs_buftarg_t *btp,
- unsigned int blocksize,
unsigned int sectorsize)
{
/* Set up metadata sector size info */
@@ -1631,8 +1630,7 @@ xfs_setsize_buftarg_early(
xfs_buftarg_t *btp,
struct block_device *bdev)
{
- return xfs_setsize_buftarg(btp, PAGE_SIZE,
- bdev_logical_block_size(bdev));
+ return xfs_setsize_buftarg(btp, bdev_logical_block_size(bdev));
}
xfs_buftarg_t *
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index 9953395..0aee9b8 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -376,7 +376,7 @@ extern xfs_buftarg_t *xfs_alloc_buftarg(struct xfs_mount *,
struct block_device *, int, const char *);
extern void xfs_free_buftarg(struct xfs_mount *, struct xfs_buftarg *);
extern void xfs_wait_buftarg(xfs_buftarg_t *);
-extern int xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int, unsigned int);
+extern int xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int);
#define xfs_getsize_buftarg(buftarg) block_size((buftarg)->bt_bdev)
#define xfs_readonly_buftarg(buftarg) bdev_read_only((buftarg)->bt_bdev)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index d971f49..c10197e 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -811,8 +811,7 @@ xfs_setup_devices(
{
int error;
- error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_blocksize,
- mp->m_sb.sb_sectsize);
+ error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_sectsize);
if (error)
return error;
@@ -822,14 +821,12 @@ xfs_setup_devices(
if (xfs_sb_version_hassector(&mp->m_sb))
log_sector_size = mp->m_sb.sb_logsectsize;
error = xfs_setsize_buftarg(mp->m_logdev_targp,
- mp->m_sb.sb_blocksize,
log_sector_size);
if (error)
return error;
}
if (mp->m_rtdev_targp) {
error = xfs_setsize_buftarg(mp->m_rtdev_targp,
- mp->m_sb.sb_blocksize,
mp->m_sb.sb_sectsize);
if (error)
return error;
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 07/19] xfs: remove unused args from xfs_alloc_buftarg()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (5 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 06/19] xfs: remove unused blocksize arg from xfs_setsize_buftarg() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 08/19] xfs: remove unused flags arg from _xfs_buf_get_pages() Eric Sandeen
` (12 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_buf.c | 4 +---
fs/xfs/xfs_buf.h | 2 +-
fs/xfs/xfs_super.c | 8 +++-----
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 03742ea..3b48a57 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1636,9 +1636,7 @@ xfs_setsize_buftarg_early(
xfs_buftarg_t *
xfs_alloc_buftarg(
struct xfs_mount *mp,
- struct block_device *bdev,
- int external,
- const char *fsname)
+ struct block_device *bdev)
{
xfs_buftarg_t *btp;
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index 0aee9b8..f10e8c9 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -373,7 +373,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp)
* Handling of buftargs.
*/
extern xfs_buftarg_t *xfs_alloc_buftarg(struct xfs_mount *,
- struct block_device *, int, const char *);
+ struct block_device *);
extern void xfs_free_buftarg(struct xfs_mount *, struct xfs_buftarg *);
extern void xfs_wait_buftarg(xfs_buftarg_t *);
extern int xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int);
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index c10197e..20b2ddf 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -765,20 +765,18 @@ xfs_open_devices(
* Setup xfs_mount buffer target pointers
*/
error = ENOMEM;
- mp->m_ddev_targp = xfs_alloc_buftarg(mp, ddev, 0, mp->m_fsname);
+ mp->m_ddev_targp = xfs_alloc_buftarg(mp, ddev);
if (!mp->m_ddev_targp)
goto out_close_rtdev;
if (rtdev) {
- mp->m_rtdev_targp = xfs_alloc_buftarg(mp, rtdev, 1,
- mp->m_fsname);
+ mp->m_rtdev_targp = xfs_alloc_buftarg(mp, rtdev);
if (!mp->m_rtdev_targp)
goto out_free_ddev_targ;
}
if (logdev && logdev != ddev) {
- mp->m_logdev_targp = xfs_alloc_buftarg(mp, logdev, 1,
- mp->m_fsname);
+ mp->m_logdev_targp = xfs_alloc_buftarg(mp, logdev);
if (!mp->m_logdev_targp)
goto out_free_rtdev_targ;
} else {
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 08/19] xfs: remove unused flags arg from _xfs_buf_get_pages()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (6 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 07/19] xfs: remove unused args from xfs_alloc_buftarg() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 09/19] xfs: remove unused bip arg from xfs_buf_item_log_segment() Eric Sandeen
` (11 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_buf.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 3b48a57..2423741 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -216,8 +216,7 @@ _xfs_buf_alloc(
STATIC int
_xfs_buf_get_pages(
xfs_buf_t *bp,
- int page_count,
- xfs_buf_flags_t flags)
+ int page_count)
{
/* Make sure that we have a page list */
if (bp->b_pages == NULL) {
@@ -330,7 +329,7 @@ use_alloc_page:
end = (BBTOB(bp->b_maps[0].bm_bn + bp->b_length) + PAGE_SIZE - 1)
>> PAGE_SHIFT;
page_count = end - start;
- error = _xfs_buf_get_pages(bp, page_count, flags);
+ error = _xfs_buf_get_pages(bp, page_count);
if (unlikely(error))
return error;
@@ -767,7 +766,7 @@ xfs_buf_associate_memory(
bp->b_pages = NULL;
bp->b_addr = mem;
- rval = _xfs_buf_get_pages(bp, page_count, 0);
+ rval = _xfs_buf_get_pages(bp, page_count);
if (rval)
return rval;
@@ -800,7 +799,7 @@ xfs_buf_get_uncached(
goto fail;
page_count = PAGE_ALIGN(numblks << BBSHIFT) >> PAGE_SHIFT;
- error = _xfs_buf_get_pages(bp, page_count, 0);
+ error = _xfs_buf_get_pages(bp, page_count);
if (error)
goto fail_free_buf;
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 09/19] xfs: remove unused bip arg from xfs_buf_item_log_segment()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (7 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 08/19] xfs: remove unused flags arg from _xfs_buf_get_pages() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 10/19] xfs: remove unused tp arg from xfs_da_reada_buf & callers Eric Sandeen
` (10 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_buf_item.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 3314911..a5cd696 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -826,7 +826,6 @@ xfs_buf_item_init(
*/
static void
xfs_buf_item_log_segment(
- struct xfs_buf_log_item *bip,
uint first,
uint last,
uint *map)
@@ -934,7 +933,7 @@ xfs_buf_item_log(
if (end > last)
end = last;
- xfs_buf_item_log_segment(bip, first, end,
+ xfs_buf_item_log_segment(first, end,
&bip->bli_formats[i].blf_data_map[0]);
start += bp->b_maps[i].bm_len;
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 10/19] xfs: remove unused tp arg from xfs_da_reada_buf & callers
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (8 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 09/19] xfs: remove unused bip arg from xfs_buf_item_log_segment() Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 11/19] xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions Eric Sandeen
` (9 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
This one hits a few functions as we unravel the unused arg
up through the callers.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_da_btree.c | 8 +++-----
fs/xfs/xfs_da_btree.h | 6 +++---
fs/xfs/xfs_dir2_data.c | 3 +--
fs/xfs/xfs_dir2_priv.h | 4 ++--
fs/xfs/xfs_dir2_readdir.c | 4 ++--
fs/xfs/xfs_file.c | 2 +-
6 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 796272a..da4692e 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -2461,7 +2461,6 @@ xfs_buf_map_from_irec(
*/
static int
xfs_dabuf_map(
- struct xfs_trans *trans,
struct xfs_inode *dp,
xfs_dablk_t bno,
xfs_daddr_t mappedbno,
@@ -2557,7 +2556,7 @@ xfs_da_get_buf(
*bpp = NULL;
mapp = ↦
nmap = 1;
- error = xfs_dabuf_map(trans, dp, bno, mappedbno, whichfork,
+ error = xfs_dabuf_map(dp, bno, mappedbno, whichfork,
&mapp, &nmap);
if (error) {
/* mapping a hole is not an error, but we don't continue */
@@ -2605,7 +2604,7 @@ xfs_da_read_buf(
*bpp = NULL;
mapp = ↦
nmap = 1;
- error = xfs_dabuf_map(trans, dp, bno, mappedbno, whichfork,
+ error = xfs_dabuf_map(dp, bno, mappedbno, whichfork,
&mapp, &nmap);
if (error) {
/* mapping a hole is not an error, but we don't continue */
@@ -2678,7 +2677,6 @@ out_free:
*/
xfs_daddr_t
xfs_da_reada_buf(
- struct xfs_trans *trans,
struct xfs_inode *dp,
xfs_dablk_t bno,
xfs_daddr_t mappedbno,
@@ -2692,7 +2690,7 @@ xfs_da_reada_buf(
mapp = ↦
nmap = 1;
- error = xfs_dabuf_map(trans, dp, bno, mappedbno, whichfork,
+ error = xfs_dabuf_map(dp, bno, mappedbno, whichfork,
&mapp, &nmap);
if (error) {
/* mapping a hole is not an error, but we don't continue */
diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h
index 6e95ea7..4cc6a46 100644
--- a/fs/xfs/xfs_da_btree.h
+++ b/fs/xfs/xfs_da_btree.h
@@ -183,9 +183,9 @@ int xfs_da_read_buf(struct xfs_trans *trans, struct xfs_inode *dp,
xfs_dablk_t bno, xfs_daddr_t mappedbno,
struct xfs_buf **bpp, int whichfork,
const struct xfs_buf_ops *ops);
-xfs_daddr_t xfs_da_reada_buf(struct xfs_trans *trans, struct xfs_inode *dp,
- xfs_dablk_t bno, xfs_daddr_t mapped_bno,
- int whichfork, const struct xfs_buf_ops *ops);
+xfs_daddr_t xfs_da_reada_buf(struct xfs_inode *dp, xfs_dablk_t bno,
+ xfs_daddr_t mapped_bno, int whichfork,
+ const struct xfs_buf_ops *ops);
int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
struct xfs_buf *dead_buf);
diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c
index 70acff4..b00df36 100644
--- a/fs/xfs/xfs_dir2_data.c
+++ b/fs/xfs/xfs_dir2_data.c
@@ -329,12 +329,11 @@ xfs_dir3_data_read(
int
xfs_dir3_data_readahead(
- struct xfs_trans *tp,
struct xfs_inode *dp,
xfs_dablk_t bno,
xfs_daddr_t mapped_bno)
{
- return xfs_da_reada_buf(tp, dp, bno, mapped_bno,
+ return xfs_da_reada_buf(dp, bno, mapped_bno,
XFS_DATA_FORK, &xfs_dir3_data_reada_buf_ops);
}
diff --git a/fs/xfs/xfs_dir2_priv.h b/fs/xfs/xfs_dir2_priv.h
index 8b9d228..2429960 100644
--- a/fs/xfs/xfs_dir2_priv.h
+++ b/fs/xfs/xfs_dir2_priv.h
@@ -54,8 +54,8 @@ extern int xfs_dir2_leaf_to_block(struct xfs_da_args *args,
extern int __xfs_dir3_data_check(struct xfs_inode *dp, struct xfs_buf *bp);
extern int xfs_dir3_data_read(struct xfs_trans *tp, struct xfs_inode *dp,
xfs_dablk_t bno, xfs_daddr_t mapped_bno, struct xfs_buf **bpp);
-extern int xfs_dir3_data_readahead(struct xfs_trans *tp, struct xfs_inode *dp,
- xfs_dablk_t bno, xfs_daddr_t mapped_bno);
+extern int xfs_dir3_data_readahead(struct xfs_inode *dp, xfs_dablk_t bno,
+ xfs_daddr_t mapped_bno);
extern struct xfs_dir2_data_free *
xfs_dir2_data_freeinsert(struct xfs_dir2_data_hdr *hdr,
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index a18000f..a99967b 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -434,7 +434,7 @@ xfs_dir2_leaf_readbuf(
*/
if (i > mip->ra_current &&
map[mip->ra_index].br_blockcount >= mp->m_dirblkfsbs) {
- xfs_dir3_data_readahead(NULL, dp,
+ xfs_dir3_data_readahead(dp,
map[mip->ra_index].br_startoff + mip->ra_offset,
XFS_FSB_TO_DADDR(mp,
map[mip->ra_index].br_startblock +
@@ -447,7 +447,7 @@ xfs_dir2_leaf_readbuf(
* use our mapping, but this is a very rare case.
*/
else if (i > mip->ra_current) {
- xfs_dir3_data_readahead(NULL, dp,
+ xfs_dir3_data_readahead(dp,
map[mip->ra_index].br_startoff +
mip->ra_offset, -1);
mip->ra_current = i;
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 64b48ea..340f2af 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -917,7 +917,7 @@ xfs_dir_open(
*/
mode = xfs_ilock_data_map_shared(ip);
if (ip->i_d.di_nextents > 0)
- xfs_dir3_data_readahead(NULL, ip, 0, -1);
+ xfs_dir3_data_readahead(ip, 0, -1);
xfs_iunlock(ip, mode);
return 0;
}
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 11/19] xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (9 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 10/19] xfs: remove unused tp arg from xfs_da_reada_buf & callers Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:58 ` [PATCH 12/19] xfs: remove unused mp arg from xfs_calc_dquots_per_chunk() Eric Sandeen
` (8 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_da_format.h | 10 +++++-----
fs/xfs/xfs_dir2_block.c | 8 ++++----
fs/xfs/xfs_dir2_readdir.c | 8 ++++----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/xfs/xfs_da_format.h b/fs/xfs/xfs_da_format.h
index a19d3f8..1432b57 100644
--- a/fs/xfs/xfs_da_format.h
+++ b/fs/xfs/xfs_da_format.h
@@ -541,7 +541,7 @@ xfs_dir2_leaf_bests_p(struct xfs_dir2_leaf_tail *ltp)
* Convert dataptr to byte in file space
*/
static inline xfs_dir2_off_t
-xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
+xfs_dir2_dataptr_to_byte(xfs_dir2_dataptr_t dp)
{
return (xfs_dir2_off_t)dp << XFS_DIR2_DATA_ALIGN_LOG;
}
@@ -550,7 +550,7 @@ xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
* Convert byte in file space to dataptr. It had better be aligned.
*/
static inline xfs_dir2_dataptr_t
-xfs_dir2_byte_to_dataptr(struct xfs_mount *mp, xfs_dir2_off_t by)
+xfs_dir2_byte_to_dataptr(xfs_dir2_off_t by)
{
return (xfs_dir2_dataptr_t)(by >> XFS_DIR2_DATA_ALIGN_LOG);
}
@@ -571,7 +571,7 @@ xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by)
static inline xfs_dir2_db_t
xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
{
- return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(mp, dp));
+ return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(dp));
}
/*
@@ -590,7 +590,7 @@ xfs_dir2_byte_to_off(struct xfs_mount *mp, xfs_dir2_off_t by)
static inline xfs_dir2_data_aoff_t
xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
{
- return xfs_dir2_byte_to_off(mp, xfs_dir2_dataptr_to_byte(mp, dp));
+ return xfs_dir2_byte_to_off(mp, xfs_dir2_dataptr_to_byte(dp));
}
/*
@@ -629,7 +629,7 @@ static inline xfs_dir2_dataptr_t
xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db,
xfs_dir2_data_aoff_t o)
{
- return xfs_dir2_byte_to_dataptr(mp, xfs_dir2_db_off_to_byte(mp, db, o));
+ return xfs_dir2_byte_to_dataptr(xfs_dir2_db_off_to_byte(mp, db, o));
}
/*
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c
index 90cdbf4..976842e 100644
--- a/fs/xfs/xfs_dir2_block.c
+++ b/fs/xfs/xfs_dir2_block.c
@@ -536,7 +536,7 @@ xfs_dir2_block_addname(
* Fill in the leaf entry.
*/
blp[mid].hashval = cpu_to_be32(args->hashval);
- blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp,
+ blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr));
xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh);
/*
@@ -1169,7 +1169,7 @@ xfs_dir2_sf_to_block(
*tagp = cpu_to_be16((char *)dep - (char *)hdr);
xfs_dir2_data_log_entry(tp, dp, bp, dep);
blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot);
- blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp,
+ blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr));
/*
* Create entry for ..
@@ -1183,7 +1183,7 @@ xfs_dir2_sf_to_block(
*tagp = cpu_to_be16((char *)dep - (char *)hdr);
xfs_dir2_data_log_entry(tp, dp, bp, dep);
blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot);
- blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp,
+ blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr));
offset = dp->d_ops->data_first_offset;
/*
@@ -1237,7 +1237,7 @@ xfs_dir2_sf_to_block(
name.len = sfep->namelen;
blp[2 + i].hashval = cpu_to_be32(mp->m_dirnameops->
hashname(&name));
- blp[2 + i].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp,
+ blp[2 + i].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr));
offset = (int)((char *)(tagp + 1) - (char *)hdr);
if (++i == sfp->count)
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index a99967b..50b72f7 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -531,7 +531,7 @@ xfs_dir2_leaf_getdents(
* Inside the loop we keep the main offset value as a byte offset
* in the directory file.
*/
- curoff = xfs_dir2_dataptr_to_byte(mp, ctx->pos);
+ curoff = xfs_dir2_dataptr_to_byte(ctx->pos);
/*
* Force this conversion through db so we truncate the offset
@@ -635,7 +635,7 @@ xfs_dir2_leaf_getdents(
length = dp->d_ops->data_entsize(dep->namelen);
filetype = dp->d_ops->data_get_ftype(dep);
- ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff;
+ ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
if (!dir_emit(ctx, (char *)dep->name, dep->namelen,
be64_to_cpu(dep->inumber),
xfs_dir3_get_dtype(mp, filetype)))
@@ -653,10 +653,10 @@ xfs_dir2_leaf_getdents(
/*
* All done. Set output offset value to current offset.
*/
- if (curoff > xfs_dir2_dataptr_to_byte(mp, XFS_DIR2_MAX_DATAPTR))
+ if (curoff > xfs_dir2_dataptr_to_byte(XFS_DIR2_MAX_DATAPTR))
ctx->pos = XFS_DIR2_MAX_DATAPTR & 0x7fffffff;
else
- ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff;
+ ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
kmem_free(map_info);
if (bp)
xfs_trans_brelse(NULL, bp);
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 12/19] xfs: remove unused mp arg from xfs_calc_dquots_per_chunk()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (10 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 11/19] xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions Eric Sandeen
@ 2014-04-07 19:58 ` Eric Sandeen
2014-04-07 19:59 ` [PATCH 13/19] xfs: remove unused length arg from alloc_block ops Eric Sandeen
` (7 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:58 UTC (permalink / raw)
To: xfs
And because this gets passed to xfs_bmap_local_to_extents()
as *init_fn(), change that prototype too.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_dquot_buf.c | 5 ++---
fs/xfs/xfs_qm.c | 3 +--
fs/xfs/xfs_quota_defs.h | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/xfs_dquot_buf.c b/fs/xfs/xfs_dquot_buf.c
index d401457..a470668 100644
--- a/fs/xfs/xfs_dquot_buf.c
+++ b/fs/xfs/xfs_dquot_buf.c
@@ -35,7 +35,6 @@
int
xfs_calc_dquots_per_chunk(
- struct xfs_mount *mp,
unsigned int nbblks) /* basic block units */
{
unsigned int ndquots;
@@ -194,7 +193,7 @@ xfs_dquot_buf_verify_crc(
if (mp->m_quotainfo)
ndquots = mp->m_quotainfo->qi_dqperchunk;
else
- ndquots = xfs_calc_dquots_per_chunk(mp,
+ ndquots = xfs_calc_dquots_per_chunk(
XFS_BB_TO_FSB(mp, bp->b_length));
for (i = 0; i < ndquots; i++, d++) {
@@ -225,7 +224,7 @@ xfs_dquot_buf_verify(
if (mp->m_quotainfo)
ndquots = mp->m_quotainfo->qi_dqperchunk;
else
- ndquots = xfs_calc_dquots_per_chunk(mp, bp->b_length);
+ ndquots = xfs_calc_dquots_per_chunk(bp->b_length);
/*
* On the first read of the buffer, verify that each dquot is valid.
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 348e4d2..23cc8dc 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -870,8 +870,7 @@ xfs_qm_init_quotainfo(
/* Precalc some constants */
qinf->qi_dqchunklen = XFS_FSB_TO_BB(mp, XFS_DQUOT_CLUSTER_SIZE_FSB);
- qinf->qi_dqperchunk = xfs_calc_dquots_per_chunk(mp,
- qinf->qi_dqchunklen);
+ qinf->qi_dqperchunk = xfs_calc_dquots_per_chunk(qinf->qi_dqchunklen);
mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD);
diff --git a/fs/xfs/xfs_quota_defs.h b/fs/xfs/xfs_quota_defs.h
index b3b2b10..137e209 100644
--- a/fs/xfs/xfs_quota_defs.h
+++ b/fs/xfs/xfs_quota_defs.h
@@ -156,6 +156,6 @@ typedef __uint16_t xfs_qwarncnt_t;
extern int xfs_dqcheck(struct xfs_mount *mp, xfs_disk_dquot_t *ddq,
xfs_dqid_t id, uint type, uint flags, char *str);
-extern int xfs_calc_dquots_per_chunk(struct xfs_mount *mp, unsigned int nbblks);
+extern int xfs_calc_dquots_per_chunk(unsigned int nbblks);
#endif /* __XFS_QUOTA_H__ */
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 13/19] xfs: remove unused length arg from alloc_block ops
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (11 preceding siblings ...)
2014-04-07 19:58 ` [PATCH 12/19] xfs: remove unused mp arg from xfs_calc_dquots_per_chunk() Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 19:59 ` [PATCH 14/19] xfs: remove unused pag ptr arg from iterator execute functions Eric Sandeen
` (6 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_alloc_btree.c | 1 -
fs/xfs/xfs_bmap_btree.c | 1 -
fs/xfs/xfs_btree.c | 6 +++---
fs/xfs/xfs_btree.h | 2 +-
fs/xfs/xfs_ialloc_btree.c | 1 -
5 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c
index 1308542..1abd9c3 100644
--- a/fs/xfs/xfs_alloc_btree.c
+++ b/fs/xfs/xfs_alloc_btree.c
@@ -70,7 +70,6 @@ xfs_allocbt_alloc_block(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
- int length,
int *stat)
{
int error;
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index a9d6b7b..8bdbd11 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -519,7 +519,6 @@ xfs_bmbt_alloc_block(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
- int length,
int *stat)
{
xfs_alloc_arg_t args; /* block allocation args */
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index e20d61b..752b735 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -2373,7 +2373,7 @@ xfs_btree_split(
xfs_btree_buf_to_ptr(cur, lbp, &lptr);
/* Allocate the new block. If we can't do it, we're toast. Give up. */
- error = cur->bc_ops->alloc_block(cur, &lptr, &rptr, 1, stat);
+ error = cur->bc_ops->alloc_block(cur, &lptr, &rptr, stat);
if (error)
goto error0;
if (*stat == 0)
@@ -2546,7 +2546,7 @@ xfs_btree_new_iroot(
pp = xfs_btree_ptr_addr(cur, 1, block);
/* Allocate the new block. If we can't do it, we're toast. Give up. */
- error = cur->bc_ops->alloc_block(cur, pp, &nptr, 1, stat);
+ error = cur->bc_ops->alloc_block(cur, pp, &nptr, stat);
if (error)
goto error0;
if (*stat == 0) {
@@ -2650,7 +2650,7 @@ xfs_btree_new_root(
cur->bc_ops->init_ptr_from_cur(cur, &rptr);
/* Allocate the new block. If we can't do it, we're toast. Give up. */
- error = cur->bc_ops->alloc_block(cur, &rptr, &lptr, 1, stat);
+ error = cur->bc_ops->alloc_block(cur, &rptr, &lptr, stat);
if (error)
goto error0;
if (*stat == 0)
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 91e34f2..875f687 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -129,7 +129,7 @@ struct xfs_btree_ops {
int (*alloc_block)(struct xfs_btree_cur *cur,
union xfs_btree_ptr *start_bno,
union xfs_btree_ptr *new_bno,
- int length, int *stat);
+ int *stat);
int (*free_block)(struct xfs_btree_cur *cur, struct xfs_buf *bp);
/* update last record information */
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index c8fa5bb..5121ec5 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -71,7 +71,6 @@ xfs_inobt_alloc_block(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
- int length,
int *stat)
{
xfs_alloc_arg_t args; /* block allocation args */
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 14/19] xfs: remove unused pag ptr arg from iterator execute functions
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (12 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 13/19] xfs: remove unused length arg from alloc_block ops Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 19:59 ` [PATCH 15/19] xfs: remove unused bp arg from xfs_iflush_fork() Eric Sandeen
` (5 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_icache.c | 12 ++++--------
fs/xfs/xfs_icache.h | 6 ++----
fs/xfs/xfs_qm_syscalls.c | 1 -
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 98d3524..c48df5f 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -507,8 +507,7 @@ STATIC int
xfs_inode_ag_walk(
struct xfs_mount *mp,
struct xfs_perag *pag,
- int (*execute)(struct xfs_inode *ip,
- struct xfs_perag *pag, int flags,
+ int (*execute)(struct xfs_inode *ip, int flags,
void *args),
int flags,
void *args,
@@ -582,7 +581,7 @@ restart:
for (i = 0; i < nr_found; i++) {
if (!batch[i])
continue;
- error = execute(batch[i], pag, flags, args);
+ error = execute(batch[i], flags, args);
IRELE(batch[i]);
if (error == EAGAIN) {
skipped++;
@@ -636,8 +635,7 @@ xfs_eofblocks_worker(
int
xfs_inode_ag_iterator(
struct xfs_mount *mp,
- int (*execute)(struct xfs_inode *ip,
- struct xfs_perag *pag, int flags,
+ int (*execute)(struct xfs_inode *ip, int flags,
void *args),
int flags,
void *args)
@@ -664,8 +662,7 @@ xfs_inode_ag_iterator(
int
xfs_inode_ag_iterator_tag(
struct xfs_mount *mp,
- int (*execute)(struct xfs_inode *ip,
- struct xfs_perag *pag, int flags,
+ int (*execute)(struct xfs_inode *ip, int flags,
void *args),
int flags,
void *args,
@@ -1209,7 +1206,6 @@ xfs_inode_match_id(
STATIC int
xfs_inode_free_eofblocks(
struct xfs_inode *ip,
- struct xfs_perag *pag,
int flags,
void *args)
{
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h
index 9ed68bb..9cf017b 100644
--- a/fs/xfs/xfs_icache.h
+++ b/fs/xfs/xfs_icache.h
@@ -60,12 +60,10 @@ int xfs_icache_free_eofblocks(struct xfs_mount *, struct xfs_eofblocks *);
void xfs_eofblocks_worker(struct work_struct *);
int xfs_inode_ag_iterator(struct xfs_mount *mp,
- int (*execute)(struct xfs_inode *ip, struct xfs_perag *pag,
- int flags, void *args),
+ int (*execute)(struct xfs_inode *ip, int flags, void *args),
int flags, void *args);
int xfs_inode_ag_iterator_tag(struct xfs_mount *mp,
- int (*execute)(struct xfs_inode *ip, struct xfs_perag *pag,
- int flags, void *args),
+ int (*execute)(struct xfs_inode *ip, int flags, void *args),
int flags, void *args, int tag);
static inline int
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index 3daf5ea..72cbe65 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -959,7 +959,6 @@ xfs_qm_export_flags(
STATIC int
xfs_dqrele_inode(
struct xfs_inode *ip,
- struct xfs_perag *pag,
int flags,
void *args)
{
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 15/19] xfs: remove unused bp arg from xfs_iflush_fork()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (13 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 14/19] xfs: remove unused pag ptr arg from iterator execute functions Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 19:59 ` [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote() Eric Sandeen
` (4 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_inode.c | 4 ++--
fs/xfs/xfs_inode_fork.c | 3 +--
fs/xfs/xfs_inode_fork.h | 3 +--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 3a137e9..be29b80 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -3260,9 +3260,9 @@ xfs_iflush_int(
}
}
- xfs_iflush_fork(ip, dip, iip, XFS_DATA_FORK, bp);
+ xfs_iflush_fork(ip, dip, iip, XFS_DATA_FORK);
if (XFS_IFORK_Q(ip))
- xfs_iflush_fork(ip, dip, iip, XFS_ATTR_FORK, bp);
+ xfs_iflush_fork(ip, dip, iip, XFS_ATTR_FORK);
xfs_inobp_check(mp, bp);
/*
diff --git a/fs/xfs/xfs_inode_fork.c b/fs/xfs/xfs_inode_fork.c
index 73514c0..b031e8d 100644
--- a/fs/xfs/xfs_inode_fork.c
+++ b/fs/xfs/xfs_inode_fork.c
@@ -798,8 +798,7 @@ xfs_iflush_fork(
xfs_inode_t *ip,
xfs_dinode_t *dip,
xfs_inode_log_item_t *iip,
- int whichfork,
- xfs_buf_t *bp)
+ int whichfork)
{
char *cp;
xfs_ifork_t *ifp;
diff --git a/fs/xfs/xfs_inode_fork.h b/fs/xfs/xfs_inode_fork.h
index eb329a1..7d3b1ed 100644
--- a/fs/xfs/xfs_inode_fork.h
+++ b/fs/xfs/xfs_inode_fork.h
@@ -127,8 +127,7 @@ typedef struct xfs_ifork {
int xfs_iformat_fork(struct xfs_inode *, struct xfs_dinode *);
void xfs_iflush_fork(struct xfs_inode *, struct xfs_dinode *,
- struct xfs_inode_log_item *, int,
- struct xfs_buf *);
+ struct xfs_inode_log_item *, int);
void xfs_idestroy_fork(struct xfs_inode *, int);
void xfs_idata_realloc(struct xfs_inode *, int, int);
void xfs_iroot_realloc(struct xfs_inode *, int, int);
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (14 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 15/19] xfs: remove unused bp arg from xfs_iflush_fork() Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 23:23 ` Dave Chinner
2014-04-07 19:59 ` [PATCH 17/19] xfs: remove unused xfs_mount arg from xfs_symlink_hdr_ok() Eric Sandeen
` (3 subsequent siblings)
19 siblings, 1 reply; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_bmap.c | 5 ++---
fs/xfs/xfs_shared.h | 2 +-
fs/xfs/xfs_symlink_remote.c | 1 -
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 03b6ff2..6a1e702 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -919,8 +919,7 @@ xfs_bmap_local_to_extents(
xfs_extlen_t total, /* total blocks needed by transaction */
int *logflagsp, /* inode logging flags */
int whichfork,
- void (*init_fn)(struct xfs_trans *tp,
- struct xfs_buf *bp,
+ void (*init_fn)(struct xfs_buf *bp,
struct xfs_inode *ip,
struct xfs_ifork *ifp))
{
@@ -977,7 +976,7 @@ xfs_bmap_local_to_extents(
bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0);
/* initialise the block and copy the data */
- init_fn(tp, bp, ip, ifp);
+ init_fn(bp, ip, ifp);
/* account for the change in fork size and log everything */
xfs_trans_log_buf(tp, bp, 0, ifp->if_bytes - 1);
diff --git a/fs/xfs/xfs_shared.h b/fs/xfs/xfs_shared.h
index 8c5035a..18dca8c 100644
--- a/fs/xfs/xfs_shared.h
+++ b/fs/xfs/xfs_shared.h
@@ -238,7 +238,7 @@ int xfs_symlink_hdr_set(struct xfs_mount *mp, xfs_ino_t ino, uint32_t offset,
uint32_t size, struct xfs_buf *bp);
bool xfs_symlink_hdr_ok(struct xfs_mount *mp, xfs_ino_t ino, uint32_t offset,
uint32_t size, struct xfs_buf *bp);
-void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp,
+void xfs_symlink_local_to_remote(struct xfs_buf *bp,
struct xfs_inode *ip, struct xfs_ifork *ifp);
#endif /* __XFS_SHARED_H__ */
diff --git a/fs/xfs/xfs_symlink_remote.c b/fs/xfs/xfs_symlink_remote.c
index bf59a2b..8e3045e 100644
--- a/fs/xfs/xfs_symlink_remote.c
+++ b/fs/xfs/xfs_symlink_remote.c
@@ -173,7 +173,6 @@ const struct xfs_buf_ops xfs_symlink_buf_ops = {
void
xfs_symlink_local_to_remote(
- struct xfs_trans *tp,
struct xfs_buf *bp,
struct xfs_inode *ip,
struct xfs_ifork *ifp)
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 17/19] xfs: remove unused xfs_mount arg from xfs_symlink_hdr_ok()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (15 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote() Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 19:59 ` [PATCH 18/19] xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done() Eric Sandeen
` (2 subsequent siblings)
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_shared.h | 2 +-
fs/xfs/xfs_symlink.c | 2 +-
fs/xfs/xfs_symlink_remote.c | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_shared.h b/fs/xfs/xfs_shared.h
index 18dca8c..46d0e7b 100644
--- a/fs/xfs/xfs_shared.h
+++ b/fs/xfs/xfs_shared.h
@@ -236,7 +236,7 @@ int xfs_log_calc_minimum_size(struct xfs_mount *);
int xfs_symlink_blocks(struct xfs_mount *mp, int pathlen);
int xfs_symlink_hdr_set(struct xfs_mount *mp, xfs_ino_t ino, uint32_t offset,
uint32_t size, struct xfs_buf *bp);
-bool xfs_symlink_hdr_ok(struct xfs_mount *mp, xfs_ino_t ino, uint32_t offset,
+bool xfs_symlink_hdr_ok(xfs_ino_t ino, uint32_t offset,
uint32_t size, struct xfs_buf *bp);
void xfs_symlink_local_to_remote(struct xfs_buf *bp,
struct xfs_inode *ip, struct xfs_ifork *ifp);
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index 14e58f2..3d1c3bb 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -88,7 +88,7 @@ xfs_readlink_bmap(
cur_chunk = bp->b_addr;
if (xfs_sb_version_hascrc(&mp->m_sb)) {
- if (!xfs_symlink_hdr_ok(mp, ip->i_ino, offset,
+ if (!xfs_symlink_hdr_ok(ip->i_ino, offset,
byte_cnt, bp)) {
error = EFSCORRUPTED;
xfs_alert(mp,
diff --git a/fs/xfs/xfs_symlink_remote.c b/fs/xfs/xfs_symlink_remote.c
index 8e3045e..4d873d3 100644
--- a/fs/xfs/xfs_symlink_remote.c
+++ b/fs/xfs/xfs_symlink_remote.c
@@ -80,7 +80,6 @@ xfs_symlink_hdr_set(
*/
bool
xfs_symlink_hdr_ok(
- struct xfs_mount *mp,
xfs_ino_t ino,
uint32_t offset,
uint32_t size,
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 18/19] xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (16 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 17/19] xfs: remove unused xfs_mount arg from xfs_symlink_hdr_ok() Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 19:59 ` [PATCH 19/19] xfs: remove unused trans pointer arg from xlog_recover_unmount_trans() Eric Sandeen
2014-04-07 23:28 ` [PATCH 00/19] xfs: remove a bunch of unused function args Dave Chinner
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_log_recover.c | 4 ++--
fs/xfs/xfs_trans.c | 2 +-
fs/xfs/xfs_trans_ail.c | 5 ++---
fs/xfs/xfs_trans_priv.h | 3 +--
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index bce53ac..7801052 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3145,7 +3145,7 @@ xlog_recover_efd_pass2(
}
lip = xfs_trans_ail_cursor_next(ailp, &cur);
}
- xfs_trans_ail_cursor_done(ailp, &cur);
+ xfs_trans_ail_cursor_done(&cur);
spin_unlock(&ailp->xa_lock);
return 0;
@@ -3757,7 +3757,7 @@ xlog_recover_process_efis(
lip = xfs_trans_ail_cursor_next(ailp, &cur);
}
out:
- xfs_trans_ail_cursor_done(ailp, &cur);
+ xfs_trans_ail_cursor_done(&cur);
spin_unlock(&ailp->xa_lock);
return error;
}
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index c812c5c..737eb04 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -827,7 +827,7 @@ xfs_trans_committed_bulk(
xfs_log_item_batch_insert(ailp, &cur, log_items, i, commit_lsn);
spin_lock(&ailp->xa_lock);
- xfs_trans_ail_cursor_done(ailp, &cur);
+ xfs_trans_ail_cursor_done(&cur);
spin_unlock(&ailp->xa_lock);
}
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index a728735..cb0f3a8 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -173,7 +173,6 @@ xfs_trans_ail_cursor_next(
*/
void
xfs_trans_ail_cursor_done(
- struct xfs_ail *ailp,
struct xfs_ail_cursor *cur)
{
cur->item = NULL;
@@ -368,7 +367,7 @@ xfsaild_push(
* If the AIL is empty or our push has reached the end we are
* done now.
*/
- xfs_trans_ail_cursor_done(ailp, &cur);
+ xfs_trans_ail_cursor_done(&cur);
spin_unlock(&ailp->xa_lock);
goto out_done;
}
@@ -453,7 +452,7 @@ xfsaild_push(
break;
lsn = lip->li_lsn;
}
- xfs_trans_ail_cursor_done(ailp, &cur);
+ xfs_trans_ail_cursor_done(&cur);
spin_unlock(&ailp->xa_lock);
if (xfs_buf_delwri_submit_nowait(&ailp->xa_buf_list))
diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h
index 12e86af..bd12818 100644
--- a/fs/xfs/xfs_trans_priv.h
+++ b/fs/xfs/xfs_trans_priv.h
@@ -133,8 +133,7 @@ struct xfs_log_item * xfs_trans_ail_cursor_last(struct xfs_ail *ailp,
xfs_lsn_t lsn);
struct xfs_log_item * xfs_trans_ail_cursor_next(struct xfs_ail *ailp,
struct xfs_ail_cursor *cur);
-void xfs_trans_ail_cursor_done(struct xfs_ail *ailp,
- struct xfs_ail_cursor *cur);
+void xfs_trans_ail_cursor_done(struct xfs_ail_cursor *cur);
#if BITS_PER_LONG != 64
static inline void
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 19/19] xfs: remove unused trans pointer arg from xlog_recover_unmount_trans()
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (17 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 18/19] xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done() Eric Sandeen
@ 2014-04-07 19:59 ` Eric Sandeen
2014-04-07 23:28 ` [PATCH 00/19] xfs: remove a bunch of unused function args Dave Chinner
19 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 19:59 UTC (permalink / raw)
To: xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/xfs_log_recover.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 7801052..690a64d 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3520,8 +3520,7 @@ out:
STATIC int
xlog_recover_unmount_trans(
- struct xlog *log,
- struct xlog_recover *trans)
+ struct xlog *log)
{
/* Do nothing now */
xfs_warn(log->l_mp, "%s: Unmount LR", __func__);
@@ -3595,7 +3594,7 @@ xlog_recover_process_data(
trans, pass);
break;
case XLOG_UNMOUNT_TRANS:
- error = xlog_recover_unmount_trans(log, trans);
+ error = xlog_recover_unmount_trans(log);
break;
case XLOG_WAS_CONT_TRANS:
error = xlog_recover_add_to_cont_trans(log,
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote()
2014-04-07 19:59 ` [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote() Eric Sandeen
@ 2014-04-07 23:23 ` Dave Chinner
0 siblings, 0 replies; 23+ messages in thread
From: Dave Chinner @ 2014-04-07 23:23 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
On Mon, Apr 07, 2014 at 02:59:03PM -0500, Eric Sandeen wrote:
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> fs/xfs/xfs_bmap.c | 5 ++---
> fs/xfs/xfs_shared.h | 2 +-
> fs/xfs/xfs_symlink_remote.c | 1 -
> 3 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
> index 03b6ff2..6a1e702 100644
> --- a/fs/xfs/xfs_bmap.c
> +++ b/fs/xfs/xfs_bmap.c
> @@ -919,8 +919,7 @@ xfs_bmap_local_to_extents(
> xfs_extlen_t total, /* total blocks needed by transaction */
> int *logflagsp, /* inode logging flags */
> int whichfork,
> - void (*init_fn)(struct xfs_trans *tp,
> - struct xfs_buf *bp,
> + void (*init_fn)(struct xfs_buf *bp,
> struct xfs_inode *ip,
> struct xfs_ifork *ifp))
> {
This one I disagree with - this local-to-remote change is only done
within a transaction context. The existing conversions don't require
any special operations that require logging different objects, but
the possibility exists and so we really do need to pass the
transaction structure through this API.
e.g. we really should convert the directory code over to use the
generic xfs_bmap_local_to_extents() function rather than rolling
it's own version of essentially the same thing, and that requires
passing the transaction structure through the init_fn interface.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 00/19] xfs: remove a bunch of unused function args
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
` (18 preceding siblings ...)
2014-04-07 19:59 ` [PATCH 19/19] xfs: remove unused trans pointer arg from xlog_recover_unmount_trans() Eric Sandeen
@ 2014-04-07 23:28 ` Dave Chinner
2014-04-07 23:43 ` Eric Sandeen
19 siblings, 1 reply; 23+ messages in thread
From: Dave Chinner @ 2014-04-07 23:28 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
On Mon, Apr 07, 2014 at 02:58:47PM -0500, Eric Sandeen wrote:
> I did some mindless work during a plane ride. ;)
>
> If the granularity of these patches is just too much, I could certainly
> collapse them into fewer, bigger patches, but I figured that this would
> make them super-trivial to review.
>
> Most have no interesting commit messages aside from the subject, because
> the subject says it all.
>
> Compile-tested only, TBH.
Looks good, except for the patch I specifically commented on.
FWIW, this sort of cleanup will help reduce some of the register
pressure these code paths have, and that in turn will help reduce
stack usage, so if you can find more...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 00/19] xfs: remove a bunch of unused function args
2014-04-07 23:28 ` [PATCH 00/19] xfs: remove a bunch of unused function args Dave Chinner
@ 2014-04-07 23:43 ` Eric Sandeen
0 siblings, 0 replies; 23+ messages in thread
From: Eric Sandeen @ 2014-04-07 23:43 UTC (permalink / raw)
To: Dave Chinner, Eric Sandeen; +Cc: xfs
On 4/7/14, 6:28 PM, Dave Chinner wrote:
> On Mon, Apr 07, 2014 at 02:58:47PM -0500, Eric Sandeen wrote:
>> I did some mindless work during a plane ride. ;)
>>
>> If the granularity of these patches is just too much, I could certainly
>> collapse them into fewer, bigger patches, but I figured that this would
>> make them super-trivial to review.
>>
>> Most have no interesting commit messages aside from the subject, because
>> the subject says it all.
>>
>> Compile-tested only, TBH.
>
> Looks good, except for the patch I specifically commented on.
>
> FWIW, this sort of cleanup will help reduce some of the register
> pressure these code paths have, and that in turn will help reduce
> stack usage, so if you can find more...
yep I was thinking along those lines. I think this is all of them;
more show up w/ GCC warnings but some are for ops that need the superset
of args. I'll do one more pass to be sure there aren't any knock-on
effects w/ these changes.
Thanks,
-Eric
> Cheers,
>
> Dave.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2014-04-07 23:43 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-07 19:58 [PATCH 00/19] xfs: remove a bunch of unused function args Eric Sandeen
2014-04-07 19:58 ` [PATCH 01/19] xfs: remove unused tp arg from xfs_bmap_last_offset() and callers Eric Sandeen
2014-04-07 19:58 ` [PATCH 02/19] xfs: remove unused mp arg from xfs_attr3_rmt_hdr_ok() Eric Sandeen
2014-04-07 19:58 ` [PATCH 03/19] xfs: remove unused mp arg from xfs_bmdr_maxrecs() Eric Sandeen
2014-04-07 19:58 ` [PATCH 04/19] xfs: remove unused mp arg from xfs_bmap_forkoff_reset() Eric Sandeen
2014-04-07 19:58 ` [PATCH 05/19] xfs: remove unused level arg from xfs_btree_read_buf_block() Eric Sandeen
2014-04-07 19:58 ` [PATCH 06/19] xfs: remove unused blocksize arg from xfs_setsize_buftarg() Eric Sandeen
2014-04-07 19:58 ` [PATCH 07/19] xfs: remove unused args from xfs_alloc_buftarg() Eric Sandeen
2014-04-07 19:58 ` [PATCH 08/19] xfs: remove unused flags arg from _xfs_buf_get_pages() Eric Sandeen
2014-04-07 19:58 ` [PATCH 09/19] xfs: remove unused bip arg from xfs_buf_item_log_segment() Eric Sandeen
2014-04-07 19:58 ` [PATCH 10/19] xfs: remove unused tp arg from xfs_da_reada_buf & callers Eric Sandeen
2014-04-07 19:58 ` [PATCH 11/19] xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions Eric Sandeen
2014-04-07 19:58 ` [PATCH 12/19] xfs: remove unused mp arg from xfs_calc_dquots_per_chunk() Eric Sandeen
2014-04-07 19:59 ` [PATCH 13/19] xfs: remove unused length arg from alloc_block ops Eric Sandeen
2014-04-07 19:59 ` [PATCH 14/19] xfs: remove unused pag ptr arg from iterator execute functions Eric Sandeen
2014-04-07 19:59 ` [PATCH 15/19] xfs: remove unused bp arg from xfs_iflush_fork() Eric Sandeen
2014-04-07 19:59 ` [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote() Eric Sandeen
2014-04-07 23:23 ` Dave Chinner
2014-04-07 19:59 ` [PATCH 17/19] xfs: remove unused xfs_mount arg from xfs_symlink_hdr_ok() Eric Sandeen
2014-04-07 19:59 ` [PATCH 18/19] xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done() Eric Sandeen
2014-04-07 19:59 ` [PATCH 19/19] xfs: remove unused trans pointer arg from xlog_recover_unmount_trans() Eric Sandeen
2014-04-07 23:28 ` [PATCH 00/19] xfs: remove a bunch of unused function args Dave Chinner
2014-04-07 23:43 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).