mbox series

[PATCHSET,v1.0,00/10] libxfs: refactor rt extent unit conversions

Message ID 167243876812.727509.17144221830951566022.stgit@magnolia (mailing list archive)
Headers show
Series libxfs: refactor rt extent unit conversions | expand

Message

Darrick J. Wong Dec. 30, 2022, 10:19 p.m. UTC
Hi all,

This series replaces all the open-coded integer division and
multiplication conversions between rt blocks and rt extents with calls
to static inline helpers.  Having cleaned all that up, the helpers are
augmented to skip the expensive operations in favor of bit shifts and
masking if the rt extent size is a power of two.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=refactor-rt-unit-conversions

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=refactor-rt-unit-conversions
---
 include/libxfs.h         |    1 
 include/xfs_mount.h      |    2 +
 libfrog/Makefile         |    1 
 libfrog/div64.h          |   83 +++++++++++++++++++++++++++++++++++++++++
 libxfs/libxfs_priv.h     |   93 ++++++++++++----------------------------------
 libxfs/xfs_bmap.c        |   19 +++------
 libxfs/xfs_rtbitmap.c    |    4 +-
 libxfs/xfs_rtbitmap.h    |   88 ++++++++++++++++++++++++++++++++++++++++++++
 libxfs/xfs_sb.c          |    2 +
 libxfs/xfs_swapext.c     |    7 ++-
 libxfs/xfs_trans_inode.c |    3 +
 libxfs/xfs_trans_resv.c  |    3 +
 mkfs/proto.c             |   13 +++---
 repair/agheader.h        |    2 -
 repair/dinode.c          |   21 ++++++----
 repair/incore.c          |   16 ++++----
 repair/incore.h          |    4 +-
 repair/phase4.c          |   16 ++++----
 repair/rt.c              |    4 +-
 19 files changed, 259 insertions(+), 123 deletions(-)
 create mode 100644 libfrog/div64.h