aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-08-07 12:20:39 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:20:39 -0400
commit7b6d91daee5cac6402186ff224c3af39d79f4a0e (patch)
treeb1518cf0b6c301178e0a320f80610cd5b3aa7625 /include/linux/fs.h
parent33659ebbae262228eef4e0fe990f393d1f0ed941 (diff)
block: unify flags for struct bio and struct request
Remove the current bio flags and reuse the request flags for the bio, too. This allows to more easily trace the type of I/O from the filesystem down to the block driver. There were two flags in the bio that were missing in the requests: BIO_RW_UNPLUG and BIO_RW_AHEAD. Also I've renamed two request flags that had a superflous RW in them. Note that the flags are in bio.h despite having the REQ_ name - as blkdev.h includes bio.h that is the only way to go for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 598878831497..c5c92943c767 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -144,29 +144,31 @@ struct inodes_stat_t {
144 * of this IO. 144 * of this IO.
145 * 145 *
146 */ 146 */
147#define RW_MASK 1 147#define RW_MASK 1
148#define RWA_MASK 2 148#define RWA_MASK 2
149#define READ 0 149
150#define WRITE 1 150#define READ 0
151#define READA 2 /* read-ahead - don't block if no resources */ 151#define WRITE 1
152#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ 152#define READA 2 /* readahead - don't block if no resources */
153#define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) 153#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */
154#define READ_META (READ | (1 << BIO_RW_META)) 154
155#define WRITE_SYNC_PLUG (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) 155#define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG)
156#define WRITE_SYNC (WRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) 156#define READ_META (READ | REQ_META)
157#define WRITE_ODIRECT_PLUG (WRITE | (1 << BIO_RW_SYNCIO)) 157#define WRITE_SYNC_PLUG (WRITE | REQ_SYNC | REQ_NOIDLE)
158#define WRITE_META (WRITE | (1 << BIO_RW_META)) 158#define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG)
159#define SWRITE_SYNC_PLUG \ 159#define WRITE_ODIRECT_PLUG (WRITE | REQ_SYNC)
160 (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) 160#define WRITE_META (WRITE | REQ_META)
161#define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) 161#define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \
162#define WRITE_BARRIER (WRITE_SYNC | (1 << BIO_RW_BARRIER)) 162 REQ_HARDBARRIER)
163#define SWRITE_SYNC_PLUG (SWRITE | REQ_SYNC | REQ_NOIDLE)
164#define SWRITE_SYNC (SWRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG)
163 165
164/* 166/*
165 * These aren't really reads or writes, they pass down information about 167 * These aren't really reads or writes, they pass down information about
166 * parts of device that are now unused by the file system. 168 * parts of device that are now unused by the file system.
167 */ 169 */
168#define DISCARD_NOBARRIER (WRITE | (1 << BIO_RW_DISCARD)) 170#define DISCARD_NOBARRIER (WRITE | REQ_DISCARD)
169#define DISCARD_BARRIER (DISCARD_NOBARRIER | (1 << BIO_RW_BARRIER)) 171#define DISCARD_BARRIER (WRITE | REQ_DISCARD | REQ_HARDBARRIER)
170 172
171#define SEL_IN 1 173#define SEL_IN 1
172#define SEL_OUT 2 174#define SEL_OUT 2