aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-18 16:40:48 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:04 -0400
commit4403280aa5c00c6074f2dc23e1cfc11f2bfb0032 (patch)
tree322f188e78d6faf1cae53cb56ed7918d49702366 /fs/xfs/xfs_bmap.h
parentb64dfe4e180ab5047c59bcbe379538eb23be4d8e (diff)
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
65 * Flags for xfs_bmapi 65 * Flags for xfs_bmapi
66 */ 66 */
67#define XFS_BMAPI_WRITE 0x001 /* write operation: allocate space */ 67#define XFS_BMAPI_WRITE 0x001 /* write operation: allocate space */
68#define XFS_BMAPI_DELAY 0x002 /* delayed write operation */
69#define XFS_BMAPI_ENTIRE 0x004 /* return entire extent, not trimmed */ 68#define XFS_BMAPI_ENTIRE 0x004 /* return entire extent, not trimmed */
70#define XFS_BMAPI_METADATA 0x008 /* mapping metadata not user data */ 69#define XFS_BMAPI_METADATA 0x008 /* mapping metadata not user data */
71#define XFS_BMAPI_ATTRFORK 0x010 /* use attribute fork not data */ 70#define XFS_BMAPI_ATTRFORK 0x010 /* use attribute fork not data */
@@ -82,7 +81,6 @@ typedef struct xfs_bmap_free
82 81
83#define XFS_BMAPI_FLAGS \ 82#define XFS_BMAPI_FLAGS \
84 { XFS_BMAPI_WRITE, "WRITE" }, \ 83 { XFS_BMAPI_WRITE, "WRITE" }, \
85 { XFS_BMAPI_DELAY, "DELAY" }, \
86 { XFS_BMAPI_ENTIRE, "ENTIRE" }, \ 84 { XFS_BMAPI_ENTIRE, "ENTIRE" }, \
87 { XFS_BMAPI_METADATA, "METADATA" }, \ 85 { XFS_BMAPI_METADATA, "METADATA" }, \
88 { XFS_BMAPI_ATTRFORK, "ATTRFORK" }, \ 86 { XFS_BMAPI_ATTRFORK, "ATTRFORK" }, \
@@ -297,6 +295,9 @@ xfs_bmapi(
297int xfs_bmapi_read(struct xfs_inode *ip, xfs_fileoff_t bno, 295int xfs_bmapi_read(struct xfs_inode *ip, xfs_fileoff_t bno,
298 xfs_filblks_t len, struct xfs_bmbt_irec *mval, 296 xfs_filblks_t len, struct xfs_bmbt_irec *mval,
299 int *nmap, int flags); 297 int *nmap, int flags);
298int xfs_bmapi_delay(struct xfs_inode *ip, xfs_fileoff_t bno,
299 xfs_filblks_t len, struct xfs_bmbt_irec *mval,
300 int *nmap, int flags);
300 301
301/* 302/*
302 * Unmap (remove) blocks from a file. 303 * Unmap (remove) blocks from a file.