diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.h')
| -rw-r--r-- | fs/xfs/libxfs/xfs_alloc.h | 18 | 
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h index 0b956f8b9d5a..fae170825be0 100644 --- a/fs/xfs/libxfs/xfs_alloc.h +++ b/fs/xfs/libxfs/xfs_alloc.h @@ -80,6 +80,10 @@ int xfs_alloc_get_freelist(struct xfs_perag *pag, struct xfs_trans *tp,  int xfs_alloc_put_freelist(struct xfs_perag *pag, struct xfs_trans *tp,  		struct xfs_buf *agfbp, struct xfs_buf *agflbp,  		xfs_agblock_t bno, int btreeblk); +int xfs_free_ag_extent(struct xfs_trans *tp, struct xfs_buf *agbp, +		xfs_agnumber_t agno, xfs_agblock_t bno, +		xfs_extlen_t len, const struct xfs_owner_info *oinfo, +		enum xfs_ag_resv_type type);  /*   * Compute and fill in value of m_alloc_maxlevels. @@ -194,8 +198,6 @@ int xfs_alloc_read_agf(struct xfs_perag *pag, struct xfs_trans *tp, int flags,  		struct xfs_buf **agfbpp);  int xfs_alloc_read_agfl(struct xfs_perag *pag, struct xfs_trans *tp,  		struct xfs_buf **bpp); -int xfs_free_agfl_block(struct xfs_trans *, xfs_agnumber_t, xfs_agblock_t, -			struct xfs_buf *, struct xfs_owner_info *);  int xfs_alloc_fix_freelist(struct xfs_alloc_arg *args, uint32_t alloc_flags);  int xfs_free_extent_fix_freelist(struct xfs_trans *tp, struct xfs_perag *pag,  		struct xfs_buf **agbp); @@ -233,7 +235,12 @@ xfs_buf_to_agfl_bno(  int xfs_free_extent_later(struct xfs_trans *tp, xfs_fsblock_t bno,  		xfs_filblks_t len, const struct xfs_owner_info *oinfo, -		enum xfs_ag_resv_type type, bool skip_discard); +		enum xfs_ag_resv_type type, unsigned int free_flags); + +/* Don't issue a discard for the blocks freed. */ +#define XFS_FREE_EXTENT_SKIP_DISCARD	(1U << 0) + +#define XFS_FREE_EXTENT_ALL_FLAGS	(XFS_FREE_EXTENT_SKIP_DISCARD)  /*   * List of extents to be free "later". @@ -249,9 +256,6 @@ struct xfs_extent_free_item {  	enum xfs_ag_resv_type	xefi_agresv;  }; -void xfs_extent_free_get_group(struct xfs_mount *mp, -		struct xfs_extent_free_item *xefi); -  #define XFS_EFI_SKIP_DISCARD	(1U << 0) /* don't issue discard */  #define XFS_EFI_ATTR_FORK	(1U << 1) /* freeing attr fork block */  #define XFS_EFI_BMBT_BLOCK	(1U << 2) /* freeing bmap btree block */ @@ -262,7 +266,7 @@ struct xfs_alloc_autoreap {  };  int xfs_alloc_schedule_autoreap(const struct xfs_alloc_arg *args, -		bool skip_discard, struct xfs_alloc_autoreap *aarp); +		unsigned int free_flags, struct xfs_alloc_autoreap *aarp);  void xfs_alloc_cancel_autoreap(struct xfs_trans *tp,  		struct xfs_alloc_autoreap *aarp);  void xfs_alloc_commit_autoreap(struct xfs_trans *tp,  |