xfs: remove a bunch of unused function args
PATCH 2/19 xfs: remove unused mp arg from xfs_attr3_rmt_hdr_ok()
In reply to Eric Sandeen--- fs/xfs/xfs_attr_remote.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
fs/xfs/xfs_attr_remote.c +1 -2
@@ -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)",
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 7/19 xfs: remove unused args from xfs_alloc_buftarg()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_buf.c +1 -3
@@ -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;
fs/xfs/xfs_buf.h +1 -1
@@ -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 );
fs/xfs/xfs_super.c +3 -5
@@ -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 {
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
cover xfs: remove a bunch of unused function args
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 1/19 xfs: remove unused tp arg from xfs_bmap_last_offset() and callers
remove unused transaction pointer from various
callchains leading to xfs_bmap_last_offset().
--- 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(-)
fs/xfs/xfs_bmap.c +0 -1
@@ -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)
fs/xfs/xfs_bmap.h +2 -2
@@ -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);
fs/xfs/xfs_dir2.c +12 -14
@@ -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 ;
fs/xfs/xfs_dir2.h +2 -2
@@ -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);
fs/xfs/xfs_dir2_leaf.c +1 -1
@@ -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;
fs/xfs/xfs_dir2_node.c +1 -1
@@ -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;
fs/xfs/xfs_dir2_readdir.c +1 -1
@@ -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);
fs/xfs/xfs_iomap.c +1 -1
@@ -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;
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 3/19 xfs: remove unused mp arg from xfs_bmdr_maxrecs()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_bmap.c +1 -1
@@ -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;
fs/xfs/xfs_bmap_btree.c +3 -5
@@ -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) {
fs/xfs/xfs_bmap_btree.h +1 -1
@@ -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,
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 5/19 xfs: remove unused level arg from xfs_btree_read_buf_block()
In reply to Eric Sandeen--- fs/xfs/xfs_btree.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-)
fs/xfs/xfs_btree.c +13 -19
@@ -1161,7 +1161,6 @@ STATIC intxfs_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 );
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 6/19 xfs: remove unused blocksize arg from xfs_setsize_buftarg()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_buf.c +1 -3
@@ -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 *
fs/xfs/xfs_buf.h +1 -1
@@ -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)
fs/xfs/xfs_super.c +1 -4
@@ -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;
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 8/19 xfs: remove unused flags arg from _xfs_buf_get_pages()
In reply to Eric Sandeen--- fs/xfs/xfs_buf.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
fs/xfs/xfs_buf.c +4 -5
@@ -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;
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 9/19 xfs: remove unused bip arg from xfs_buf_item_log_segment()
In reply to Eric Sandeen--- fs/xfs/xfs_buf_item.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
fs/xfs/xfs_buf_item.c +1 -2
@@ -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;
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 10/19 xfs: remove unused tp arg from xfs_da_reada_buf & callers
In reply to Eric SandeenThis one hits a few functions as we unravel the unused arg up through the callers.
--- 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(-)
fs/xfs/xfs_da_btree.c +3 -5
@@ -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 */
fs/xfs/xfs_da_btree.h +3 -3
@@ -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);
fs/xfs/xfs_dir2_data.c +1 -2
@@ -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); }
fs/xfs/xfs_dir2_priv.h +2 -2
@@ -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,
fs/xfs/xfs_dir2_readdir.c +2 -2
@@ -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;
fs/xfs/xfs_file.c +1 -1
@@ -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 ; }
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 11/19 xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_da_format.h +5 -5
@@ -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)); }/*
fs/xfs/xfs_dir2_block.c +4 -4
@@ -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)
fs/xfs/xfs_dir2_readdir.c +4 -4
@@ -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);
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 12/19 xfs: remove unused mp arg from xfs_calc_dquots_per_chunk()
In reply to Eric SandeenAnd because this gets passed to xfs_bmap_local_to_extents() as *init_fn(), change that prototype too.
--- 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(-)
fs/xfs/xfs_dquot_buf.c +2 -3
@@ -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.
fs/xfs/xfs_qm.c +1 -2
@@ -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 );
fs/xfs/xfs_quota_defs.h +1 -1
@@ -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__ */
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 15/19 xfs: remove unused bp arg from xfs_iflush_fork()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_inode.c +2 -2
@@ -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);/*
fs/xfs/xfs_inode_fork.c +1 -2
@@ -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;
fs/xfs/xfs_inode_fork.h +1 -2
@@ -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 );
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 17/19 xfs: remove unused xfs_mount arg from xfs_symlink_hdr_ok()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_shared.h +1 -1
@@ -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);
fs/xfs/xfs_symlink.c +1 -1
@@ -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,
fs/xfs/xfs_symlink_remote.c +0 -1
@@ -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,
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 18/19 xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_log_recover.c +2 -2
@@ -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; }
fs/xfs/xfs_trans.c +1 -1
@@ -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); }
fs/xfs/xfs_trans_ail.c +2 -3
@@ -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))
fs/xfs/xfs_trans_priv.h +1 -2
@@ -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
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 13/19 xfs: remove unused length arg from alloc_block ops
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_alloc_btree.c +0 -1
@@ -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;
fs/xfs/xfs_bmap_btree.c +0 -1
@@ -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 */
fs/xfs/xfs_btree.c +3 -3
@@ -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 )
fs/xfs/xfs_btree.h +1 -1
@@ -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 */
fs/xfs/xfs_ialloc_btree.c +0 -1
@@ -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 */
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 14/19 xfs: remove unused pag ptr arg from iterator execute functions
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_icache.c +4 -8
@@ -507,8 +507,7 @@ STATIC intxfs_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 intxfs_inode_free_eofblocks (struct xfs_inode *ip, -struct xfs_perag *pag,int flags,void *args) {
fs/xfs/xfs_icache.h +2 -4
@@ -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
fs/xfs/xfs_qm_syscalls.c +0 -1
@@ -959,7 +959,6 @@ xfs_qm_export_flags( STATIC intxfs_dqrele_inode (struct xfs_inode *ip, -struct xfs_perag *pag,int flags,void *args) {
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 16/19 xfs: remove unused tp arg from xfs_symlink_local_to_remote()
In reply to Eric Sandeen--- 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(-)
fs/xfs/xfs_bmap.c +2 -3
@@ -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 );
fs/xfs/xfs_shared.h +1 -1
@@ -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__ */
fs/xfs/xfs_symlink_remote.c +0 -1
@@ -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)
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 19/19 xfs: remove unused trans pointer arg from xlog_recover_unmount_trans()
In reply to Eric Sandeen--- fs/xfs/xfs_log_recover.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
fs/xfs/xfs_log_recover.c +2 -3
@@ -3520,8 +3520,7 @@ out: STATIC intxlog_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,
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 4/19 xfs: remove unused mp arg from xfs_bmap_forkoff_reset()
In reply to Eric Sandeen--- fs/xfs/xfs_bmap.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
fs/xfs/xfs_bmap.c +1 -2
@@ -233,7 +233,6 @@ xfs_default_attroffset(*/ STATIC voidxfs_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 );
Signature · 6 lines
1.7.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote()
In reply to Eric SandeenQuoted 12 lines · Eric Sandeen
Signed-off-by Eric Sandeen <[email protected]>--- 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(-)fs/xfs/xfs_bmap.c +0
-0
fs/xfs/xfs_bmap.c xfs_bmap_local_to_extents( · line 925
Quoted 9 lines
fs/xfs/xfs_bmap.c +1
-2@@ -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.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 10 lines · Eric Sandeen
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.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 10 lines · Dave Chinner
Quoted 9 lines · Eric Sandeen
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.
Quoted 7 lines
Quoted 1 line
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
Quoted 4 lines
Cheers,
Dave.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs