aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-10-24 10:11:30 -0400
committerJens Axboe <axboe@kernel.dk>2011-10-24 10:11:30 -0400
commit9562ad9ab36df7ccef920d119f3b5100025db95f (patch)
treeb5e32ca469cbefca4122c1a08db80cdb12e655fb /block/blk-core.c
parente890413af4c2dfebf5432ef30cc70cb11dad3213 (diff)
block: Remove the control of complete cpu from bio.
bio originally has the functionality to set the complete cpu, but it is broken. Chirstoph said that "This code is unused, and from the all the discussions lately pretty obviously broken. The only thing keeping it serves is creating more confusion and possibly more bugs." And Jens replied with "We can kill bio_set_completion_cpu(). I'm fine with leaving cpu control to the request based drivers, they are the only ones that can toggle the setting anyway". So this patch tries to remove all the work of controling complete cpu from a bio. Cc: Shaohua Li <shaohua.li@intel.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 7e1523521c70..da697936d220 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1276,7 +1276,6 @@ out:
1276 1276
1277void init_request_from_bio(struct request *req, struct bio *bio) 1277void init_request_from_bio(struct request *req, struct bio *bio)
1278{ 1278{
1279 req->cpu = bio->bi_comp_cpu;
1280 req->cmd_type = REQ_TYPE_FS; 1279 req->cmd_type = REQ_TYPE_FS;
1281 1280
1282 req->cmd_flags |= bio->bi_rw & REQ_COMMON_MASK; 1281 req->cmd_flags |= bio->bi_rw & REQ_COMMON_MASK;
@@ -1362,8 +1361,7 @@ get_rq:
1362 */ 1361 */
1363 init_request_from_bio(req, bio); 1362 init_request_from_bio(req, bio);
1364 1363
1365 if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) || 1364 if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags))
1366 bio_flagged(bio, BIO_CPU_AFFINE))
1367 req->cpu = raw_smp_processor_id(); 1365 req->cpu = raw_smp_processor_id();
1368 1366
1369 plug = current->plug; 1367 plug = current->plug;