diff options
author | Dave Chinner <dchinner@redhat.com> | 2015-06-22 02:13:30 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-06-22 02:13:30 +0200 |
commit | 496817b4befced99dff6f23997723bf0962d56b0 (patch) | |
tree | eeb1f8d39c006b464002387f38b282e2b37965ad /fs/xfs/libxfs/xfs_alloc.h | |
parent | xfs: sanitise error handling in xfs_alloc_fix_freelist (diff) | |
download | linux-496817b4befced99dff6f23997723bf0962d56b0.tar.xz linux-496817b4befced99dff6f23997723bf0962d56b0.zip |
xfs: clean up XFS_MIN_FREELIST macros
We no longer calculate the minimum freelist size from the on-disk
AGF, so we don't need the macros used for this. That means the
nested macros can be cleaned up, and turn this into an actual
function so the logic is clear and concise. This will make it much
easier to add support for the rmap btree when the time comes.
This also gets rid of the XFS_AG_MAXLEVELS macro used by these
freelist macros as it is simply a wrapper around a single variable.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h index 8815fc30f83d..7d59b8f4bf9e 100644 --- a/fs/xfs/libxfs/xfs_alloc.h +++ b/fs/xfs/libxfs/xfs_alloc.h @@ -130,6 +130,8 @@ typedef struct xfs_alloc_arg { xfs_extlen_t xfs_alloc_longest_free_extent(struct xfs_mount *mp, struct xfs_perag *pag, xfs_extlen_t need); +unsigned int xfs_alloc_min_freelist(struct xfs_mount *mp, + struct xfs_perag *pag); /* * Compute and fill in value of m_ag_maxlevels. |