]>
Commit | Line | Data |
---|---|---|
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 | ||
23 | extern bool collect_rmaps; | |
24 | ||
2d273771 | 25 | extern bool rmap_needs_work(struct xfs_mount *); |
9e0f480e | 26 | |
2d273771 DW |
27 | extern void rmaps_init(struct xfs_mount *); |
28 | extern void rmaps_free(struct xfs_mount *); | |
9e0f480e | 29 | |
2d273771 DW |
30 | extern int rmap_add_rec(struct xfs_mount *, xfs_ino_t, int, struct xfs_bmbt_irec *); |
31 | extern int rmap_finish_collecting_fork_recs(struct xfs_mount *mp, | |
b7f12e53 | 32 | xfs_agnumber_t agno); |
2d273771 | 33 | extern int rmap_add_ag_rec(struct xfs_mount *, xfs_agnumber_t agno, |
1102c155 | 34 | xfs_agblock_t agbno, xfs_extlen_t len, uint64_t owner); |
2d273771 DW |
35 | extern int rmap_add_bmbt_rec(struct xfs_mount *, xfs_ino_t, int, xfs_fsblock_t); |
36 | extern int rmap_fold_raw_recs(struct xfs_mount *mp, xfs_agnumber_t agno); | |
37 | extern bool rmaps_are_mergeable(struct xfs_rmap_irec *r1, struct xfs_rmap_irec *r2); | |
9e0f480e | 38 | |
2d273771 DW |
39 | extern int rmap_add_fixed_ag_rec(struct xfs_mount *, xfs_agnumber_t); |
40 | extern int rmap_store_ag_btree_rec(struct xfs_mount *, xfs_agnumber_t); | |
713b6817 | 41 | |
11b9e510 | 42 | extern size_t rmap_record_count(struct xfs_mount *, xfs_agnumber_t); |
2d273771 | 43 | extern int rmap_init_cursor(xfs_agnumber_t, struct xfs_slab_cursor **); |
11b9e510 | 44 | extern void rmap_avoid_check(void); |
2d273771 | 45 | extern int rmaps_verify_btree(struct xfs_mount *, xfs_agnumber_t); |
11b9e510 | 46 | |
14f8b681 | 47 | extern int64_t rmap_diffkeys(struct xfs_rmap_irec *kp1, |
11b9e510 DW |
48 | struct xfs_rmap_irec *kp2); |
49 | extern void rmap_high_key_from_rec(struct xfs_rmap_irec *rec, | |
50 | struct xfs_rmap_irec *key); | |
51 | ||
00f34bca | 52 | extern int compute_refcounts(struct xfs_mount *, xfs_agnumber_t); |
80dbc783 DW |
53 | extern size_t refcount_record_count(struct xfs_mount *, xfs_agnumber_t); |
54 | extern int init_refcount_cursor(xfs_agnumber_t, struct xfs_slab_cursor **); | |
55 | extern void refcount_avoid_check(void); | |
56 | extern int check_refcounts(struct xfs_mount *, xfs_agnumber_t); | |
57 | ||
7e174ec7 DW |
58 | extern void record_inode_reflink_flag(struct xfs_mount *, struct xfs_dinode *, |
59 | xfs_agnumber_t, xfs_agino_t, xfs_ino_t); | |
ca8d7d6a | 60 | extern int fix_inode_reflink_flags(struct xfs_mount *, xfs_agnumber_t); |
00f34bca | 61 | |
62cf990a DW |
62 | extern void fix_freelist(struct xfs_mount *, xfs_agnumber_t, bool); |
63 | extern void rmap_store_agflcount(struct xfs_mount *, xfs_agnumber_t, int); | |
64 | ||
9e0f480e | 65 | #endif /* RMAP_H_ */ |