diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-11-01 18:29:39 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-11-01 18:29:39 -0500 |
commit | c86e711ceb4ad03c98a7aa29bcab8613e9f57788 (patch) | |
tree | b4f1328bfe4b3559b841faa1b461f72daf7e609f /fs/xfs/linux-2.6/xfs_buf.c | |
parent | d0cfb37305baef74903872cbb799174d0d353fd9 (diff) |
[XFS] only mark buffers done when all pages are uptodate in addition
replace PBF_NONE with an inverted PBF_DONE, so it's like all the other
flags.
SGI-PV: 942609
SGI-Modid: xfs-linux:xfs-kern:199136a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 4663f7dbff1c..660c24acb640 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -286,7 +286,7 @@ _pagebuf_initialize( | |||
286 | * most cases but may be reset (e.g. XFS recovery). | 286 | * most cases but may be reset (e.g. XFS recovery). |
287 | */ | 287 | */ |
288 | pb->pb_buffer_length = pb->pb_count_desired = range_length; | 288 | pb->pb_buffer_length = pb->pb_count_desired = range_length; |
289 | pb->pb_flags = flags | PBF_NONE; | 289 | pb->pb_flags = flags; |
290 | pb->pb_bn = XFS_BUF_DADDR_NULL; | 290 | pb->pb_bn = XFS_BUF_DADDR_NULL; |
291 | atomic_set(&pb->pb_pin_count, 0); | 291 | atomic_set(&pb->pb_pin_count, 0); |
292 | init_waitqueue_head(&pb->pb_waiters); | 292 | init_waitqueue_head(&pb->pb_waiters); |
@@ -458,8 +458,8 @@ _pagebuf_lookup_pages( | |||
458 | unlock_page(bp->pb_pages[i]); | 458 | unlock_page(bp->pb_pages[i]); |
459 | } | 459 | } |
460 | 460 | ||
461 | if (page_count) | 461 | if (page_count == bp->pb_page_count) |
462 | bp->pb_flags &= ~PBF_NONE; | 462 | bp->pb_flags |= PBF_DONE; |
463 | 463 | ||
464 | PB_TRACE(bp, "lookup_pages", (long)page_count); | 464 | PB_TRACE(bp, "lookup_pages", (long)page_count); |
465 | return error; | 465 | return error; |
@@ -1119,7 +1119,7 @@ pagebuf_iodone( | |||
1119 | { | 1119 | { |
1120 | pb->pb_flags &= ~(PBF_READ | PBF_WRITE); | 1120 | pb->pb_flags &= ~(PBF_READ | PBF_WRITE); |
1121 | if (pb->pb_error == 0) | 1121 | if (pb->pb_error == 0) |
1122 | pb->pb_flags &= ~PBF_NONE; | 1122 | pb->pb_flags |= PBF_DONE; |
1123 | 1123 | ||
1124 | PB_TRACE(pb, "iodone", pb->pb_iodone); | 1124 | PB_TRACE(pb, "iodone", pb->pb_iodone); |
1125 | 1125 | ||