diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:16:23 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:17:29 -0700 |
commit | 329347290ff24672bc398056af8a2351c2a8d6e7 (patch) | |
tree | 0f133fdbe7f4694d6da3bc9ca8801b22a37a56bd /fs/xfs/libxfs/xfs_alloc.h | |
parent | c44d956ad25bba8e0c1a86d40e66fafce1a09563 (diff) |
xfs: fallocate free space into a filedefrag-freespace_2022-10-14
Add a new fallocate mode to map free physical space into a file, at the
same file offset as if the file were a sparse image of the physical
device backing the filesystem. The intent here is to use this to
prototype a free space defragmentation tool.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h index 0a28e32021fa..351829ec721b 100644 --- a/fs/xfs/libxfs/xfs_alloc.h +++ b/fs/xfs/libxfs/xfs_alloc.h @@ -246,4 +246,8 @@ extern struct kmem_cache *xfs_extfree_item_cache; int __init xfs_extfree_intent_init_cache(void); void xfs_extfree_intent_destroy_cache(void); +int xfs_alloc_find_freesp(struct xfs_trans *tp, struct xfs_perag *pag, + xfs_agblock_t *agbno, xfs_agblock_t end_agbno, + xfs_extlen_t *len); + #endif /* __XFS_ALLOC_H__ */ |