Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9799b438 authored by Dave Chinner's avatar Dave Chinner Committed by Dave Chinner
Browse files

xfs: move struct xfs_bmalloca to libxfs



It no long is used for stack splits, so strip the kernel workqueue
bits from it and push it back into libxfs/xfs_bmap.h so that
it can be shared with the userspace code.

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 5ebdc213
Loading
Loading
Loading
Loading
+31 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,37 @@ struct xfs_trans;


extern kmem_zone_t	*xfs_bmap_free_item_zone;
extern kmem_zone_t	*xfs_bmap_free_item_zone;


/*
 * Argument structure for xfs_bmap_alloc.
 */
struct xfs_bmalloca {
	xfs_fsblock_t		*firstblock; /* i/o first block allocated */
	struct xfs_bmap_free	*flist;	/* bmap freelist */
	struct xfs_trans	*tp;	/* transaction pointer */
	struct xfs_inode	*ip;	/* incore inode pointer */
	struct xfs_bmbt_irec	prev;	/* extent before the new one */
	struct xfs_bmbt_irec	got;	/* extent after, or delayed */

	xfs_fileoff_t		offset;	/* offset in file filling in */
	xfs_extlen_t		length;	/* i/o length asked/allocated */
	xfs_fsblock_t		blkno;	/* starting block of new extent */

	struct xfs_btree_cur	*cur;	/* btree cursor */
	xfs_extnum_t		idx;	/* current extent index */
	int			nallocs;/* number of extents alloc'd */
	int			logflags;/* flags for transaction logging */

	xfs_extlen_t		total;	/* total blocks needed for xaction */
	xfs_extlen_t		minlen;	/* minimum allocation size (blocks) */
	xfs_extlen_t		minleft; /* amount must be left after alloc */
	bool			eof;	/* set if allocating past last extent */
	bool			wasdel;	/* replacing a delayed allocation */
	bool			userdata;/* set if is user data */
	bool			aeof;	/* allocated space at eof */
	bool			conv;	/* overwriting unwritten extents */
	int			flags;
};

/*
/*
 * List of extents to be free "later".
 * List of extents to be free "later".
 * The list is kept sorted on xbf_startblock.
 * The list is kept sorted on xbf_startblock.
+1 −34
Original line number Original line Diff line number Diff line
@@ -26,40 +26,7 @@ struct xfs_ifork;
struct xfs_inode;
struct xfs_inode;
struct xfs_mount;
struct xfs_mount;
struct xfs_trans;
struct xfs_trans;

struct xfs_bmalloca;
/*
 * Argument structure for xfs_bmap_alloc.
 */
struct xfs_bmalloca {
	xfs_fsblock_t		*firstblock; /* i/o first block allocated */
	struct xfs_bmap_free	*flist;	/* bmap freelist */
	struct xfs_trans	*tp;	/* transaction pointer */
	struct xfs_inode	*ip;	/* incore inode pointer */
	struct xfs_bmbt_irec	prev;	/* extent before the new one */
	struct xfs_bmbt_irec	got;	/* extent after, or delayed */

	xfs_fileoff_t		offset;	/* offset in file filling in */
	xfs_extlen_t		length;	/* i/o length asked/allocated */
	xfs_fsblock_t		blkno;	/* starting block of new extent */

	struct xfs_btree_cur	*cur;	/* btree cursor */
	xfs_extnum_t		idx;	/* current extent index */
	int			nallocs;/* number of extents alloc'd */
	int			logflags;/* flags for transaction logging */

	xfs_extlen_t		total;	/* total blocks needed for xaction */
	xfs_extlen_t		minlen;	/* minimum allocation size (blocks) */
	xfs_extlen_t		minleft; /* amount must be left after alloc */
	bool			eof;	/* set if allocating past last extent */
	bool			wasdel;	/* replacing a delayed allocation */
	bool			userdata;/* set if is user data */
	bool			aeof;	/* allocated space at eof */
	bool			conv;	/* overwriting unwritten extents */
	int			flags;
	struct completion	*done;
	struct work_struct	work;
	int			result;
};


int	xfs_bmap_finish(struct xfs_trans **tp, struct xfs_bmap_free *flist,
int	xfs_bmap_finish(struct xfs_trans **tp, struct xfs_bmap_free *flist,
			int *committed);
			int *committed);