diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bio.h | 2 | ||||
-rw-r--r-- | include/linux/blk_types.h | 5 | ||||
-rw-r--r-- | include/linux/blkdev.h | 2 | ||||
-rw-r--r-- | include/linux/device-mapper.h | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index d1b04b0e99cf..9455aada1399 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -414,7 +414,7 @@ extern void bio_endio(struct bio *); | |||
414 | 414 | ||
415 | static inline void bio_io_error(struct bio *bio) | 415 | static inline void bio_io_error(struct bio *bio) |
416 | { | 416 | { |
417 | bio->bi_error = -EIO; | 417 | bio->bi_status = BLK_STS_IOERR; |
418 | bio_endio(bio); | 418 | bio_endio(bio); |
419 | } | 419 | } |
420 | 420 | ||
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 59378939a8cd..dcd45b15a3a5 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
@@ -33,6 +33,9 @@ typedef u8 __bitwise blk_status_t; | |||
33 | #define BLK_STS_RESOURCE ((__force blk_status_t)9) | 33 | #define BLK_STS_RESOURCE ((__force blk_status_t)9) |
34 | #define BLK_STS_IOERR ((__force blk_status_t)10) | 34 | #define BLK_STS_IOERR ((__force blk_status_t)10) |
35 | 35 | ||
36 | /* hack for device mapper, don't use elsewhere: */ | ||
37 | #define BLK_STS_DM_REQUEUE ((__force blk_status_t)11) | ||
38 | |||
36 | struct blk_issue_stat { | 39 | struct blk_issue_stat { |
37 | u64 stat; | 40 | u64 stat; |
38 | }; | 41 | }; |
@@ -44,7 +47,7 @@ struct blk_issue_stat { | |||
44 | struct bio { | 47 | struct bio { |
45 | struct bio *bi_next; /* request queue link */ | 48 | struct bio *bi_next; /* request queue link */ |
46 | struct block_device *bi_bdev; | 49 | struct block_device *bi_bdev; |
47 | int bi_error; | 50 | blk_status_t bi_status; |
48 | unsigned int bi_opf; /* bottom bits req flags, | 51 | unsigned int bi_opf; /* bottom bits req flags, |
49 | * top bits REQ_OP. Use | 52 | * top bits REQ_OP. Use |
50 | * accessors. | 53 | * accessors. |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2a8871638453..76b6df862a12 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1782,7 +1782,7 @@ struct blk_integrity_iter { | |||
1782 | const char *disk_name; | 1782 | const char *disk_name; |
1783 | }; | 1783 | }; |
1784 | 1784 | ||
1785 | typedef int (integrity_processing_fn) (struct blk_integrity_iter *); | 1785 | typedef blk_status_t (integrity_processing_fn) (struct blk_integrity_iter *); |
1786 | 1786 | ||
1787 | struct blk_integrity_profile { | 1787 | struct blk_integrity_profile { |
1788 | integrity_processing_fn *generate_fn; | 1788 | integrity_processing_fn *generate_fn; |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 5de5c53251ec..456da5017b32 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -72,7 +72,7 @@ typedef void (*dm_release_clone_request_fn) (struct request *clone); | |||
72 | * 2 : The target wants to push back the io | 72 | * 2 : The target wants to push back the io |
73 | */ | 73 | */ |
74 | typedef int (*dm_endio_fn) (struct dm_target *ti, | 74 | typedef int (*dm_endio_fn) (struct dm_target *ti, |
75 | struct bio *bio, int *error); | 75 | struct bio *bio, blk_status_t *error); |
76 | typedef int (*dm_request_endio_fn) (struct dm_target *ti, | 76 | typedef int (*dm_request_endio_fn) (struct dm_target *ti, |
77 | struct request *clone, blk_status_t error, | 77 | struct request *clone, blk_status_t error, |
78 | union map_info *map_context); | 78 | union map_info *map_context); |