diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-11 08:46:53 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-11 08:46:53 -0400 |
commit | 336879b1da97fffc097f77c6d6f818660f2826f0 (patch) | |
tree | 4ddb4d1c5d2b67fb096c72e41d2a03b01a605041 /fs/xfs/xfs_buf.c | |
parent | 3d3cbd84300e7be1e53083cac0f6f9c12978ecb4 (diff) | |
parent | fdcaa1dbb7c6ed419b10fb8cdb5001ab0a00538f (diff) |
Merge remote-tracking branch 'airlied/drm-next' into topic/vblank-rework
Dave asked me to do the backmerge before sending him the revised pull
request, so here we go. Nothing fancy in the conflicts, just a few
things changed right next to each another.
Conflicts:
drivers/gpu/drm/drm_irq.c
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 7a34a1ae6552..cd7b8ca9b064 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -130,7 +130,7 @@ xfs_buf_get_maps( | |||
130 | bp->b_maps = kmem_zalloc(map_count * sizeof(struct xfs_buf_map), | 130 | bp->b_maps = kmem_zalloc(map_count * sizeof(struct xfs_buf_map), |
131 | KM_NOFS); | 131 | KM_NOFS); |
132 | if (!bp->b_maps) | 132 | if (!bp->b_maps) |
133 | return ENOMEM; | 133 | return -ENOMEM; |
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
@@ -344,7 +344,7 @@ retry: | |||
344 | if (unlikely(page == NULL)) { | 344 | if (unlikely(page == NULL)) { |
345 | if (flags & XBF_READ_AHEAD) { | 345 | if (flags & XBF_READ_AHEAD) { |
346 | bp->b_page_count = i; | 346 | bp->b_page_count = i; |
347 | error = ENOMEM; | 347 | error = -ENOMEM; |
348 | goto out_free_pages; | 348 | goto out_free_pages; |
349 | } | 349 | } |
350 | 350 | ||
@@ -465,7 +465,7 @@ _xfs_buf_find( | |||
465 | eofs = XFS_FSB_TO_BB(btp->bt_mount, btp->bt_mount->m_sb.sb_dblocks); | 465 | eofs = XFS_FSB_TO_BB(btp->bt_mount, btp->bt_mount->m_sb.sb_dblocks); |
466 | if (blkno >= eofs) { | 466 | if (blkno >= eofs) { |
467 | /* | 467 | /* |
468 | * XXX (dgc): we should really be returning EFSCORRUPTED here, | 468 | * XXX (dgc): we should really be returning -EFSCORRUPTED here, |
469 | * but none of the higher level infrastructure supports | 469 | * but none of the higher level infrastructure supports |
470 | * returning a specific error on buffer lookup failures. | 470 | * returning a specific error on buffer lookup failures. |
471 | */ | 471 | */ |
@@ -1052,8 +1052,8 @@ xfs_buf_ioerror( | |||
1052 | xfs_buf_t *bp, | 1052 | xfs_buf_t *bp, |
1053 | int error) | 1053 | int error) |
1054 | { | 1054 | { |
1055 | ASSERT(error >= 0 && error <= 0xffff); | 1055 | ASSERT(error <= 0 && error >= -1000); |
1056 | bp->b_error = (unsigned short)error; | 1056 | bp->b_error = error; |
1057 | trace_xfs_buf_ioerror(bp, error, _RET_IP_); | 1057 | trace_xfs_buf_ioerror(bp, error, _RET_IP_); |
1058 | } | 1058 | } |
1059 | 1059 | ||
@@ -1064,7 +1064,7 @@ xfs_buf_ioerror_alert( | |||
1064 | { | 1064 | { |
1065 | xfs_alert(bp->b_target->bt_mount, | 1065 | xfs_alert(bp->b_target->bt_mount, |
1066 | "metadata I/O error: block 0x%llx (\"%s\") error %d numblks %d", | 1066 | "metadata I/O error: block 0x%llx (\"%s\") error %d numblks %d", |
1067 | (__uint64_t)XFS_BUF_ADDR(bp), func, bp->b_error, bp->b_length); | 1067 | (__uint64_t)XFS_BUF_ADDR(bp), func, -bp->b_error, bp->b_length); |
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | /* | 1070 | /* |
@@ -1083,7 +1083,7 @@ xfs_bioerror( | |||
1083 | /* | 1083 | /* |
1084 | * No need to wait until the buffer is unpinned, we aren't flushing it. | 1084 | * No need to wait until the buffer is unpinned, we aren't flushing it. |
1085 | */ | 1085 | */ |
1086 | xfs_buf_ioerror(bp, EIO); | 1086 | xfs_buf_ioerror(bp, -EIO); |
1087 | 1087 | ||
1088 | /* | 1088 | /* |
1089 | * We're calling xfs_buf_ioend, so delete XBF_DONE flag. | 1089 | * We're calling xfs_buf_ioend, so delete XBF_DONE flag. |
@@ -1094,7 +1094,7 @@ xfs_bioerror( | |||
1094 | 1094 | ||
1095 | xfs_buf_ioend(bp, 0); | 1095 | xfs_buf_ioend(bp, 0); |
1096 | 1096 | ||
1097 | return EIO; | 1097 | return -EIO; |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | /* | 1100 | /* |
@@ -1127,13 +1127,13 @@ xfs_bioerror_relse( | |||
1127 | * There's no reason to mark error for | 1127 | * There's no reason to mark error for |
1128 | * ASYNC buffers. | 1128 | * ASYNC buffers. |
1129 | */ | 1129 | */ |
1130 | xfs_buf_ioerror(bp, EIO); | 1130 | xfs_buf_ioerror(bp, -EIO); |
1131 | complete(&bp->b_iowait); | 1131 | complete(&bp->b_iowait); |
1132 | } else { | 1132 | } else { |
1133 | xfs_buf_relse(bp); | 1133 | xfs_buf_relse(bp); |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | return EIO; | 1136 | return -EIO; |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | STATIC int | 1139 | STATIC int |
@@ -1199,7 +1199,7 @@ xfs_buf_bio_end_io( | |||
1199 | * buffers that require multiple bios to complete. | 1199 | * buffers that require multiple bios to complete. |
1200 | */ | 1200 | */ |
1201 | if (!bp->b_error) | 1201 | if (!bp->b_error) |
1202 | xfs_buf_ioerror(bp, -error); | 1202 | xfs_buf_ioerror(bp, error); |
1203 | 1203 | ||
1204 | if (!bp->b_error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ)) | 1204 | if (!bp->b_error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ)) |
1205 | invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp)); | 1205 | invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp)); |
@@ -1286,7 +1286,7 @@ next_chunk: | |||
1286 | * because the caller (xfs_buf_iorequest) holds a count itself. | 1286 | * because the caller (xfs_buf_iorequest) holds a count itself. |
1287 | */ | 1287 | */ |
1288 | atomic_dec(&bp->b_io_remaining); | 1288 | atomic_dec(&bp->b_io_remaining); |
1289 | xfs_buf_ioerror(bp, EIO); | 1289 | xfs_buf_ioerror(bp, -EIO); |
1290 | bio_put(bio); | 1290 | bio_put(bio); |
1291 | } | 1291 | } |
1292 | 1292 | ||
@@ -1330,6 +1330,20 @@ _xfs_buf_ioapply( | |||
1330 | SHUTDOWN_CORRUPT_INCORE); | 1330 | SHUTDOWN_CORRUPT_INCORE); |
1331 | return; | 1331 | return; |
1332 | } | 1332 | } |
1333 | } else if (bp->b_bn != XFS_BUF_DADDR_NULL) { | ||
1334 | struct xfs_mount *mp = bp->b_target->bt_mount; | ||
1335 | |||
1336 | /* | ||
1337 | * non-crc filesystems don't attach verifiers during | ||
1338 | * log recovery, so don't warn for such filesystems. | ||
1339 | */ | ||
1340 | if (xfs_sb_version_hascrc(&mp->m_sb)) { | ||
1341 | xfs_warn(mp, | ||
1342 | "%s: no ops on block 0x%llx/0x%x", | ||
1343 | __func__, bp->b_bn, bp->b_length); | ||
1344 | xfs_hex_dump(bp->b_addr, 64); | ||
1345 | dump_stack(); | ||
1346 | } | ||
1333 | } | 1347 | } |
1334 | } else if (bp->b_flags & XBF_READ_AHEAD) { | 1348 | } else if (bp->b_flags & XBF_READ_AHEAD) { |
1335 | rw = READA; | 1349 | rw = READA; |
@@ -1628,7 +1642,7 @@ xfs_setsize_buftarg( | |||
1628 | xfs_warn(btp->bt_mount, | 1642 | xfs_warn(btp->bt_mount, |
1629 | "Cannot set_blocksize to %u on device %s", | 1643 | "Cannot set_blocksize to %u on device %s", |
1630 | sectorsize, name); | 1644 | sectorsize, name); |
1631 | return EINVAL; | 1645 | return -EINVAL; |
1632 | } | 1646 | } |
1633 | 1647 | ||
1634 | /* Set up device logical sector size mask */ | 1648 | /* Set up device logical sector size mask */ |