diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-21 18:00:30 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-21 18:06:45 -0500 |
commit | 1cf4d51dc4661f336f5318c176a3561ddf5bf04f (patch) | |
tree | 8b390ccd48361ba1408be6799d46e62c6382cc39 /include/linux/blk_types.h | |
parent | 8acc54456e11ee0ec80ed0c6abb6d68abae60592 (diff) |
Update bcachefs sources to 14ce2a2031 bcachefs: fixes for building in userspace
Diffstat (limited to 'include/linux/blk_types.h')
-rw-r--r-- | include/linux/blk_types.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 55179944..42cd0032 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -13,7 +13,27 @@ struct bio_set; struct bio; struct block_device; typedef void (bio_end_io_t) (struct bio *); -typedef void (bio_destructor_t) (struct bio *); + +/* + * Block error status values. See block/blk-core:blk_errors for the details. + */ +typedef u8 __bitwise blk_status_t; +#define BLK_STS_OK 0 +#define BLK_STS_NOTSUPP ((__force blk_status_t)1) +#define BLK_STS_TIMEOUT ((__force blk_status_t)2) +#define BLK_STS_NOSPC ((__force blk_status_t)3) +#define BLK_STS_TRANSPORT ((__force blk_status_t)4) +#define BLK_STS_TARGET ((__force blk_status_t)5) +#define BLK_STS_NEXUS ((__force blk_status_t)6) +#define BLK_STS_MEDIUM ((__force blk_status_t)7) +#define BLK_STS_PROTECTION ((__force blk_status_t)8) +#define BLK_STS_RESOURCE ((__force blk_status_t)9) +#define BLK_STS_IOERR ((__force blk_status_t)10) + +/* hack for device mapper, don't use elsewhere: */ +#define BLK_STS_DM_REQUEUE ((__force blk_status_t)11) + +#define BLK_STS_AGAIN ((__force blk_status_t)12) /* * main unit of I/O for the block layer and lower layers (ie drivers and @@ -22,7 +42,7 @@ typedef void (bio_destructor_t) (struct bio *); struct bio { struct bio *bi_next; /* request queue link */ struct block_device *bi_bdev; - int bi_error; + blk_status_t bi_status; unsigned int bi_opf; /* bottom bits req flags, * top bits REQ_OP. Use * accessors. |