]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: add xfs_agbno_to_fsb and xfs_agbno_to_daddr helpers
authorChristoph Hellwig <hch@lst.de>
Mon, 25 Nov 2024 21:14:12 +0000 (13:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:23 +0000 (18:01 -0800)
commit25e0d55968c78446bab1ab39ed2aeb2a44b311a6
tree9332288e8c1cfc74bb6d0ac56be2f9e2b82860b0
parentbf91bd162fde0e1fdfc435e3bf9fbc338b3a4348
xfs: add xfs_agbno_to_fsb and xfs_agbno_to_daddr helpers

Source kernel commit: 856a920ac2bbb2352ef6aa9e1e052f2e80677df7

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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
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