diff options
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, 6 insertions, 16 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 67c19f799232..39c8ca122534 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -69,14 +69,11 @@ typedef enum page_buf_flags_e { /* pb_flags values */ | |||
69 | PBF_READ = (1 << 0), /* buffer intended for reading from device */ | 69 | PBF_READ = (1 << 0), /* buffer intended for reading from device */ |
70 | PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ | 70 | PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ |
71 | PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ | 71 | PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ |
72 | PBF_PARTIAL = (1 << 3), /* buffer partially read */ | ||
73 | PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ | 72 | PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ |
74 | PBF_NONE = (1 << 5), /* buffer not read at all */ | 73 | PBF_NONE = (1 << 5), /* buffer not read at all */ |
75 | PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ | 74 | PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ |
76 | PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ | 75 | PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ |
77 | PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ | 76 | PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ |
78 | PBF_FS_DATAIOD = (1 << 9), /* schedule IO completion on fs datad */ | ||
79 | PBF_FORCEIO = (1 << 10), /* ignore any cache state */ | ||
80 | PBF_FLUSH = (1 << 11), /* flush disk write cache */ | 77 | PBF_FLUSH = (1 << 11), /* flush disk write cache */ |
81 | PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */ | 78 | PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */ |
82 | 79 | ||
@@ -92,9 +89,6 @@ typedef enum page_buf_flags_e { /* pb_flags values */ | |||
92 | _PBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ | 89 | _PBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ |
93 | } page_buf_flags_t; | 90 | } page_buf_flags_t; |
94 | 91 | ||
95 | #define PBF_UPDATE (PBF_READ | PBF_WRITE) | ||
96 | #define PBF_NOT_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) != 0) | ||
97 | #define PBF_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) == 0) | ||
98 | 92 | ||
99 | typedef struct xfs_bufhash { | 93 | typedef struct xfs_bufhash { |
100 | struct list_head bh_list; | 94 | struct list_head bh_list; |
@@ -258,7 +252,6 @@ extern void pagebuf_unlock( /* unlock buffer */ | |||
258 | 252 | ||
259 | extern void pagebuf_iodone( /* mark buffer I/O complete */ | 253 | extern void pagebuf_iodone( /* mark buffer I/O complete */ |
260 | xfs_buf_t *, /* buffer to mark */ | 254 | xfs_buf_t *, /* buffer to mark */ |
261 | int, /* use data/log helper thread. */ | ||
262 | int); /* run completion locally, or in | 255 | int); /* run completion locally, or in |
263 | * a helper thread. */ | 256 | * a helper thread. */ |
264 | 257 | ||
@@ -378,12 +371,12 @@ extern void pagebuf_trace( | |||
378 | #define XFS_BUF_GETERROR(x) pagebuf_geterror(x) | 371 | #define XFS_BUF_GETERROR(x) pagebuf_geterror(x) |
379 | #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) | 372 | #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) |
380 | 373 | ||
381 | #define XFS_BUF_DONE(x) ((x)->pb_flags &= ~(PBF_PARTIAL|PBF_NONE)) | 374 | #define XFS_BUF_DONE(x) ((x)->pb_flags &= ~PBF_NONE) |
382 | #define XFS_BUF_UNDONE(x) ((x)->pb_flags |= PBF_PARTIAL|PBF_NONE) | 375 | #define XFS_BUF_UNDONE(x) ((x)->pb_flags |= PBF_NONE) |
383 | #define XFS_BUF_ISDONE(x) (!(PBF_NOT_DONE(x))) | 376 | #define XFS_BUF_ISDONE(x) (((x)->pb_flags & PBF_NONE) == 0) |
384 | 377 | ||
385 | #define XFS_BUF_BUSY(x) ((x)->pb_flags |= PBF_FORCEIO) | 378 | #define XFS_BUF_BUSY(x) do { } while (0) |
386 | #define XFS_BUF_UNBUSY(x) ((x)->pb_flags &= ~PBF_FORCEIO) | 379 | #define XFS_BUF_UNBUSY(x) do { } while (0) |
387 | #define XFS_BUF_ISBUSY(x) (1) | 380 | #define XFS_BUF_ISBUSY(x) (1) |
388 | 381 | ||
389 | #define XFS_BUF_ASYNC(x) ((x)->pb_flags |= PBF_ASYNC) | 382 | #define XFS_BUF_ASYNC(x) ((x)->pb_flags |= PBF_ASYNC) |
@@ -412,9 +405,6 @@ extern void pagebuf_trace( | |||
412 | 405 | ||
413 | #define XFS_BUF_BP_ISMAPPED(bp) 1 | 406 | #define XFS_BUF_BP_ISMAPPED(bp) 1 |
414 | 407 | ||
415 | #define XFS_BUF_DATAIO(x) ((x)->pb_flags |= PBF_FS_DATAIOD) | ||
416 | #define XFS_BUF_UNDATAIO(x) ((x)->pb_flags &= ~PBF_FS_DATAIOD) | ||
417 | |||
418 | #define XFS_BUF_IODONE_FUNC(buf) (buf)->pb_iodone | 408 | #define XFS_BUF_IODONE_FUNC(buf) (buf)->pb_iodone |
419 | #define XFS_BUF_SET_IODONE_FUNC(buf, func) \ | 409 | #define XFS_BUF_SET_IODONE_FUNC(buf, func) \ |
420 | (buf)->pb_iodone = (func) | 410 | (buf)->pb_iodone = (func) |
@@ -510,7 +500,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp) | |||
510 | pagebuf_trace(bp, id, NULL, (void *)__builtin_return_address(0)) | 500 | pagebuf_trace(bp, id, NULL, (void *)__builtin_return_address(0)) |
511 | 501 | ||
512 | #define xfs_biodone(pb) \ | 502 | #define xfs_biodone(pb) \ |
513 | pagebuf_iodone(pb, (pb->pb_flags & PBF_FS_DATAIOD), 0) | 503 | pagebuf_iodone(pb, 0) |
514 | 504 | ||
515 | #define xfs_biomove(pb, off, len, data, rw) \ | 505 | #define xfs_biomove(pb, off, len, data, rw) \ |
516 | pagebuf_iomove((pb), (off), (len), (data), \ | 506 | pagebuf_iomove((pb), (off), (len), (data), \ |