diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-08-23 04:28:06 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 22:14:59 -0400 |
commit | 61551f1ee536289084a4a8f1c4f187e2f371c440 (patch) | |
tree | b160fd8779bafb6ec8e99f928bcb3e222a91817e /fs/xfs/xfs_buf.h | |
parent | 5a8ee6bafdd0ab8555adceac8b2cec539a552a1f (diff) |
xfs: call xfs_buf_delwri_queue directly
Unify the ways we add buffers to the delwri queue by always calling
xfs_buf_delwri_queue directly. The xfs_bdwrite functions is removed and
opencoded in its callers, and the two places setting XBF_DELWRI while a
buffer is locked and expecting xfs_buf_unlock to pick it up are converted
to call xfs_buf_delwri_queue directly, too. Also replace the
XFS_BUF_UNDELAYWRITE macro with direct calls to xfs_buf_delwri_dequeue
to make the explicit queuing/dequeuing more obvious.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf.h')
-rw-r--r-- | fs/xfs/xfs_buf.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index 620972b8094d..f1a8933becb6 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h | |||
@@ -198,7 +198,6 @@ extern void xfs_buf_unlock(xfs_buf_t *); | |||
198 | 198 | ||
199 | /* Buffer Read and Write Routines */ | 199 | /* Buffer Read and Write Routines */ |
200 | extern int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp); | 200 | extern int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp); |
201 | extern void xfs_bdwrite(void *mp, xfs_buf_t *bp); | ||
202 | 201 | ||
203 | extern void xfsbdstrat(struct xfs_mount *, struct xfs_buf *); | 202 | extern void xfsbdstrat(struct xfs_mount *, struct xfs_buf *); |
204 | extern int xfs_bdstrat_cb(struct xfs_buf *); | 203 | extern int xfs_bdstrat_cb(struct xfs_buf *); |
@@ -221,8 +220,9 @@ static inline int xfs_buf_geterror(xfs_buf_t *bp) | |||
221 | extern xfs_caddr_t xfs_buf_offset(xfs_buf_t *, size_t); | 220 | extern xfs_caddr_t xfs_buf_offset(xfs_buf_t *, size_t); |
222 | 221 | ||
223 | /* Delayed Write Buffer Routines */ | 222 | /* Delayed Write Buffer Routines */ |
224 | extern void xfs_buf_delwri_dequeue(xfs_buf_t *); | 223 | extern void xfs_buf_delwri_queue(struct xfs_buf *); |
225 | extern void xfs_buf_delwri_promote(xfs_buf_t *); | 224 | extern void xfs_buf_delwri_dequeue(struct xfs_buf *); |
225 | extern void xfs_buf_delwri_promote(struct xfs_buf *); | ||
226 | 226 | ||
227 | /* Buffer Daemon Setup Routines */ | 227 | /* Buffer Daemon Setup Routines */ |
228 | extern int xfs_buf_init(void); | 228 | extern int xfs_buf_init(void); |
@@ -251,8 +251,6 @@ void xfs_buf_stale(struct xfs_buf *bp); | |||
251 | XFS_BUF_DONE(bp); \ | 251 | XFS_BUF_DONE(bp); \ |
252 | } while (0) | 252 | } while (0) |
253 | 253 | ||
254 | #define XFS_BUF_DELAYWRITE(bp) ((bp)->b_flags |= XBF_DELWRI) | ||
255 | #define XFS_BUF_UNDELAYWRITE(bp) xfs_buf_delwri_dequeue(bp) | ||
256 | #define XFS_BUF_ISDELAYWRITE(bp) ((bp)->b_flags & XBF_DELWRI) | 254 | #define XFS_BUF_ISDELAYWRITE(bp) ((bp)->b_flags & XBF_DELWRI) |
257 | 255 | ||
258 | #define XFS_BUF_DONE(bp) ((bp)->b_flags |= XBF_DONE) | 256 | #define XFS_BUF_DONE(bp) ((bp)->b_flags |= XBF_DONE) |