Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Copyright (C) 2016 Oracle.  All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Author: Darrick J. Wong <darrick.wong@oracle.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #ifndef __XFS_RMAP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #define __XFS_RMAP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) static inline void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) xfs_rmap_ino_bmbt_owner(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 	struct xfs_owner_info	*oi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 	xfs_ino_t		ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 	int			whichfork)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	oi->oi_owner = ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	oi->oi_offset = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	oi->oi_flags = XFS_OWNER_INFO_BMBT_BLOCK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	if (whichfork == XFS_ATTR_FORK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 		oi->oi_flags |= XFS_OWNER_INFO_ATTR_FORK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) static inline void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) xfs_rmap_ino_owner(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	struct xfs_owner_info	*oi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	xfs_ino_t		ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	int			whichfork,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	xfs_fileoff_t		offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	oi->oi_owner = ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	oi->oi_offset = offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	oi->oi_flags = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	if (whichfork == XFS_ATTR_FORK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		oi->oi_flags |= XFS_OWNER_INFO_ATTR_FORK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) static inline bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) xfs_rmap_should_skip_owner_update(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	const struct xfs_owner_info	*oi)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	return oi->oi_owner == XFS_RMAP_OWN_NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) /* Reverse mapping functions. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) struct xfs_buf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) static inline __u64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) xfs_rmap_irec_offset_pack(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	const struct xfs_rmap_irec	*irec)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	__u64			x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	x = XFS_RMAP_OFF(irec->rm_offset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	if (irec->rm_flags & XFS_RMAP_ATTR_FORK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		x |= XFS_RMAP_OFF_ATTR_FORK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	if (irec->rm_flags & XFS_RMAP_BMBT_BLOCK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		x |= XFS_RMAP_OFF_BMBT_BLOCK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	if (irec->rm_flags & XFS_RMAP_UNWRITTEN)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		x |= XFS_RMAP_OFF_UNWRITTEN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	return x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) static inline int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) xfs_rmap_irec_offset_unpack(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	__u64			offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	struct xfs_rmap_irec	*irec)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	if (offset & ~(XFS_RMAP_OFF_MASK | XFS_RMAP_OFF_FLAGS))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		return -EFSCORRUPTED;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	irec->rm_offset = XFS_RMAP_OFF(offset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	irec->rm_flags = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	if (offset & XFS_RMAP_OFF_ATTR_FORK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		irec->rm_flags |= XFS_RMAP_ATTR_FORK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	if (offset & XFS_RMAP_OFF_BMBT_BLOCK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 		irec->rm_flags |= XFS_RMAP_BMBT_BLOCK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	if (offset & XFS_RMAP_OFF_UNWRITTEN)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		irec->rm_flags |= XFS_RMAP_UNWRITTEN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) static inline void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) xfs_owner_info_unpack(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	const struct xfs_owner_info	*oinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	uint64_t			*owner,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	uint64_t			*offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	unsigned int			*flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	unsigned int			r = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	*owner = oinfo->oi_owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	*offset = oinfo->oi_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	if (oinfo->oi_flags & XFS_OWNER_INFO_ATTR_FORK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		r |= XFS_RMAP_ATTR_FORK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	if (oinfo->oi_flags & XFS_OWNER_INFO_BMBT_BLOCK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		r |= XFS_RMAP_BMBT_BLOCK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	*flags = r;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) static inline void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) xfs_owner_info_pack(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	struct xfs_owner_info	*oinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	uint64_t		owner,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	uint64_t		offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	unsigned int		flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	oinfo->oi_owner = owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	oinfo->oi_offset = XFS_RMAP_OFF(offset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	oinfo->oi_flags = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	if (flags & XFS_RMAP_ATTR_FORK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 		oinfo->oi_flags |= XFS_OWNER_INFO_ATTR_FORK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	if (flags & XFS_RMAP_BMBT_BLOCK)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		oinfo->oi_flags |= XFS_OWNER_INFO_BMBT_BLOCK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) int xfs_rmap_alloc(struct xfs_trans *tp, struct xfs_buf *agbp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		   xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 		   const struct xfs_owner_info *oinfo);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) int xfs_rmap_free(struct xfs_trans *tp, struct xfs_buf *agbp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		  xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		  const struct xfs_owner_info *oinfo);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) int xfs_rmap_lookup_le(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		xfs_extlen_t len, uint64_t owner, uint64_t offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		unsigned int flags, int *stat);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) int xfs_rmap_lookup_eq(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		xfs_extlen_t len, uint64_t owner, uint64_t offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		unsigned int flags, int *stat);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) int xfs_rmap_insert(struct xfs_btree_cur *rcur, xfs_agblock_t agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		xfs_extlen_t len, uint64_t owner, uint64_t offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		unsigned int flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) int xfs_rmap_get_rec(struct xfs_btree_cur *cur, struct xfs_rmap_irec *irec,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		int *stat);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) typedef int (*xfs_rmap_query_range_fn)(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	struct xfs_btree_cur	*cur,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	struct xfs_rmap_irec	*rec,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	void			*priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) int xfs_rmap_query_range(struct xfs_btree_cur *cur,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		struct xfs_rmap_irec *low_rec, struct xfs_rmap_irec *high_rec,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		xfs_rmap_query_range_fn fn, void *priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) int xfs_rmap_query_all(struct xfs_btree_cur *cur, xfs_rmap_query_range_fn fn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		void *priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) enum xfs_rmap_intent_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	XFS_RMAP_MAP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	XFS_RMAP_MAP_SHARED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	XFS_RMAP_UNMAP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	XFS_RMAP_UNMAP_SHARED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	XFS_RMAP_CONVERT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	XFS_RMAP_CONVERT_SHARED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	XFS_RMAP_ALLOC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	XFS_RMAP_FREE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) struct xfs_rmap_intent {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	struct list_head			ri_list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	enum xfs_rmap_intent_type		ri_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	uint64_t				ri_owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	int					ri_whichfork;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	struct xfs_bmbt_irec			ri_bmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) /* functions for updating the rmapbt based on bmbt map/unmap operations */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) void xfs_rmap_map_extent(struct xfs_trans *tp, struct xfs_inode *ip,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		int whichfork, struct xfs_bmbt_irec *imap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) void xfs_rmap_unmap_extent(struct xfs_trans *tp, struct xfs_inode *ip,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		int whichfork, struct xfs_bmbt_irec *imap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) void xfs_rmap_convert_extent(struct xfs_mount *mp, struct xfs_trans *tp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		struct xfs_inode *ip, int whichfork,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		struct xfs_bmbt_irec *imap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) void xfs_rmap_alloc_extent(struct xfs_trans *tp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		xfs_agblock_t bno, xfs_extlen_t len, uint64_t owner);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) void xfs_rmap_free_extent(struct xfs_trans *tp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		xfs_agblock_t bno, xfs_extlen_t len, uint64_t owner);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) void xfs_rmap_finish_one_cleanup(struct xfs_trans *tp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		struct xfs_btree_cur *rcur, int error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) int xfs_rmap_finish_one(struct xfs_trans *tp, enum xfs_rmap_intent_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		uint64_t owner, int whichfork, xfs_fileoff_t startoff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		xfs_fsblock_t startblock, xfs_filblks_t blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		xfs_exntst_t state, struct xfs_btree_cur **pcur);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) int xfs_rmap_find_left_neighbor(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		uint64_t owner, uint64_t offset, unsigned int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		struct xfs_rmap_irec *irec, int	*stat);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) int xfs_rmap_lookup_le_range(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		uint64_t owner, uint64_t offset, unsigned int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		struct xfs_rmap_irec *irec, int	*stat);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) int xfs_rmap_compare(const struct xfs_rmap_irec *a,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		const struct xfs_rmap_irec *b);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) union xfs_btree_rec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) int xfs_rmap_btrec_to_irec(union xfs_btree_rec *rec,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		struct xfs_rmap_irec *irec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) int xfs_rmap_has_record(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		xfs_extlen_t len, bool *exists);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) int xfs_rmap_record_exists(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		xfs_extlen_t len, const struct xfs_owner_info *oinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		bool *has_rmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) int xfs_rmap_has_other_keys(struct xfs_btree_cur *cur, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 		xfs_extlen_t len, const struct xfs_owner_info *oinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		bool *has_rmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) int xfs_rmap_map_raw(struct xfs_btree_cur *cur, struct xfs_rmap_irec *rmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) extern const struct xfs_owner_info XFS_RMAP_OINFO_SKIP_UPDATE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) extern const struct xfs_owner_info XFS_RMAP_OINFO_ANY_OWNER;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) extern const struct xfs_owner_info XFS_RMAP_OINFO_FS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) extern const struct xfs_owner_info XFS_RMAP_OINFO_LOG;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) extern const struct xfs_owner_info XFS_RMAP_OINFO_AG;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) extern const struct xfs_owner_info XFS_RMAP_OINFO_INOBT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) extern const struct xfs_owner_info XFS_RMAP_OINFO_INODES;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) extern const struct xfs_owner_info XFS_RMAP_OINFO_REFC;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) extern const struct xfs_owner_info XFS_RMAP_OINFO_COW;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #endif	/* __XFS_RMAP_H__ */