Skip to content

RFC xfs: Remove redundant btree insert code

Eric Sandeen linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5xfs: remove redundant stat checks after xfs_btree_insert()fs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_bmap.c fs/xfs/libxfs/xfs_refcount.c +1 more+0 -1171 reply
2/5xfs: remove redundant stat checks after xfs_refcount_insert()fs/xfs/libxfs/xfs_refcount.c+2 -170 replies
3/5xfs: remove redundant stat checks after xfs_inobt_insert_rec()fs/xfs/libxfs/xfs_ialloc.c+0 -150 replies
4/5xfs: remove redundant stat check after rcbagbt_insert()fs/xfs/scrub/rcbag.c+0 -40 replies
5/5xfs: remove status parameter from several btree insert functionsfs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_bmap.c fs/xfs/libxfs/xfs_btree.c +9 more+44 -533 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/5] xfs: Remove redundant btree insert code

This depends on the prior changes
([PATCH 0/2] xfs: add missing cursor status check after btree ops)

The btree insert code returns both an error and a status var, but they are redundant as described in the first patch here.

Every caller handles the error first, and never gets to the status check, so all that can be removed.

RFC to see if this direction and the patch splitup/granularity seems ok.

If so the opportunity exists on the btree delete side as well.

 libxfs/xfs_alloc.c    |   32 +++------------------
 libxfs/xfs_bmap.c     |   76 +++++++-----------------------------------------
 libxfs/xfs_btree.c    |    4 --
 libxfs/xfs_btree.h    |    2 -
 libxfs/xfs_ialloc.c   |   28 +++---------------
 libxfs/xfs_ialloc.h   |    3 -
 libxfs/xfs_refcount.c |   45 +++++------------------------
 libxfs/xfs_refcount.h |    2 -
 libxfs/xfs_rmap.c     |   46 ++++--------------------------
 scrub/rcbag.c         |    6 ---
 scrub/rcbag_btree.c   |    5 +--
 scrub/rcbag_btree.h   |    3 -
 12 files changed, 46 insertions(+), 206 deletions(-)