Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335811
b: refs/heads/master
c: d69043c
h: refs/heads/master
i:
  335809: 63a1452
  335807: fbe74a0
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Nov 17, 2012
1 parent 3325cdf commit c6528f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: 3daed8bc3e49b9695ae931b9f472b5b90d1965b3
refs/heads/master: d69043c42d8c6414fa28ad18d99973aa6c1c2e24
14 changes: 12 additions & 2 deletions trunk/fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,9 +1197,14 @@ xfs_buf_bio_end_io(
{
xfs_buf_t *bp = (xfs_buf_t *)bio->bi_private;

xfs_buf_ioerror(bp, -error);
/*
* don't overwrite existing errors - otherwise we can lose errors on
* buffers that require multiple bios to complete.
*/
if (!bp->b_error)
xfs_buf_ioerror(bp, -error);

if (!error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ))
if (!bp->b_error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ))
invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp));

_xfs_buf_ioend(bp, 1);
Expand Down Expand Up @@ -1279,6 +1284,11 @@ xfs_buf_ioapply_map(
if (size)
goto next_chunk;
} else {
/*
* This is guaranteed not to be the last io reference count
* because the caller (xfs_buf_iorequest) holds a count itself.
*/
atomic_dec(&bp->b_io_remaining);
xfs_buf_ioerror(bp, EIO);
bio_put(bio);
}
Expand Down

0 comments on commit c6528f6

Please sign in to comment.