diff options
author | Dave Chinner <dchinner@redhat.com> | 2023-02-13 09:14:55 +1100 |
---|---|---|
committer | Dave Chinner <dchinner@redhat.com> | 2023-02-13 09:14:55 +1100 |
commit | 05cf492a8d01f48d4b8d8f0b93f2d75de7349f12 (patch) | |
tree | 396e61356b85313b0fb861e1403efc16d6f865e3 /fs/xfs/libxfs/xfs_bmap.h | |
parent | 6b637ad0c7be85ecb795697ea51051039b753da2 (diff) | |
download | linux-stable-05cf492a8d01f48d4b8d8f0b93f2d75de7349f12.tar.gz linux-stable-05cf492a8d01f48d4b8d8f0b93f2d75de7349f12.tar.bz2 linux-stable-05cf492a8d01f48d4b8d8f0b93f2d75de7349f12.zip |
xfs: use xfs_bmap_longest_free_extent() in filestreams
The code in xfs_bmap_longest_free_extent() is open coded in
xfs_filestream_pick_ag(). Export xfs_bmap_longest_free_extent and
call it from the filestreams code instead.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h index 524912f276f8..b52cfdcb9320 100644 --- a/fs/xfs/libxfs/xfs_bmap.h +++ b/fs/xfs/libxfs/xfs_bmap.h @@ -168,6 +168,8 @@ static inline bool xfs_bmap_is_written_extent(struct xfs_bmbt_irec *irec) #define xfs_valid_startblock(ip, startblock) \ ((startblock) != 0 || XFS_IS_REALTIME_INODE(ip)) +int xfs_bmap_longest_free_extent(struct xfs_perag *pag, + struct xfs_trans *tp, xfs_extlen_t *blen); void xfs_trim_extent(struct xfs_bmbt_irec *irec, xfs_fileoff_t bno, xfs_filblks_t len); unsigned int xfs_bmap_compute_attr_offset(struct xfs_mount *mp); |