diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-08-03 11:39:05 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-08-03 11:39:05 +1000 |
commit | 4b8ed67794fe57b23801c65f4ea5b0f0b1f0dbab (patch) | |
tree | 1114e25bd4a5faca22f87a478bd11e3d10edc683 /fs/xfs/libxfs/xfs_rmap.h | |
parent | 525488520ac69a3612dbceefa573b255a83005e9 (diff) | |
download | linux-4b8ed67794fe57b23801c65f4ea5b0f0b1f0dbab.tar.bz2 |
xfs: add rmap btree operations
Originally-From: Dave Chinner <dchinner@redhat.com>
Implement the generic btree operations needed to manipulate rmap
btree blocks. This is very similar to the per-ag freespace btree
implementation, and uses the AGFL for allocation and freeing of
blocks.
Adapt the rmap btree to store owner offsets within each rmap record,
and to handle the primary key being redefined as the tuple
[agblk, owner, offset]. The expansion of the primary key is crucial
to allowing multiple owners per extent.
[darrick: adapt the btree ops to deal with offsets]
[darrick: remove init_rec_from_key]
[darrick: move unwritten bit to rm_offset]
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_rmap.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.h b/fs/xfs/libxfs/xfs_rmap.h index e7a670459fea..aa39a2a825e7 100644 --- a/fs/xfs/libxfs/xfs_rmap.h +++ b/fs/xfs/libxfs/xfs_rmap.h @@ -142,4 +142,13 @@ int xfs_rmap_free(struct xfs_trans *tp, struct xfs_buf *agbp, xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len, struct xfs_owner_info *oinfo); +int xfs_rmap_lookup_le(struct xfs_btree_cur *cur, xfs_agblock_t bno, + xfs_extlen_t len, uint64_t owner, uint64_t offset, + unsigned int flags, int *stat); +int xfs_rmap_lookup_eq(struct xfs_btree_cur *cur, xfs_agblock_t bno, + xfs_extlen_t len, uint64_t owner, uint64_t offset, + unsigned int flags, int *stat); +int xfs_rmap_get_rec(struct xfs_btree_cur *cur, struct xfs_rmap_irec *irec, + int *stat); + #endif /* __XFS_RMAP_H__ */ |