xfs: introduce xfs_bmapi_delay()
Delalloc reservations are much simpler than allocations, so give them a separate bmapi-level interface. Using the previously added xfs_bmapi_reserve_delalloc we get a function that is only minimally more complicated than xfs_bmapi_read, which is far from the complexity in xfs_bmapi. Also remove the XFS_BMAPI_DELAY code after switching over the only user to xfs_bmapi_delay. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
committed by
Alex Elder
parent
b64dfe4e18
commit
4403280aa5
@@ -65,7 +65,6 @@ typedef struct xfs_bmap_free
|
||||
* Flags for xfs_bmapi
|
||||
*/
|
||||
#define XFS_BMAPI_WRITE 0x001 /* write operation: allocate space */
|
||||
#define XFS_BMAPI_DELAY 0x002 /* delayed write operation */
|
||||
#define XFS_BMAPI_ENTIRE 0x004 /* return entire extent, not trimmed */
|
||||
#define XFS_BMAPI_METADATA 0x008 /* mapping metadata not user data */
|
||||
#define XFS_BMAPI_ATTRFORK 0x010 /* use attribute fork not data */
|
||||
@@ -82,7 +81,6 @@ typedef struct xfs_bmap_free
|
||||
|
||||
#define XFS_BMAPI_FLAGS \
|
||||
{ XFS_BMAPI_WRITE, "WRITE" }, \
|
||||
{ XFS_BMAPI_DELAY, "DELAY" }, \
|
||||
{ XFS_BMAPI_ENTIRE, "ENTIRE" }, \
|
||||
{ XFS_BMAPI_METADATA, "METADATA" }, \
|
||||
{ XFS_BMAPI_ATTRFORK, "ATTRFORK" }, \
|
||||
@@ -297,6 +295,9 @@ xfs_bmapi(
|
||||
int xfs_bmapi_read(struct xfs_inode *ip, xfs_fileoff_t bno,
|
||||
xfs_filblks_t len, struct xfs_bmbt_irec *mval,
|
||||
int *nmap, int flags);
|
||||
int xfs_bmapi_delay(struct xfs_inode *ip, xfs_fileoff_t bno,
|
||||
xfs_filblks_t len, struct xfs_bmbt_irec *mval,
|
||||
int *nmap, int flags);
|
||||
|
||||
/*
|
||||
* Unmap (remove) blocks from a file.
|
||||
|
Reference in New Issue
Block a user