]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - repair/rmap.h
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2016 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
9 extern bool collect_rmaps
;
11 extern bool rmap_needs_work(struct xfs_mount
*);
13 extern void rmaps_init(struct xfs_mount
*);
14 extern void rmaps_free(struct xfs_mount
*);
16 extern int rmap_add_rec(struct xfs_mount
*, xfs_ino_t
, int, struct xfs_bmbt_irec
*);
17 extern int rmap_finish_collecting_fork_recs(struct xfs_mount
*mp
,
19 extern int rmap_add_ag_rec(struct xfs_mount
*, xfs_agnumber_t agno
,
20 xfs_agblock_t agbno
, xfs_extlen_t len
, uint64_t owner
);
21 extern int rmap_add_bmbt_rec(struct xfs_mount
*, xfs_ino_t
, int, xfs_fsblock_t
);
22 extern int rmap_fold_raw_recs(struct xfs_mount
*mp
, xfs_agnumber_t agno
);
23 extern bool rmaps_are_mergeable(struct xfs_rmap_irec
*r1
, struct xfs_rmap_irec
*r2
);
25 extern int rmap_add_fixed_ag_rec(struct xfs_mount
*, xfs_agnumber_t
);
26 extern int rmap_store_ag_btree_rec(struct xfs_mount
*, xfs_agnumber_t
);
28 extern size_t rmap_record_count(struct xfs_mount
*, xfs_agnumber_t
);
29 extern int rmap_init_cursor(xfs_agnumber_t
, struct xfs_slab_cursor
**);
30 extern void rmap_avoid_check(void);
31 void rmaps_verify_btree(struct xfs_mount
*mp
, xfs_agnumber_t agno
);
33 extern int64_t rmap_diffkeys(struct xfs_rmap_irec
*kp1
,
34 struct xfs_rmap_irec
*kp2
);
35 extern void rmap_high_key_from_rec(struct xfs_rmap_irec
*rec
,
36 struct xfs_rmap_irec
*key
);
38 extern int compute_refcounts(struct xfs_mount
*, xfs_agnumber_t
);
39 extern size_t refcount_record_count(struct xfs_mount
*, xfs_agnumber_t
);
40 extern int init_refcount_cursor(xfs_agnumber_t
, struct xfs_slab_cursor
**);
41 extern void refcount_avoid_check(void);
42 void check_refcounts(struct xfs_mount
*mp
, xfs_agnumber_t agno
);
44 extern void record_inode_reflink_flag(struct xfs_mount
*, struct xfs_dinode
*,
45 xfs_agnumber_t
, xfs_agino_t
, xfs_ino_t
);
46 extern int fix_inode_reflink_flags(struct xfs_mount
*, xfs_agnumber_t
);
48 extern void fix_freelist(struct xfs_mount
*, xfs_agnumber_t
, bool);
49 extern void rmap_store_agflcount(struct xfs_mount
*, xfs_agnumber_t
, int);
51 xfs_extlen_t
estimate_rmapbt_blocks(struct xfs_perag
*pag
);
52 xfs_extlen_t
estimate_refcountbt_blocks(struct xfs_perag
*pag
);