diff options
author | Christoph Hellwig <hch@lst.de> | 2008-12-03 06:20:26 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@sgi.com> | 2008-12-03 23:39:20 -0500 |
commit | 5d765b976c3a41faf9a73718fb8cc5833990a8ef (patch) | |
tree | 05ece6cc9b8b9cbcd1775ecbd9df72ff0e855926 /fs/xfs/linux-2.6/xfs_buf.h | |
parent | 5cafdeb2891a415a5dbf0ad80f0afedf8369e6bb (diff) |
kill xfs_buf_iostart
xfs_buf_iostart is a "shared" helper for xfs_buf_read_flags,
xfs_bawrite, and xfs_bdwrite - except that there isn't much shared
code but rather special cases for each caller.
So remove this function and move the functionality to the caller.
xfs_bawrite and xfs_bdwrite are now big enough to be moved out of
line and the xfs_buf_read_flags is moved into a new helper called
_xfs_buf_read.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 456519a088c7..0e2aa16f5e41 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -214,9 +214,10 @@ extern void xfs_buf_lock(xfs_buf_t *); | |||
214 | extern void xfs_buf_unlock(xfs_buf_t *); | 214 | extern void xfs_buf_unlock(xfs_buf_t *); |
215 | 215 | ||
216 | /* Buffer Read and Write Routines */ | 216 | /* Buffer Read and Write Routines */ |
217 | extern int xfs_bawrite(void *mp, xfs_buf_t *bp); | ||
218 | extern void xfs_bdwrite(void *mp, xfs_buf_t *bp); | ||
217 | extern void xfs_buf_ioend(xfs_buf_t *, int); | 219 | extern void xfs_buf_ioend(xfs_buf_t *, int); |
218 | extern void xfs_buf_ioerror(xfs_buf_t *, int); | 220 | extern void xfs_buf_ioerror(xfs_buf_t *, int); |
219 | extern int xfs_buf_iostart(xfs_buf_t *, xfs_buf_flags_t); | ||
220 | extern int xfs_buf_iorequest(xfs_buf_t *); | 221 | extern int xfs_buf_iorequest(xfs_buf_t *); |
221 | extern int xfs_buf_iowait(xfs_buf_t *); | 222 | extern int xfs_buf_iowait(xfs_buf_t *); |
222 | extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, xfs_caddr_t, | 223 | extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, xfs_caddr_t, |
@@ -366,14 +367,6 @@ extern void xfs_buf_trace(xfs_buf_t *, char *, void *, void *); | |||
366 | #define XFS_BUF_TARGET(bp) ((bp)->b_target) | 367 | #define XFS_BUF_TARGET(bp) ((bp)->b_target) |
367 | #define XFS_BUFTARG_NAME(target) xfs_buf_target_name(target) | 368 | #define XFS_BUFTARG_NAME(target) xfs_buf_target_name(target) |
368 | 369 | ||
369 | static inline int xfs_bawrite(void *mp, xfs_buf_t *bp) | ||
370 | { | ||
371 | bp->b_fspriv3 = mp; | ||
372 | bp->b_strat = xfs_bdstrat_cb; | ||
373 | xfs_buf_delwri_dequeue(bp); | ||
374 | return xfs_buf_iostart(bp, XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES); | ||
375 | } | ||
376 | |||
377 | static inline void xfs_buf_relse(xfs_buf_t *bp) | 370 | static inline void xfs_buf_relse(xfs_buf_t *bp) |
378 | { | 371 | { |
379 | if (!bp->b_relse) | 372 | if (!bp->b_relse) |
@@ -414,17 +407,6 @@ static inline int XFS_bwrite(xfs_buf_t *bp) | |||
414 | return error; | 407 | return error; |
415 | } | 408 | } |
416 | 409 | ||
417 | /* | ||
418 | * No error can be returned from xfs_buf_iostart for delwri | ||
419 | * buffers as they are queued and no I/O is issued. | ||
420 | */ | ||
421 | static inline void xfs_bdwrite(void *mp, xfs_buf_t *bp) | ||
422 | { | ||
423 | bp->b_strat = xfs_bdstrat_cb; | ||
424 | bp->b_fspriv3 = mp; | ||
425 | (void)xfs_buf_iostart(bp, XBF_DELWRI | XBF_ASYNC); | ||
426 | } | ||
427 | |||
428 | #define XFS_bdstrat(bp) xfs_buf_iorequest(bp) | 410 | #define XFS_bdstrat(bp) xfs_buf_iorequest(bp) |
429 | 411 | ||
430 | #define xfs_iowait(bp) xfs_buf_iowait(bp) | 412 | #define xfs_iowait(bp) xfs_buf_iowait(bp) |