aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h43
1 files changed, 23 insertions, 20 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 2892b710771c..a299ed38fcd7 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -142,37 +142,40 @@ struct bio {
142 * 142 *
143 * bit 0 -- data direction 143 * bit 0 -- data direction
144 * If not set, bio is a read from device. If set, it's a write to device. 144 * If not set, bio is a read from device. If set, it's a write to device.
145 * bit 1 -- rw-ahead when set 145 * bit 1 -- fail fast device errors
146 * bit 2 -- barrier 146 * bit 2 -- fail fast transport errors
147 * bit 3 -- fail fast driver errors
148 * bit 4 -- rw-ahead when set
149 * bit 5 -- barrier
147 * Insert a serialization point in the IO queue, forcing previously 150 * Insert a serialization point in the IO queue, forcing previously
148 * submitted IO to be completed before this one is issued. 151 * submitted IO to be completed before this one is issued.
149 * bit 3 -- synchronous I/O hint. 152 * bit 6 -- synchronous I/O hint.
150 * bit 4 -- Unplug the device immediately after submitting this bio. 153 * bit 7 -- Unplug the device immediately after submitting this bio.
151 * bit 5 -- metadata request 154 * bit 8 -- metadata request
152 * Used for tracing to differentiate metadata and data IO. May also 155 * Used for tracing to differentiate metadata and data IO. May also
153 * get some preferential treatment in the IO scheduler 156 * get some preferential treatment in the IO scheduler
154 * bit 6 -- discard sectors 157 * bit 9 -- discard sectors
155 * Informs the lower level device that this range of sectors is no longer 158 * Informs the lower level device that this range of sectors is no longer
156 * used by the file system and may thus be freed by the device. Used 159 * used by the file system and may thus be freed by the device. Used
157 * for flash based storage. 160 * for flash based storage.
158 * bit 7 -- fail fast device errors
159 * bit 8 -- fail fast transport errors
160 * bit 9 -- fail fast driver errors
161 * Don't want driver retries for any fast fail whatever the reason. 161 * Don't want driver retries for any fast fail whatever the reason.
162 * bit 10 -- Tell the IO scheduler not to wait for more requests after this 162 * bit 10 -- Tell the IO scheduler not to wait for more requests after this
163 one has been submitted, even if it is a SYNC request. 163 one has been submitted, even if it is a SYNC request.
164 */ 164 */
165#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ 165enum bio_rw_flags {
166#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ 166 BIO_RW,
167#define BIO_RW_BARRIER 2 167 BIO_RW_FAILFAST_DEV,
168#define BIO_RW_SYNCIO 3 168 BIO_RW_FAILFAST_TRANSPORT,
169#define BIO_RW_UNPLUG 4 169 BIO_RW_FAILFAST_DRIVER,
170#define BIO_RW_META 5 170 /* above flags must match REQ_* */
171#define BIO_RW_DISCARD 6 171 BIO_RW_AHEAD,
172#define BIO_RW_FAILFAST_DEV 7 172 BIO_RW_BARRIER,
173#define BIO_RW_FAILFAST_TRANSPORT 8 173 BIO_RW_SYNCIO,
174#define BIO_RW_FAILFAST_DRIVER 9 174 BIO_RW_UNPLUG,
175#define BIO_RW_NOIDLE 10 175 BIO_RW_META,
176 BIO_RW_DISCARD,
177 BIO_RW_NOIDLE,
178};
176 179
177#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag))) 180#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag)))
178 181