diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 03:01:10 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 03:01:10 -0400 |
commit | af5639424008ffe96f89b059bea1aec15e0115a9 (patch) | |
tree | 5055712fa33e4878c97ff240d7755c6413627baf /include/linux | |
parent | 6feef531f55cf4a20fd9eb39f5352e5745203603 (diff) |
block: add some comments around the bio read-write flags
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bio.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index fb97221d7c30..ff5b4cf9e2da 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -123,13 +123,23 @@ struct bio { | |||
123 | /* | 123 | /* |
124 | * bio bi_rw flags | 124 | * bio bi_rw flags |
125 | * | 125 | * |
126 | * bit 0 -- read (not set) or write (set) | 126 | * bit 0 -- data direction |
127 | * If not set, bio is a read from device. If set, it's a write to device. | ||
127 | * bit 1 -- rw-ahead when set | 128 | * bit 1 -- rw-ahead when set |
128 | * bit 2 -- barrier | 129 | * bit 2 -- barrier |
130 | * Insert a serialization point in the IO queue, forcing previously | ||
131 | * submitted IO to be completed before this oen is issued. | ||
129 | * bit 3 -- fail fast, don't want low level driver retries | 132 | * bit 3 -- fail fast, don't want low level driver retries |
130 | * bit 4 -- 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 | ||
135 | * that the block layer will not postpone issue of this IO by plugging. | ||
131 | * bit 5 -- metadata request | 136 | * bit 5 -- metadata request |
137 | * Used for tracing to differentiate metadata and data IO. May also | ||
138 | * get some preferential treatment in the IO scheduler | ||
132 | * bit 6 -- discard sectors | 139 | * bit 6 -- discard sectors |
140 | * 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 | ||
142 | * for flash based storage. | ||
133 | */ | 143 | */ |
134 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ | 144 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ |
135 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ | 145 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ |