aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-17 12:00:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-17 12:00:23 -0400
commited09441dacc2a2d6c170aa3b1f79a041291a813f (patch)
tree95c35bdf4f0b679806984093dce627a66d0d7cf1 /include/linux/bio.h
parentb225ee5bed70254a100896c473e6dd8c2be45c18 (diff)
parent4c393e6e457fb41169dd110c1b96a138394c2d7b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (39 commits) [SCSI] sd: fix compile failure with CONFIG_BLK_DEV_INTEGRITY=n libiscsi: fix locking in iscsi_eh_device_reset libiscsi: check reason why we are stopping iscsi session to determine error value [SCSI] iscsi_tcp: return a descriptive error value during connection errors [SCSI] libiscsi: rename host reset to target reset [SCSI] iscsi class: fix endpoint id handling [SCSI] libiscsi: Support drivers initiating session removal [SCSI] libiscsi: fix data corruption when target has to resend data-in packets [SCSI] sd: Switch kernel printing level for DIF messages [SCSI] sd: Correctly handle all combinations of DIF and DIX [SCSI] sd: Always print actual protection_type [SCSI] sd: Issue correct protection operation [SCSI] scsi_error: fix target reset handling [SCSI] lpfc 8.2.8 v2 : Add statistical reporting control and additional fc vendor events [SCSI] lpfc 8.2.8 v2 : Add sysfs control of target queue depth handling [SCSI] lpfc 8.2.8 v2 : Revert target busy in favor of transport disrupted [SCSI] scsi_dh_alua: remove REQ_NOMERGE [SCSI] lpfc 8.2.8 : update driver version to 8.2.8 [SCSI] lpfc 8.2.8 : Add MSI-X support [SCSI] lpfc 8.2.8 : Update driver to use new Host byte error code DID_TRANSPORT_DISRUPTED ...
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h26
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))