diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-10 12:26:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-10 12:26:55 -0400 |
| commit | dd76a786af1f09e9122e150d30156e094e2a94b4 (patch) | |
| tree | 97ff3d0d45d8df3294d3ec913eec728eb1c2ab57 /include/linux | |
| parent | e7990d45bb88c2f0565b5ee4c32eefe81653faff (diff) | |
| parent | 360f92c2443073143467a0088daffec96a17910b (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"A small collection of fixes that should go in before -rc1. The pull
request contains:
- A two patch fix for a regression with block enabled tagging caused
by a commit in the initial pull request. One patch is from Martin
and ensures that SCSI doesn't truncate 64-bit block flags, the
other one is from me and prevents us from double using struct
request queuelist for both completion and busy tags. This caused
anything from a boot crash for some, to crashes under load.
- A blk-mq fix for a potential soft stall when hot unplugging CPUs
with busy IO.
- percpu_counter fix is listed in here, that caused a suspend issue
with virtio-blk due to percpu counters having an inconsistent state
during CPU removal. Andrew sent this in separately a few days ago,
but it's here. JFYI.
- A few fixes for block integrity from Martin.
- A ratelimit fix for loop from Mike Galbraith, to avoid spewing too
much in error cases"
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix regression with block enabled tagging
scsi: Make sure cmd_flags are 64-bit
block: Ensure we only enable integrity metadata for reads and writes
block: Fix integrity verification
block: Fix for_each_bvec()
drivers/block/loop.c: ratelimit error messages
blk-mq: fix potential stall during CPU unplug with IO pending
percpu_counter: fix bad counter state during suspend
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 |
