diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-03 03:38:06 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-06-09 11:27:32 -0400 |
commit | 4e4cbee93d56137ebff722be022cae5f70ef84fb (patch) | |
tree | 4fa7345155599fc6bdd653fca8c5224ddf90a5be /fs/xfs/xfs_aops.c | |
parent | fc17b6534eb8395f0b3133eb31d87deec32c642b (diff) |
block: switch bios to blk_status_t
Replace bi_error with a new bi_status to allow for a clear conversion.
Note that device mapper overloaded bi_error with a private value, which
we'll have to keep arround at least for now and thus propagate to a
proper blk_status_t value.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r-- | fs/xfs/xfs_aops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 09af0f7cd55e..76b6f988e2fa 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -276,7 +276,7 @@ xfs_end_io( | |||
276 | struct xfs_inode *ip = XFS_I(ioend->io_inode); | 276 | struct xfs_inode *ip = XFS_I(ioend->io_inode); |
277 | xfs_off_t offset = ioend->io_offset; | 277 | xfs_off_t offset = ioend->io_offset; |
278 | size_t size = ioend->io_size; | 278 | size_t size = ioend->io_size; |
279 | int error = ioend->io_bio->bi_error; | 279 | int error; |
280 | 280 | ||
281 | /* | 281 | /* |
282 | * Just clean up the in-memory strutures if the fs has been shut down. | 282 | * Just clean up the in-memory strutures if the fs has been shut down. |
@@ -289,6 +289,7 @@ xfs_end_io( | |||
289 | /* | 289 | /* |
290 | * Clean up any COW blocks on an I/O error. | 290 | * Clean up any COW blocks on an I/O error. |
291 | */ | 291 | */ |
292 | error = blk_status_to_errno(ioend->io_bio->bi_status); | ||
292 | if (unlikely(error)) { | 293 | if (unlikely(error)) { |
293 | switch (ioend->io_type) { | 294 | switch (ioend->io_type) { |
294 | case XFS_IO_COW: | 295 | case XFS_IO_COW: |
@@ -332,7 +333,7 @@ xfs_end_bio( | |||
332 | else if (ioend->io_append_trans) | 333 | else if (ioend->io_append_trans) |
333 | queue_work(mp->m_data_workqueue, &ioend->io_work); | 334 | queue_work(mp->m_data_workqueue, &ioend->io_work); |
334 | else | 335 | else |
335 | xfs_destroy_ioend(ioend, bio->bi_error); | 336 | xfs_destroy_ioend(ioend, blk_status_to_errno(bio->bi_status)); |
336 | } | 337 | } |
337 | 338 | ||
338 | STATIC int | 339 | STATIC int |
@@ -500,7 +501,7 @@ xfs_submit_ioend( | |||
500 | * time. | 501 | * time. |
501 | */ | 502 | */ |
502 | if (status) { | 503 | if (status) { |
503 | ioend->io_bio->bi_error = status; | 504 | ioend->io_bio->bi_status = errno_to_blk_status(status); |
504 | bio_endio(ioend->io_bio); | 505 | bio_endio(ioend->io_bio); |
505 | return status; | 506 | return status; |
506 | } | 507 | } |