diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:25:38 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-12-15 17:29:29 -0800 |
commit | a4fbafd73ae38184176b024b0eb2d36b3061d239 (patch) | |
tree | d4565a4e6c406ea18d95c1174e614454417e6cd6 /fs/xfs/libxfs/xfs_refcount.h | |
parent | bb8092d02d822601113897de29384972342ed1e8 (diff) |
xfs: export reference count information to userspacereport-refcounts_2021-12-15
Export refcount info to userspace so we can prototype a sharing-aware
defrag/fs rearranging tool.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_refcount.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_refcount.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_refcount.h b/fs/xfs/libxfs/xfs_refcount.h index f5230d31166c..f4b2f576f021 100644 --- a/fs/xfs/libxfs/xfs_refcount.h +++ b/fs/xfs/libxfs/xfs_refcount.h @@ -90,4 +90,14 @@ extern struct kmem_cache *xfs_refcount_intent_cache; int __init xfs_refcount_intent_init_cache(void); void xfs_refcount_intent_destroy_cache(void); +typedef int (*xfs_refcount_query_range_fn)( + struct xfs_btree_cur *cur, + struct xfs_refcount_irec *rec, + void *priv); + +int xfs_refcount_query_range(struct xfs_btree_cur *cur, + struct xfs_refcount_irec *low_rec, + struct xfs_refcount_irec *high_rec, + xfs_refcount_query_range_fn fn, void *priv); + #endif /* __XFS_REFCOUNT_H__ */ |