]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: add xfs_agbno_to_fsb and xfs_agbno_to_daddr helpers
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Sep 2024 20:40:20 +0000 (13:40 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 9 Oct 2024 23:29:05 +0000 (16:29 -0700)
commitee13d63a775e15aafa8f4bf9bb5d18840da0ff8c
treea0203cc26641dbce469f040a0a824b6888e17d8c
parenta95f57356e242a1cf3ad988c4b46968bb66d1340
xfs: add xfs_agbno_to_fsb and xfs_agbno_to_daddr helpers

Add helpers to convert an agbno to a daddr or fsbno based on a pag
structure.

This provides a simpler conversion and better type safety compared to the
existing code that passes the mount structure and the agno separately.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_ag.c
libxfs/xfs_ag.h
libxfs/xfs_alloc.c
libxfs/xfs_btree.c
libxfs/xfs_ialloc.c
libxfs/xfs_ialloc_btree.c
libxfs/xfs_refcount.c
libxfs/xfs_refcount_btree.c