|
@@ -88,6 +88,23 @@ xfs_refcount_lookup_ge(
|
|
|
return xfs_btree_lookup(cur, XFS_LOOKUP_GE, stat);
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * Look up the first record equal to [bno, len] in the btree
|
|
|
+ * given by cur.
|
|
|
+ */
|
|
|
+int
|
|
|
+xfs_refcount_lookup_eq(
|
|
|
+ struct xfs_btree_cur *cur,
|
|
|
+ xfs_agblock_t bno,
|
|
|
+ int *stat)
|
|
|
+{
|
|
|
+ trace_xfs_refcount_lookup(cur->bc_mp, cur->bc_private.a.agno, bno,
|
|
|
+ XFS_LOOKUP_LE);
|
|
|
+ cur->bc_rec.rc.rc_startblock = bno;
|
|
|
+ cur->bc_rec.rc.rc_blockcount = 0;
|
|
|
+ return xfs_btree_lookup(cur, XFS_LOOKUP_EQ, stat);
|
|
|
+}
|
|
|
+
|
|
|
/* Convert on-disk record to in-core format. */
|
|
|
void
|
|
|
xfs_refcount_btrec_to_irec(
|