diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 12:02:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 12:02:41 -0400 |
commit | 8cf1a3fce0b95050b63d451c9d561da0da2aa4d6 (patch) | |
tree | 0dc7f93474c3be601a5893900db1418dfd60ba5d /drivers/scsi | |
parent | fcff06c438b60f415af5983efe92811d6aa02ad1 (diff) | |
parent | 80799fbb7d10c30df78015b3fa21f7ffcfc0eb2c (diff) |
Merge branch 'for-3.6/core' of git://git.kernel.dk/linux-block
Pull core block IO bits from Jens Axboe:
"The most complicated part if this is the request allocation rework by
Tejun, which has been queued up for a long time and has been in
for-next ditto as well.
There are a few commits from yesterday and today, mostly trivial and
obvious fixes. So I'm pretty confident that it is sound. It's also
smaller than usual."
* 'for-3.6/core' of git://git.kernel.dk/linux-block:
block: remove dead func declaration
block: add partition resize function to blkpg ioctl
block: uninitialized ioc->nr_tasks triggers WARN_ON
block: do not artificially constrain max_sectors for stacking drivers
blkcg: implement per-blkg request allocation
block: prepare for multiple request_lists
block: add q->nr_rqs[] and move q->rq.elvpriv to q->nr_rqs_elvpriv
blkcg: inline bio_blkcg() and friends
block: allocate io_context upfront
block: refactor get_request[_wait]()
block: drop custom queue draining used by scsi_transport_{iscsi|fc}
mempool: add @gfp_mask to mempool_create_node()
blkcg: make root blkcg allocation use %GFP_KERNEL
blkcg: __blkg_lookup_create() doesn't need radix preload
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 38 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 2 |
2 files changed, 1 insertions, 39 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 2d1e68db9b3f..e894ca7b54c0 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -4146,45 +4146,7 @@ fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport) | |||
4146 | static void | 4146 | static void |
4147 | fc_bsg_remove(struct request_queue *q) | 4147 | fc_bsg_remove(struct request_queue *q) |
4148 | { | 4148 | { |
4149 | struct request *req; /* block request */ | ||
4150 | int counts; /* totals for request_list count and starved */ | ||
4151 | |||
4152 | if (q) { | 4149 | if (q) { |
4153 | /* Stop taking in new requests */ | ||
4154 | spin_lock_irq(q->queue_lock); | ||
4155 | blk_stop_queue(q); | ||
4156 | |||
4157 | /* drain all requests in the queue */ | ||
4158 | while (1) { | ||
4159 | /* need the lock to fetch a request | ||
4160 | * this may fetch the same reqeust as the previous pass | ||
4161 | */ | ||
4162 | req = blk_fetch_request(q); | ||
4163 | /* save requests in use and starved */ | ||
4164 | counts = q->rq.count[0] + q->rq.count[1] + | ||
4165 | q->rq.starved[0] + q->rq.starved[1]; | ||
4166 | spin_unlock_irq(q->queue_lock); | ||
4167 | /* any requests still outstanding? */ | ||
4168 | if (counts == 0) | ||
4169 | break; | ||
4170 | |||
4171 | /* This may be the same req as the previous iteration, | ||
4172 | * always send the blk_end_request_all after a prefetch. | ||
4173 | * It is not okay to not end the request because the | ||
4174 | * prefetch started the request. | ||
4175 | */ | ||
4176 | if (req) { | ||
4177 | /* return -ENXIO to indicate that this queue is | ||
4178 | * going away | ||
4179 | */ | ||
4180 | req->errors = -ENXIO; | ||
4181 | blk_end_request_all(req, -ENXIO); | ||
4182 | } | ||
4183 | |||
4184 | msleep(200); /* allow bsg to possibly finish */ | ||
4185 | spin_lock_irq(q->queue_lock); | ||
4186 | } | ||
4187 | |||
4188 | bsg_unregister_queue(q); | 4150 | bsg_unregister_queue(q); |
4189 | blk_cleanup_queue(q); | 4151 | blk_cleanup_queue(q); |
4190 | } | 4152 | } |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 09809d06eccb..fa1dfaa83e32 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -575,7 +575,7 @@ static int iscsi_remove_host(struct transport_container *tc, | |||
575 | struct iscsi_cls_host *ihost = shost->shost_data; | 575 | struct iscsi_cls_host *ihost = shost->shost_data; |
576 | 576 | ||
577 | if (ihost->bsg_q) { | 577 | if (ihost->bsg_q) { |
578 | bsg_remove_queue(ihost->bsg_q); | 578 | bsg_unregister_queue(ihost->bsg_q); |
579 | blk_cleanup_queue(ihost->bsg_q); | 579 | blk_cleanup_queue(ihost->bsg_q); |
580 | } | 580 | } |
581 | return 0; | 581 | return 0; |