]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - repair/rmap.h
xfs_repair: rebuild reverse-mapping btree
[thirdparty/xfsprogs-dev.git] / repair / rmap.h
CommitLineData
9e0f480e
DW
1/*
2 * Copyright (C) 2016 Oracle. All Rights Reserved.
3 *
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it would be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20#ifndef RMAP_H_
21#define RMAP_H_
22
23extern bool collect_rmaps;
24
25extern bool needs_rmap_work(struct xfs_mount *);
26
27extern void init_rmaps(struct xfs_mount *);
28extern void free_rmaps(struct xfs_mount *);
29
30extern int add_rmap(struct xfs_mount *, xfs_ino_t, int, struct xfs_bmbt_irec *);
1102c155
DW
31extern int add_ag_rmap(struct xfs_mount *, xfs_agnumber_t agno,
32 xfs_agblock_t agbno, xfs_extlen_t len, uint64_t owner);
00efc33a 33extern int add_bmbt_rmap(struct xfs_mount *, xfs_ino_t, int, xfs_fsblock_t);
1102c155
DW
34extern int fold_raw_rmaps(struct xfs_mount *mp, xfs_agnumber_t agno);
35extern bool mergeable_rmaps(struct xfs_rmap_irec *r1, struct xfs_rmap_irec *r2);
9e0f480e 36
713b6817
DW
37extern int add_fixed_ag_rmap_data(struct xfs_mount *, xfs_agnumber_t);
38
11b9e510
DW
39extern size_t rmap_record_count(struct xfs_mount *, xfs_agnumber_t);
40extern int init_rmap_cursor(xfs_agnumber_t, struct xfs_slab_cursor **);
41extern void rmap_avoid_check(void);
42extern int check_rmaps(struct xfs_mount *, xfs_agnumber_t);
43
44extern __int64_t rmap_diffkeys(struct xfs_rmap_irec *kp1,
45 struct xfs_rmap_irec *kp2);
46extern void rmap_high_key_from_rec(struct xfs_rmap_irec *rec,
47 struct xfs_rmap_irec *key);
48
9e0f480e 49#endif /* RMAP_H_ */