OSDN Git Service

xfs: inobt can use perags in many more places than it does
authorDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:52 +0000 (09:14 +1100)
committerDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:52 +0000 (09:14 +1100)
commitbab8b795185bf37801a4f7ee5c321eee288c2f10
treed7af8b4ed96105078c89c41f7d1f4ce9008b11e8
parentdedab3e4379d298ed60b6c52a15168807b48d57a
xfs: inobt can use perags in many more places than it does

Lots of code in the inobt infrastructure is passed both xfs_mount
and perags. We only need perags for the per-ag inode allocation
code, so reduce the duplication by passing only the perags as the
primary object.

This ends up reducing the code size by a bit:

   text    data     bss     dec     hex filename
orig 1138878  323979     548 1463405  16546d (TOTALS)
patched 1138709  323979     548 1463236  1653c4 (TOTALS)

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_ag_resv.c
fs/xfs/libxfs/xfs_ialloc.c
fs/xfs/libxfs/xfs_ialloc_btree.c
fs/xfs/libxfs/xfs_ialloc_btree.h
fs/xfs/scrub/agheader_repair.c
fs/xfs/scrub/common.c
fs/xfs/xfs_iwalk.c