diff options
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index ff5b4cf9e2da..1beda208cbfb 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -129,25 +129,30 @@ struct bio { | |||
129 | * bit 2 -- barrier | 129 | * bit 2 -- barrier |
130 | * Insert a serialization point in the IO queue, forcing previously | 130 | * Insert a serialization point in the IO queue, forcing previously |
131 | * submitted IO to be completed before this oen is issued. | 131 | * submitted IO to be completed before this oen is issued. |
132 | * bit 3 -- fail fast, don't want low level driver retries | 132 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately |
133 | * bit 4 -- synchronous I/O hint: the block layer will unplug immediately | ||
134 | * Note that this does NOT indicate that the IO itself is sync, just | 133 | * Note that this does NOT indicate that the IO itself is sync, just |
135 | * that the block layer will not postpone issue of this IO by plugging. | 134 | * that the block layer will not postpone issue of this IO by plugging. |
136 | * bit 5 -- metadata request | 135 | * bit 4 -- metadata request |
137 | * Used for tracing to differentiate metadata and data IO. May also | 136 | * Used for tracing to differentiate metadata and data IO. May also |
138 | * get some preferential treatment in the IO scheduler | 137 | * get some preferential treatment in the IO scheduler |
139 | * bit 6 -- discard sectors | 138 | * bit 5 -- discard sectors |
140 | * Informs the lower level device that this range of sectors is no longer | 139 | * Informs the lower level device that this range of sectors is no longer |
141 | * used by the file system and may thus be freed by the device. Used | 140 | * used by the file system and may thus be freed by the device. Used |
142 | * for flash based storage. | 141 | * for flash based storage. |
142 | * bit 6 -- fail fast device errors | ||
143 | * bit 7 -- fail fast transport errors | ||
144 | * bit 8 -- fail fast driver errors | ||
145 | * Don't want driver retries for any fast fail whatever the reason. | ||
143 | */ | 146 | */ |
144 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ | 147 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ |
145 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ | 148 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ |
146 | #define BIO_RW_BARRIER 2 | 149 | #define BIO_RW_BARRIER 2 |
147 | #define BIO_RW_FAILFAST 3 | 150 | #define BIO_RW_SYNC 3 |
148 | #define BIO_RW_SYNC 4 | 151 | #define BIO_RW_META 4 |
149 | #define BIO_RW_META 5 | 152 | #define BIO_RW_DISCARD 5 |
150 | #define BIO_RW_DISCARD 6 | 153 | #define BIO_RW_FAILFAST_DEV 6 |
154 | #define BIO_RW_FAILFAST_TRANSPORT 7 | ||
155 | #define BIO_RW_FAILFAST_DRIVER 8 | ||
151 | 156 | ||
152 | /* | 157 | /* |
153 | * upper 16 bits of bi_rw define the io priority of this bio | 158 | * upper 16 bits of bi_rw define the io priority of this bio |
@@ -174,7 +179,10 @@ struct bio { | |||
174 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 179 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
175 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) | 180 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) |
176 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) | 181 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) |
177 | #define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) | 182 | #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV)) |
183 | #define bio_failfast_transport(bio) \ | ||
184 | ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT)) | ||
185 | #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER)) | ||
178 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) | 186 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) |
179 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) | 187 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) |
180 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) | 188 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) |