diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 6 | ||||
| -rw-r--r-- | include/linux/blk_types.h | 2 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 13 |
3 files changed, 17 insertions, 4 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5a4d39b4686b..5aa372a7380c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -216,9 +216,9 @@ static inline void bvec_iter_advance(struct bio_vec *bv, struct bvec_iter *iter, | |||
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | #define for_each_bvec(bvl, bio_vec, iter, start) \ | 218 | #define for_each_bvec(bvl, bio_vec, iter, start) \ |
| 219 | for ((iter) = start; \ | 219 | for (iter = (start); \ |
| 220 | (bvl) = bvec_iter_bvec((bio_vec), (iter)), \ | 220 | (iter).bi_size && \ |
| 221 | (iter).bi_size; \ | 221 | ((bvl = bvec_iter_bvec((bio_vec), (iter))), 1); \ |
| 222 | bvec_iter_advance((bio_vec), &(iter), (bvl).bv_len)) | 222 | bvec_iter_advance((bio_vec), &(iter), (bvl).bv_len)) |
| 223 | 223 | ||
| 224 | 224 | ||
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index bbc3a6c88fce..aa0eaa2d0bd8 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -189,6 +189,7 @@ enum rq_flag_bits { | |||
| 189 | __REQ_KERNEL, /* direct IO to kernel pages */ | 189 | __REQ_KERNEL, /* direct IO to kernel pages */ |
| 190 | __REQ_PM, /* runtime pm request */ | 190 | __REQ_PM, /* runtime pm request */ |
| 191 | __REQ_END, /* last of chain of requests */ | 191 | __REQ_END, /* last of chain of requests */ |
| 192 | __REQ_HASHED, /* on IO scheduler merge hash */ | ||
| 192 | __REQ_NR_BITS, /* stops here */ | 193 | __REQ_NR_BITS, /* stops here */ |
| 193 | }; | 194 | }; |
| 194 | 195 | ||
| @@ -241,5 +242,6 @@ enum rq_flag_bits { | |||
| 241 | #define REQ_KERNEL (1ULL << __REQ_KERNEL) | 242 | #define REQ_KERNEL (1ULL << __REQ_KERNEL) |
| 242 | #define REQ_PM (1ULL << __REQ_PM) | 243 | #define REQ_PM (1ULL << __REQ_PM) |
| 243 | #define REQ_END (1ULL << __REQ_END) | 244 | #define REQ_END (1ULL << __REQ_END) |
| 245 | #define REQ_HASHED (1ULL << __REQ_HASHED) | ||
| 244 | 246 | ||
| 245 | #endif /* __LINUX_BLK_TYPES_H */ | 247 | #endif /* __LINUX_BLK_TYPES_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1e1fa3f93d5f..99617cf7dd1a 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -118,7 +118,18 @@ struct request { | |||
| 118 | struct bio *bio; | 118 | struct bio *bio; |
| 119 | struct bio *biotail; | 119 | struct bio *biotail; |
| 120 | 120 | ||
| 121 | struct hlist_node hash; /* merge hash */ | 121 | /* |
| 122 | * The hash is used inside the scheduler, and killed once the | ||
| 123 | * request reaches the dispatch list. The ipi_list is only used | ||
| 124 | * to queue the request for softirq completion, which is long | ||
| 125 | * after the request has been unhashed (and even removed from | ||
| 126 | * the dispatch list). | ||
| 127 | */ | ||
| 128 | union { | ||
| 129 | struct hlist_node hash; /* merge hash */ | ||
| 130 | struct list_head ipi_list; | ||
| 131 | }; | ||
| 132 | |||
| 122 | /* | 133 | /* |
| 123 | * The rb_node is only used inside the io scheduler, requests | 134 | * The rb_node is only used inside the io scheduler, requests |
| 124 | * are pruned when moved to the dispatch queue. So let the | 135 | * are pruned when moved to the dispatch queue. So let the |
