Warning: This file is not a C or C++ file. It does not have highlighting.

1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2022-2023 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <djwong@kernel.org>
5 */
6#ifndef __XFS_SCRUB_REAP_H__
7#define __XFS_SCRUB_REAP_H__
8
9struct xagb_bitmap;
10struct xfsb_bitmap;
11
12int xrep_reap_agblocks(struct xfs_scrub *sc, struct xagb_bitmap *bitmap,
13 const struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
14int xrep_reap_fsblocks(struct xfs_scrub *sc, struct xfsb_bitmap *bitmap,
15 const struct xfs_owner_info *oinfo);
16int xrep_reap_ifork(struct xfs_scrub *sc, struct xfs_inode *ip, int whichfork);
17int xrep_reap_metadir_fsblocks(struct xfs_scrub *sc,
18 struct xfsb_bitmap *bitmap);
19
20#ifdef CONFIG_XFS_RT
21int xrep_reap_rtblocks(struct xfs_scrub *sc, struct xrtb_bitmap *bitmap,
22 const struct xfs_owner_info *oinfo);
23#else
24# define xrep_reap_rtblocks(...) (-EOPNOTSUPP)
25#endif /* CONFIG_XFS_RT */
26
27/* Buffer cache scan context. */
28struct xrep_bufscan {
29 /* Disk address for the buffers we want to scan. */
30 xfs_daddr_t daddr;
31
32 /* Maximum number of sectors to scan. */
33 xfs_daddr_t max_sectors;
34
35 /* Each round, increment the search length by this number of sectors. */
36 xfs_daddr_t daddr_step;
37
38 /* Internal scan state; initialize to zero. */
39 xfs_daddr_t __sector_count;
40};
41
42xfs_daddr_t xrep_bufscan_max_sectors(struct xfs_mount *mp,
43 xfs_extlen_t fsblocks);
44struct xfs_buf *xrep_bufscan_advance(struct xfs_mount *mp,
45 struct xrep_bufscan *scan);
46
47#endif /* __XFS_SCRUB_REAP_H__ */
48

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of linux/fs/xfs/scrub/reap.h