Commit c2adcfa3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chandan Babu R

xfs: move xfs_rtget_summary to xfs_rtbitmap.c

xfs_rtmodify_summary_int is only used inside xfs_rtbitmap.c and to
implement xfs_rtget_summary.  Move xfs_rtget_summary to xfs_rtbitmap.c
as the exported API and mark xfs_rtmodify_summary_int static.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent a3e48f68
...@@ -519,6 +519,20 @@ xfs_rtmodify_summary( ...@@ -519,6 +519,20 @@ xfs_rtmodify_summary(
return xfs_rtmodify_summary_int(args, log, bbno, delta, NULL); return xfs_rtmodify_summary_int(args, log, bbno, delta, NULL);
} }
/*
* Read and return the summary information for a given extent size, bitmap block
* combination.
*/
int
xfs_rtget_summary(
struct xfs_rtalloc_args *args,
int log, /* log2 of extent size */
xfs_fileoff_t bbno, /* bitmap block number */
xfs_suminfo_t *sum) /* out: summary info for this block */
{
return xfs_rtmodify_summary_int(args, log, bbno, 0, sum);
}
/* Log rtbitmap block from the word @from to the byte before @next. */ /* Log rtbitmap block from the word @from to the byte before @next. */
static inline void static inline void
xfs_trans_log_rtbitmap( xfs_trans_log_rtbitmap(
......
...@@ -321,8 +321,8 @@ int xfs_rtfind_forw(struct xfs_rtalloc_args *args, xfs_rtxnum_t start, ...@@ -321,8 +321,8 @@ int xfs_rtfind_forw(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
xfs_rtxnum_t limit, xfs_rtxnum_t *rtblock); xfs_rtxnum_t limit, xfs_rtxnum_t *rtblock);
int xfs_rtmodify_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start, int xfs_rtmodify_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
xfs_rtxlen_t len, int val); xfs_rtxlen_t len, int val);
int xfs_rtmodify_summary_int(struct xfs_rtalloc_args *args, int log, int xfs_rtget_summary(struct xfs_rtalloc_args *args, int log,
xfs_fileoff_t bbno, int delta, xfs_suminfo_t *sum); xfs_fileoff_t bbno, xfs_suminfo_t *sum);
int xfs_rtmodify_summary(struct xfs_rtalloc_args *args, int log, int xfs_rtmodify_summary(struct xfs_rtalloc_args *args, int log,
xfs_fileoff_t bbno, int delta); xfs_fileoff_t bbno, int delta);
int xfs_rtfree_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start, int xfs_rtfree_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
......
...@@ -23,22 +23,6 @@ ...@@ -23,22 +23,6 @@
#include "xfs_rtbitmap.h" #include "xfs_rtbitmap.h"
#include "xfs_quota.h" #include "xfs_quota.h"
/*
* Read and return the summary information for a given extent size,
* bitmap block combination.
* Keeps track of a current summary block, so we don't keep reading
* it from the buffer cache.
*/
static int
xfs_rtget_summary(
struct xfs_rtalloc_args *args,
int log, /* log2 of extent size */
xfs_fileoff_t bbno, /* bitmap block number */
xfs_suminfo_t *sum) /* out: summary info for this block */
{
return xfs_rtmodify_summary_int(args, log, bbno, 0, sum);
}
/* /*
* Return whether there are any free extents in the size range given * Return whether there are any free extents in the size range given
* by low and high, for the bitmap block bbno. * by low and high, for the bitmap block bbno.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment