Commit e94b53ff authored by Omar Sandoval's avatar Omar Sandoval Committed by Darrick J. Wong

xfs: cache last bitmap block in realtime allocator

Profiling a workload on a highly fragmented realtime device showed a ton
of CPU cycles being spent in xfs_trans_read_buf() called by
xfs_rtbuf_get(). Further tracing showed that much of that was repeated
calls to xfs_rtbuf_get() for the same block of the realtime bitmap.
These come from xfs_rtallocate_extent_block(): as it walks through
ranges of free bits in the bitmap, each call to xfs_rtcheck_range() and
xfs_rtfind_{forw,back}() gets the same bitmap block. If the bitmap block
is very fragmented, then this is _a lot_ of buffer lookups.

The realtime allocator already passes around a cache of the last used
realtime summary block to avoid repeated reads (the parameters rbpp and
rsb). We can do the same for the realtime bitmap.

This replaces rbpp and rsb with a struct xfs_rtbuf_cache, which caches
the most recently used block for both the realtime bitmap and summary.
xfs_rtbuf_get() now handles the caching instead of the callers, which
requires plumbing xfs_rtbuf_cache to more functions but also makes sure
we don't miss anything.
Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 41f33d82
...@@ -47,6 +47,23 @@ const struct xfs_buf_ops xfs_rtbuf_ops = { ...@@ -47,6 +47,23 @@ const struct xfs_buf_ops xfs_rtbuf_ops = {
.verify_write = xfs_rtbuf_verify_write, .verify_write = xfs_rtbuf_verify_write,
}; };
/* Release cached rt bitmap and summary buffers. */
void
xfs_rtbuf_cache_relse(
struct xfs_rtalloc_args *args)
{
if (args->rbmbp) {
xfs_trans_brelse(args->tp, args->rbmbp);
args->rbmbp = NULL;
args->rbmoff = NULLFILEOFF;
}
if (args->sumbp) {
xfs_trans_brelse(args->tp, args->sumbp);
args->sumbp = NULL;
args->sumoff = NULLFILEOFF;
}
}
/* /*
* Get a buffer for the bitmap or summary file block specified. * Get a buffer for the bitmap or summary file block specified.
* The buffer is returned read and locked. * The buffer is returned read and locked.
...@@ -59,13 +76,42 @@ xfs_rtbuf_get( ...@@ -59,13 +76,42 @@ xfs_rtbuf_get(
struct xfs_buf **bpp) /* output: buffer for the block */ struct xfs_buf **bpp) /* output: buffer for the block */
{ {
struct xfs_mount *mp = args->mp; struct xfs_mount *mp = args->mp;
struct xfs_buf **cbpp; /* cached block buffer */
xfs_fileoff_t *coffp; /* cached block number */
struct xfs_buf *bp; /* block buffer, result */ struct xfs_buf *bp; /* block buffer, result */
struct xfs_inode *ip; /* bitmap or summary inode */ struct xfs_inode *ip; /* bitmap or summary inode */
struct xfs_bmbt_irec map; struct xfs_bmbt_irec map;
enum xfs_blft type;
int nmap = 1; int nmap = 1;
int error; int error;
ip = issum ? mp->m_rsumip : mp->m_rbmip; if (issum) {
cbpp = &args->sumbp;
coffp = &args->sumoff;
ip = mp->m_rsumip;
type = XFS_BLFT_RTSUMMARY_BUF;
} else {
cbpp = &args->rbmbp;
coffp = &args->rbmoff;
ip = mp->m_rbmip;
type = XFS_BLFT_RTBITMAP_BUF;
}
/*
* If we have a cached buffer, and the block number matches, use that.
*/
if (*cbpp && *coffp == block) {
*bpp = *cbpp;
return 0;
}
/*
* Otherwise we have to have to get the buffer. If there was an old
* one, get rid of it first.
*/
if (*cbpp) {
xfs_trans_brelse(args->tp, *cbpp);
*cbpp = NULL;
}
error = xfs_bmapi_read(ip, block, 1, &map, &nmap, 0); error = xfs_bmapi_read(ip, block, 1, &map, &nmap, 0);
if (error) if (error)
...@@ -81,9 +127,9 @@ xfs_rtbuf_get( ...@@ -81,9 +127,9 @@ xfs_rtbuf_get(
if (error) if (error)
return error; return error;
xfs_trans_buf_set_type(args->tp, bp, issum ? XFS_BLFT_RTSUMMARY_BUF xfs_trans_buf_set_type(args->tp, bp, type);
: XFS_BLFT_RTBITMAP_BUF); *cbpp = *bpp = bp;
*bpp = bp; *coffp = block;
return 0; return 0;
} }
...@@ -153,7 +199,6 @@ xfs_rtfind_back( ...@@ -153,7 +199,6 @@ xfs_rtfind_back(
/* /*
* Different. Mark where we are and return. * Different. Mark where we are and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i = bit - XFS_RTHIBIT(wdiff); i = bit - XFS_RTHIBIT(wdiff);
*rtx = start - i + 1; *rtx = start - i + 1;
return 0; return 0;
...@@ -167,7 +212,6 @@ xfs_rtfind_back( ...@@ -167,7 +212,6 @@ xfs_rtfind_back(
/* /*
* If done with this block, get the previous one. * If done with this block, get the previous one.
*/ */
xfs_trans_brelse(args->tp, bp);
error = xfs_rtbuf_get(args, --block, 0, &bp); error = xfs_rtbuf_get(args, --block, 0, &bp);
if (error) { if (error) {
return error; return error;
...@@ -194,7 +238,6 @@ xfs_rtfind_back( ...@@ -194,7 +238,6 @@ xfs_rtfind_back(
/* /*
* Different, mark where we are and return. * Different, mark where we are and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i += XFS_NBWORD - 1 - XFS_RTHIBIT(wdiff); i += XFS_NBWORD - 1 - XFS_RTHIBIT(wdiff);
*rtx = start - i + 1; *rtx = start - i + 1;
return 0; return 0;
...@@ -208,7 +251,6 @@ xfs_rtfind_back( ...@@ -208,7 +251,6 @@ xfs_rtfind_back(
/* /*
* If done with this block, get the previous one. * If done with this block, get the previous one.
*/ */
xfs_trans_brelse(args->tp, bp);
error = xfs_rtbuf_get(args, --block, 0, &bp); error = xfs_rtbuf_get(args, --block, 0, &bp);
if (error) { if (error) {
return error; return error;
...@@ -236,7 +278,6 @@ xfs_rtfind_back( ...@@ -236,7 +278,6 @@ xfs_rtfind_back(
/* /*
* Different, mark where we are and return. * Different, mark where we are and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i += XFS_NBWORD - 1 - XFS_RTHIBIT(wdiff); i += XFS_NBWORD - 1 - XFS_RTHIBIT(wdiff);
*rtx = start - i + 1; *rtx = start - i + 1;
return 0; return 0;
...@@ -246,7 +287,6 @@ xfs_rtfind_back( ...@@ -246,7 +287,6 @@ xfs_rtfind_back(
/* /*
* No match, return that we scanned the whole area. * No match, return that we scanned the whole area.
*/ */
xfs_trans_brelse(args->tp, bp);
*rtx = start - i + 1; *rtx = start - i + 1;
return 0; return 0;
} }
...@@ -316,7 +356,6 @@ xfs_rtfind_forw( ...@@ -316,7 +356,6 @@ xfs_rtfind_forw(
/* /*
* Different. Mark where we are and return. * Different. Mark where we are and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i = XFS_RTLOBIT(wdiff) - bit; i = XFS_RTLOBIT(wdiff) - bit;
*rtx = start + i - 1; *rtx = start + i - 1;
return 0; return 0;
...@@ -330,7 +369,6 @@ xfs_rtfind_forw( ...@@ -330,7 +369,6 @@ xfs_rtfind_forw(
/* /*
* If done with this block, get the previous one. * If done with this block, get the previous one.
*/ */
xfs_trans_brelse(args->tp, bp);
error = xfs_rtbuf_get(args, ++block, 0, &bp); error = xfs_rtbuf_get(args, ++block, 0, &bp);
if (error) { if (error) {
return error; return error;
...@@ -357,7 +395,6 @@ xfs_rtfind_forw( ...@@ -357,7 +395,6 @@ xfs_rtfind_forw(
/* /*
* Different, mark where we are and return. * Different, mark where we are and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i += XFS_RTLOBIT(wdiff); i += XFS_RTLOBIT(wdiff);
*rtx = start + i - 1; *rtx = start + i - 1;
return 0; return 0;
...@@ -371,7 +408,6 @@ xfs_rtfind_forw( ...@@ -371,7 +408,6 @@ xfs_rtfind_forw(
/* /*
* If done with this block, get the next one. * If done with this block, get the next one.
*/ */
xfs_trans_brelse(args->tp, bp);
error = xfs_rtbuf_get(args, ++block, 0, &bp); error = xfs_rtbuf_get(args, ++block, 0, &bp);
if (error) { if (error) {
return error; return error;
...@@ -397,7 +433,6 @@ xfs_rtfind_forw( ...@@ -397,7 +433,6 @@ xfs_rtfind_forw(
/* /*
* Different, mark where we are and return. * Different, mark where we are and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i += XFS_RTLOBIT(wdiff); i += XFS_RTLOBIT(wdiff);
*rtx = start + i - 1; *rtx = start + i - 1;
return 0; return 0;
...@@ -407,7 +442,6 @@ xfs_rtfind_forw( ...@@ -407,7 +442,6 @@ xfs_rtfind_forw(
/* /*
* No match, return that we scanned the whole area. * No match, return that we scanned the whole area.
*/ */
xfs_trans_brelse(args->tp, bp);
*rtx = start + i - 1; *rtx = start + i - 1;
return 0; return 0;
} }
...@@ -442,8 +476,6 @@ xfs_rtmodify_summary_int( ...@@ -442,8 +476,6 @@ xfs_rtmodify_summary_int(
int log, /* log2 of extent size */ int log, /* log2 of extent size */
xfs_fileoff_t bbno, /* bitmap block number */ xfs_fileoff_t bbno, /* bitmap block number */
int delta, /* change to make to summary info */ int delta, /* change to make to summary info */
struct xfs_buf **rbpp, /* in/out: summary block buffer */
xfs_fileoff_t *rsb, /* in/out: summary block number */
xfs_suminfo_t *sum) /* out: summary info for this block */ xfs_suminfo_t *sum) /* out: summary info for this block */
{ {
struct xfs_mount *mp = args->mp; struct xfs_mount *mp = args->mp;
...@@ -461,30 +493,11 @@ xfs_rtmodify_summary_int( ...@@ -461,30 +493,11 @@ xfs_rtmodify_summary_int(
* Compute the block number in the summary file. * Compute the block number in the summary file.
*/ */
sb = xfs_rtsumoffs_to_block(mp, so); sb = xfs_rtsumoffs_to_block(mp, so);
/*
* If we have an old buffer, and the block number matches, use that.
*/
if (*rbpp && *rsb == sb)
bp = *rbpp;
/*
* Otherwise we have to get the buffer.
*/
else {
/*
* If there was an old one, get rid of it first.
*/
if (*rbpp)
xfs_trans_brelse(args->tp, *rbpp);
error = xfs_rtbuf_get(args, sb, 1, &bp); error = xfs_rtbuf_get(args, sb, 1, &bp);
if (error) { if (error)
return error; return error;
}
/*
* Remember this buffer and block for the next call.
*/
*rbpp = bp;
*rsb = sb;
}
/* /*
* Point to the summary information, modify/log it, and/or copy it out. * Point to the summary information, modify/log it, and/or copy it out.
*/ */
...@@ -512,11 +525,9 @@ xfs_rtmodify_summary( ...@@ -512,11 +525,9 @@ xfs_rtmodify_summary(
struct xfs_rtalloc_args *args, struct xfs_rtalloc_args *args,
int log, /* log2 of extent size */ int log, /* log2 of extent size */
xfs_fileoff_t bbno, /* bitmap block number */ xfs_fileoff_t bbno, /* bitmap block number */
int delta, /* change to make to summary info */ int delta) /* in/out: summary block number */
struct xfs_buf **rbpp, /* in/out: summary block buffer */
xfs_fileoff_t *rsb) /* in/out: summary block number */
{ {
return xfs_rtmodify_summary_int(args, log, bbno, delta, rbpp, rsb, NULL); return xfs_rtmodify_summary_int(args, log, bbno, delta, NULL);
} }
/* Log rtbitmap block from the word @from to the byte before @next. */ /* Log rtbitmap block from the word @from to the byte before @next. */
...@@ -687,9 +698,7 @@ int ...@@ -687,9 +698,7 @@ int
xfs_rtfree_range( xfs_rtfree_range(
struct xfs_rtalloc_args *args, struct xfs_rtalloc_args *args,
xfs_rtxnum_t start, /* starting rtext to free */ xfs_rtxnum_t start, /* starting rtext to free */
xfs_rtxlen_t len, /* length to free */ xfs_rtxlen_t len) /* in/out: summary block number */
struct xfs_buf **rbpp, /* in/out: summary block buffer */
xfs_fileoff_t *rsb) /* in/out: summary block number */
{ {
struct xfs_mount *mp = args->mp; struct xfs_mount *mp = args->mp;
xfs_rtxnum_t end; /* end of the freed extent */ xfs_rtxnum_t end; /* end of the freed extent */
...@@ -728,7 +737,7 @@ xfs_rtfree_range( ...@@ -728,7 +737,7 @@ xfs_rtfree_range(
if (preblock < start) { if (preblock < start) {
error = xfs_rtmodify_summary(args, error = xfs_rtmodify_summary(args,
XFS_RTBLOCKLOG(start - preblock), XFS_RTBLOCKLOG(start - preblock),
xfs_rtx_to_rbmblock(mp, preblock), -1, rbpp, rsb); xfs_rtx_to_rbmblock(mp, preblock), -1);
if (error) { if (error) {
return error; return error;
} }
...@@ -740,7 +749,7 @@ xfs_rtfree_range( ...@@ -740,7 +749,7 @@ xfs_rtfree_range(
if (postblock > end) { if (postblock > end) {
error = xfs_rtmodify_summary(args, error = xfs_rtmodify_summary(args,
XFS_RTBLOCKLOG(postblock - end), XFS_RTBLOCKLOG(postblock - end),
xfs_rtx_to_rbmblock(mp, end + 1), -1, rbpp, rsb); xfs_rtx_to_rbmblock(mp, end + 1), -1);
if (error) { if (error) {
return error; return error;
} }
...@@ -749,10 +758,9 @@ xfs_rtfree_range( ...@@ -749,10 +758,9 @@ xfs_rtfree_range(
* Increment the summary information corresponding to the entire * Increment the summary information corresponding to the entire
* (new) free extent. * (new) free extent.
*/ */
error = xfs_rtmodify_summary(args, return xfs_rtmodify_summary(args,
XFS_RTBLOCKLOG(postblock + 1 - preblock), XFS_RTBLOCKLOG(postblock + 1 - preblock),
xfs_rtx_to_rbmblock(mp, preblock), 1, rbpp, rsb); xfs_rtx_to_rbmblock(mp, preblock), 1);
return error;
} }
/* /*
...@@ -822,7 +830,6 @@ xfs_rtcheck_range( ...@@ -822,7 +830,6 @@ xfs_rtcheck_range(
/* /*
* Different, compute first wrong bit and return. * Different, compute first wrong bit and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i = XFS_RTLOBIT(wdiff) - bit; i = XFS_RTLOBIT(wdiff) - bit;
*new = start + i; *new = start + i;
*stat = 0; *stat = 0;
...@@ -837,7 +844,6 @@ xfs_rtcheck_range( ...@@ -837,7 +844,6 @@ xfs_rtcheck_range(
/* /*
* If done with this block, get the next one. * If done with this block, get the next one.
*/ */
xfs_trans_brelse(args->tp, bp);
error = xfs_rtbuf_get(args, ++block, 0, &bp); error = xfs_rtbuf_get(args, ++block, 0, &bp);
if (error) { if (error) {
return error; return error;
...@@ -864,7 +870,6 @@ xfs_rtcheck_range( ...@@ -864,7 +870,6 @@ xfs_rtcheck_range(
/* /*
* Different, compute first wrong bit and return. * Different, compute first wrong bit and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i += XFS_RTLOBIT(wdiff); i += XFS_RTLOBIT(wdiff);
*new = start + i; *new = start + i;
*stat = 0; *stat = 0;
...@@ -879,7 +884,6 @@ xfs_rtcheck_range( ...@@ -879,7 +884,6 @@ xfs_rtcheck_range(
/* /*
* If done with this block, get the next one. * If done with this block, get the next one.
*/ */
xfs_trans_brelse(args->tp, bp);
error = xfs_rtbuf_get(args, ++block, 0, &bp); error = xfs_rtbuf_get(args, ++block, 0, &bp);
if (error) { if (error) {
return error; return error;
...@@ -905,7 +909,6 @@ xfs_rtcheck_range( ...@@ -905,7 +909,6 @@ xfs_rtcheck_range(
/* /*
* Different, compute first wrong bit and return. * Different, compute first wrong bit and return.
*/ */
xfs_trans_brelse(args->tp, bp);
i += XFS_RTLOBIT(wdiff); i += XFS_RTLOBIT(wdiff);
*new = start + i; *new = start + i;
*stat = 0; *stat = 0;
...@@ -916,7 +919,6 @@ xfs_rtcheck_range( ...@@ -916,7 +919,6 @@ xfs_rtcheck_range(
/* /*
* Successful, return. * Successful, return.
*/ */
xfs_trans_brelse(args->tp, bp);
*new = start + i; *new = start + i;
*stat = 1; *stat = 1;
return 0; return 0;
...@@ -961,8 +963,6 @@ xfs_rtfree_extent( ...@@ -961,8 +963,6 @@ xfs_rtfree_extent(
.tp = tp, .tp = tp,
}; };
int error; int error;
xfs_fsblock_t sb; /* summary file block number */
struct xfs_buf *sumbp = NULL; /* summary file block buffer */
ASSERT(mp->m_rbmip->i_itemp != NULL); ASSERT(mp->m_rbmip->i_itemp != NULL);
ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
...@@ -974,10 +974,10 @@ xfs_rtfree_extent( ...@@ -974,10 +974,10 @@ xfs_rtfree_extent(
/* /*
* Free the range of realtime blocks. * Free the range of realtime blocks.
*/ */
error = xfs_rtfree_range(&args, start, len, &sumbp, &sb); error = xfs_rtfree_range(&args, start, len);
if (error) { if (error)
return error; goto out;
}
/* /*
* Mark more blocks free in the superblock. * Mark more blocks free in the superblock.
*/ */
...@@ -993,7 +993,10 @@ xfs_rtfree_extent( ...@@ -993,7 +993,10 @@ xfs_rtfree_extent(
*(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0; *(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
} }
return 0; error = 0;
out:
xfs_rtbuf_cache_relse(&args);
return error;
} }
/* /*
...@@ -1084,6 +1087,7 @@ xfs_rtalloc_query_range( ...@@ -1084,6 +1087,7 @@ xfs_rtalloc_query_range(
rtstart = rtend + 1; rtstart = rtend + 1;
} }
xfs_rtbuf_cache_relse(&args);
return error; return error;
} }
...@@ -1122,6 +1126,7 @@ xfs_rtalloc_extent_is_free( ...@@ -1122,6 +1126,7 @@ xfs_rtalloc_extent_is_free(
int error; int error;
error = xfs_rtcheck_range(&args, start, len, 1, &end, &matches); error = xfs_rtcheck_range(&args, start, len, 1, &end, &matches);
xfs_rtbuf_cache_relse(&args);
if (error) if (error)
return error; return error;
......
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
struct xfs_rtalloc_args { struct xfs_rtalloc_args {
struct xfs_mount *mp; struct xfs_mount *mp;
struct xfs_trans *tp; struct xfs_trans *tp;
struct xfs_buf *rbmbp; /* bitmap block buffer */
struct xfs_buf *sumbp; /* summary block buffer */
xfs_fileoff_t rbmoff; /* bitmap block number */
xfs_fileoff_t sumoff; /* summary block number */
}; };
static inline xfs_rtblock_t static inline xfs_rtblock_t
...@@ -286,6 +292,8 @@ typedef int (*xfs_rtalloc_query_range_fn)( ...@@ -286,6 +292,8 @@ typedef int (*xfs_rtalloc_query_range_fn)(
void *priv); void *priv);
#ifdef CONFIG_XFS_RT #ifdef CONFIG_XFS_RT
void xfs_rtbuf_cache_relse(struct xfs_rtalloc_args *args);
int xfs_rtbuf_get(struct xfs_rtalloc_args *args, xfs_fileoff_t block, int xfs_rtbuf_get(struct xfs_rtalloc_args *args, xfs_fileoff_t block,
int issum, struct xfs_buf **bpp); int issum, struct xfs_buf **bpp);
int xfs_rtcheck_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start, int xfs_rtcheck_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
...@@ -297,13 +305,11 @@ int xfs_rtfind_forw(struct xfs_rtalloc_args *args, xfs_rtxnum_t start, ...@@ -297,13 +305,11 @@ int xfs_rtfind_forw(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
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_rtmodify_summary_int(struct xfs_rtalloc_args *args, int log,
xfs_fileoff_t bbno, int delta, struct xfs_buf **rbpp, xfs_fileoff_t bbno, int delta, xfs_suminfo_t *sum);
xfs_fileoff_t *rsb, 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, struct xfs_buf **rbpp, xfs_fileoff_t bbno, int delta);
xfs_fileoff_t *rsb);
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,
xfs_rtxlen_t len, struct xfs_buf **rbpp, xfs_fileoff_t *rsb); xfs_rtxlen_t len);
int xfs_rtalloc_query_range(struct xfs_mount *mp, struct xfs_trans *tp, int xfs_rtalloc_query_range(struct xfs_mount *mp, struct xfs_trans *tp,
const struct xfs_rtalloc_rec *low_rec, const struct xfs_rtalloc_rec *low_rec,
const struct xfs_rtalloc_rec *high_rec, const struct xfs_rtalloc_rec *high_rec,
...@@ -343,6 +349,7 @@ unsigned long long xfs_rtsummary_wordcount(struct xfs_mount *mp, ...@@ -343,6 +349,7 @@ unsigned long long xfs_rtsummary_wordcount(struct xfs_mount *mp,
# define xfs_rtalloc_query_range(m,t,l,h,f,p) (-ENOSYS) # define xfs_rtalloc_query_range(m,t,l,h,f,p) (-ENOSYS)
# define xfs_rtalloc_query_all(m,t,f,p) (-ENOSYS) # define xfs_rtalloc_query_all(m,t,f,p) (-ENOSYS)
# define xfs_rtbuf_get(m,t,b,i,p) (-ENOSYS) # define xfs_rtbuf_get(m,t,b,i,p) (-ENOSYS)
# define xfs_rtbuf_cache_relse(a) (0)
# define xfs_rtalloc_extent_is_free(m,t,s,l,i) (-ENOSYS) # define xfs_rtalloc_extent_is_free(m,t,s,l,i) (-ENOSYS)
static inline xfs_filblks_t static inline xfs_filblks_t
xfs_rtbitmap_blockcount(struct xfs_mount *mp, xfs_rtbxlen_t rtextents) xfs_rtbitmap_blockcount(struct xfs_mount *mp, xfs_rtbxlen_t rtextents)
......
...@@ -228,7 +228,7 @@ xchk_rtsum_compare( ...@@ -228,7 +228,7 @@ xchk_rtsum_compare(
/* Read a block's worth of computed rtsummary file. */ /* Read a block's worth of computed rtsummary file. */
error = xfsum_copyout(sc, sumoff, sc->buf, mp->m_blockwsize); error = xfsum_copyout(sc, sumoff, sc->buf, mp->m_blockwsize);
if (error) { if (error) {
xfs_trans_brelse(sc->tp, bp); xfs_rtbuf_cache_relse(&args);
return error; return error;
} }
...@@ -237,7 +237,7 @@ xchk_rtsum_compare( ...@@ -237,7 +237,7 @@ xchk_rtsum_compare(
mp->m_blockwsize << XFS_WORDLOG) != 0) mp->m_blockwsize << XFS_WORDLOG) != 0)
xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, off); xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, off);
xfs_trans_brelse(sc->tp, bp); xfs_rtbuf_cache_relse(&args);
sumoff += mp->m_blockwsize; sumoff += mp->m_blockwsize;
} }
......
This diff is collapsed.
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