Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7589
b: refs/heads/master
c: eedb553
h: refs/heads/master
i:
  7587: e0015a2
v: v3
  • Loading branch information
Nathan Scott committed Sep 2, 2005
1 parent c3be108 commit 7e8612d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdb626878f6f5e37d678d30c9cacf5726b88a656
refs/heads/master: eedb5530aad71aecbc1e99cb67f676c26280d3f9
17 changes: 11 additions & 6 deletions trunk/fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
Expand Down Expand Up @@ -1249,19 +1249,21 @@ bio_end_io_pagebuf(
int error)
{
xfs_buf_t *pb = (xfs_buf_t *)bio->bi_private;
unsigned int i, blocksize = pb->pb_target->pbr_bsize;
struct bio_vec *bvec = bio->bi_io_vec;
unsigned int blocksize = pb->pb_target->pbr_bsize;
struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;

if (bio->bi_size)
return 1;

if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
pb->pb_error = EIO;

for (i = 0; i < bio->bi_vcnt; i++, bvec++) {
do {
struct page *page = bvec->bv_page;

if (pb->pb_error) {
if (unlikely(pb->pb_error)) {
if (pb->pb_flags & PBF_READ)
ClearPageUptodate(page);
SetPageError(page);
} else if (blocksize == PAGE_CACHE_SIZE) {
SetPageUptodate(page);
Expand All @@ -1270,10 +1272,13 @@ bio_end_io_pagebuf(
set_page_region(page, bvec->bv_offset, bvec->bv_len);
}

if (--bvec >= bio->bi_io_vec)
prefetchw(&bvec->bv_page->flags);

if (_pagebuf_iolocked(pb)) {
unlock_page(page);
}
}
} while (bvec >= bio->bi_io_vec);

_pagebuf_iodone(pb, 1);
bio_put(bio);
Expand Down

0 comments on commit 7e8612d

Please sign in to comment.