]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
xfs: create a predicate to verify per-AG extents
authorDarrick J. Wong <djwong@kernel.org>
Fri, 28 Oct 2022 22:48:58 +0000 (15:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 31 Oct 2022 15:58:20 +0000 (08:58 -0700)
commitb65e08f83b119ae9345ed23d4da357a72b3cb55c
tree5c25440a24f3ed77d51f8401412b939e20f6a8fb
parentf850995f60e49818093ef5e477cdb0ff2c11a0a4
xfs: create a predicate to verify per-AG extents

Create a predicate function to verify that a given agbno/blockcount pair
fit entirely within a single allocation group and don't suffer
mathematical overflows.  Refactor the existng open-coded logic; we're
going to add more calls to this function in the next patch.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_ag.h
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_refcount.c
fs/xfs/libxfs/xfs_rmap.c
fs/xfs/scrub/alloc.c
fs/xfs/scrub/ialloc.c
fs/xfs/scrub/refcount.c