summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-18 20:40:48 +0000
committerAlex Elder <aelder@sgi.com>2011-10-11 21:15:04 -0500
commit4403280aa5c00c6074f2dc23e1cfc11f2bfb0032 (patch)
tree322f188e78d6faf1cae53cb56ed7918d49702366 /fs/xfs/xfs_bmap.h
parentb64dfe4e180ab5047c59bcbe379538eb23be4d8e (diff)
downloadblackbird-obmc-linux-4403280aa5c00c6074f2dc23e1cfc11f2bfb0032.tar.gz
blackbird-obmc-linux-4403280aa5c00c6074f2dc23e1cfc11f2bfb0032.zip
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>
Diffstat (limited to 'fs/xfs/xfs_bmap.h')
-rw-r--r--fs/xfs/xfs_bmap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 01693390df21..c70c19c7f1fa 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -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.
OpenPOWER on IntegriCloud