mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
bc270b53e6
Move the xrep_extent_list code into a separate file. Logically, this data structure is really just a clumsy bitmap, and in the next patch we'll make this more obvious. No functional changes. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
38 lines
960 B
C
38 lines
960 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2018 Oracle. All Rights Reserved.
|
|
* Author: Darrick J. Wong <darrick.wong@oracle.com>
|
|
*/
|
|
#ifndef __XFS_SCRUB_BITMAP_H__
|
|
#define __XFS_SCRUB_BITMAP_H__
|
|
|
|
struct xrep_extent {
|
|
struct list_head list;
|
|
xfs_fsblock_t fsbno;
|
|
xfs_extlen_t len;
|
|
};
|
|
|
|
struct xrep_extent_list {
|
|
struct list_head list;
|
|
};
|
|
|
|
static inline void
|
|
xrep_init_extent_list(
|
|
struct xrep_extent_list *exlist)
|
|
{
|
|
INIT_LIST_HEAD(&exlist->list);
|
|
}
|
|
|
|
#define for_each_xrep_extent_safe(rbe, n, exlist) \
|
|
list_for_each_entry_safe((rbe), (n), &(exlist)->list, list)
|
|
int xrep_collect_btree_extent(struct xfs_scrub *sc,
|
|
struct xrep_extent_list *btlist, xfs_fsblock_t fsbno,
|
|
xfs_extlen_t len);
|
|
void xrep_cancel_btree_extents(struct xfs_scrub *sc,
|
|
struct xrep_extent_list *btlist);
|
|
int xrep_subtract_extents(struct xfs_scrub *sc,
|
|
struct xrep_extent_list *exlist,
|
|
struct xrep_extent_list *sublist);
|
|
|
|
#endif /* __XFS_SCRUB_BITMAP_H__ */
|