summaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-07-03 04:45:32 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:23:53 -0400
commit8749534fe6826596b71bc409c872b047a8e2755b (patch)
tree29ceb928f03dfb33d3a03df1c00e4a51d22b55b3 /include/linux/bio.h
parent802447c1c0513a0ea0e29d6bda23b19ac0686654 (diff)
block: introduce REQ_FLUSH flag
SCSI-ml needs a way to mark a request as flush request in q->prepare_flush_fn because it needs to identify them later (e.g. in q->request_fn or prep_rq_fn). queue_flush sets REQ_HARDBARRIER in rq->cmd_flags however the block layer also sends normal REQ_TYPE_FS requests with REQ_HARDBARRIER. So SCSI-ml can't use REQ_HARDBARRIER to identify flush requests. We could change the block layer to clear REQ_HARDBARRIER bit before sending non flush requests to the lower layers. However, intorudcing the new flag looks cleaner (surely easier). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@suse.de> Cc: David S. Miller <davem@davemloft.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Alasdair G Kergon <agk@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 4d379c8250ae..f655b54c9ef3 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -174,6 +174,7 @@ enum rq_flag_bits {
174 __REQ_ALLOCED, /* request came from our alloc pool */ 174 __REQ_ALLOCED, /* request came from our alloc pool */
175 __REQ_COPY_USER, /* contains copies of user pages */ 175 __REQ_COPY_USER, /* contains copies of user pages */
176 __REQ_INTEGRITY, /* integrity metadata has been remapped */ 176 __REQ_INTEGRITY, /* integrity metadata has been remapped */
177 __REQ_FLUSH, /* request for cache flush */
177 __REQ_IO_STAT, /* account I/O stat */ 178 __REQ_IO_STAT, /* account I/O stat */
178 __REQ_MIXED_MERGE, /* merge of different types, fail separately */ 179 __REQ_MIXED_MERGE, /* merge of different types, fail separately */
179 __REQ_NR_BITS, /* stops here */ 180 __REQ_NR_BITS, /* stops here */
@@ -213,6 +214,7 @@ enum rq_flag_bits {
213#define REQ_ALLOCED (1 << __REQ_ALLOCED) 214#define REQ_ALLOCED (1 << __REQ_ALLOCED)
214#define REQ_COPY_USER (1 << __REQ_COPY_USER) 215#define REQ_COPY_USER (1 << __REQ_COPY_USER)
215#define REQ_INTEGRITY (1 << __REQ_INTEGRITY) 216#define REQ_INTEGRITY (1 << __REQ_INTEGRITY)
217#define REQ_FLUSH (1 << __REQ_FLUSH)
216#define REQ_IO_STAT (1 << __REQ_IO_STAT) 218#define REQ_IO_STAT (1 << __REQ_IO_STAT)
217#define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE) 219#define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE)
218 220