Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68cf8d0c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block

Pull block IO fixes from Jens Axboe:
 "After merge window, no new stuff this time only a collection of neatly
  confined and simple fixes"

* 'for-3.12/core' of git://git.kernel.dk/linux-block:
  cfq: explicitly use 64bit divide operation for 64bit arguments
  block: Add nr_bios to block_rq_remap tracepoint
  If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
  bio-integrity: Fix use of bs->bio_integrity_pool after free
  blkcg: relocate root_blkg setting and clearing
  block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
  block: trace all devices plug operation
parents 0fbf2cc9 f3cff25f
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -235,8 +235,13 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,
	blkg->online = true;
	spin_unlock(&blkcg->lock);

	if (!ret)
	if (!ret) {
		if (blkcg == &blkcg_root) {
			q->root_blkg = blkg;
			q->root_rl.blkg = blkg;
		}
		return blkg;
	}

	/* @blkg failed fully initialized, use the usual release path */
	blkg_put(blkg);
@@ -334,6 +339,15 @@ static void blkg_destroy(struct blkcg_gq *blkg)
	if (rcu_dereference_raw(blkcg->blkg_hint) == blkg)
		rcu_assign_pointer(blkcg->blkg_hint, NULL);

	/*
	 * If root blkg is destroyed.  Just clear the pointer since root_rl
	 * does not take reference on root blkg.
	 */
	if (blkcg == &blkcg_root) {
		blkg->q->root_blkg = NULL;
		blkg->q->root_rl.blkg = NULL;
	}

	/*
	 * Put the reference taken at the time of creation so that when all
	 * queues are gone, group can be destroyed.
@@ -360,13 +374,6 @@ static void blkg_destroy_all(struct request_queue *q)
		blkg_destroy(blkg);
		spin_unlock(&blkcg->lock);
	}

	/*
	 * root blkg is destroyed.  Just clear the pointer since
	 * root_rl does not take reference on root blkg.
	 */
	q->root_blkg = NULL;
	q->root_rl.blkg = NULL;
}

/*
@@ -970,8 +977,6 @@ int blkcg_activate_policy(struct request_queue *q,
		ret = PTR_ERR(blkg);
		goto out_unlock;
	}
	q->root_blkg = blkg;
	q->root_rl.blkg = blkg;

	list_for_each_entry(blkg, &q->blkg_list, q_node)
		cnt++;
+2 −4
Original line number Diff line number Diff line
@@ -1549,11 +1549,9 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
	if (plug) {
		/*
		 * If this is the first request added after a plug, fire
		 * of a plug trace. If others have been added before, check
		 * if we have multiple devices in this plug. If so, make a
		 * note to sort the list before dispatch.
		 * of a plug trace.
		 */
		if (list_empty(&plug->list))
		if (!request_count)
			trace_block_plug(q);
		else {
			if (request_count >= BLK_MAX_REQUEST_COUNT) {
+2 −2
Original line number Diff line number Diff line
@@ -68,9 +68,9 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
	spin_lock_irq(q->queue_lock);

	if (unlikely(blk_queue_dying(q))) {
		rq->cmd_flags |= REQ_QUIET; 
		rq->errors = -ENXIO;
		if (rq->end_io)
			rq->end_io(rq, rq->errors);
		__blk_end_request_all(rq, rq->errors);
		spin_unlock_irq(q->queue_lock);
		return;
	}
+2 −2
Original line number Diff line number Diff line
@@ -1803,7 +1803,7 @@ static u64 cfqg_prfill_avg_queue_size(struct seq_file *sf,

	if (samples) {
		v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum);
		do_div(v, samples);
		v = div64_u64(v, samples);
	}
	__blkg_prfill_u64(sf, pd, v);
	return 0;
@@ -4358,7 +4358,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
	if (!eq)
		return -ENOMEM;

	cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node);
	cfqd = kzalloc_node(sizeof(*cfqd), GFP_KERNEL, q->node);
	if (!cfqd) {
		kobject_put(&eq->kobj);
		return -ENOMEM;
+1 −1
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ static int deadline_init_queue(struct request_queue *q, struct elevator_type *e)
	if (!eq)
		return -ENOMEM;

	dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node);
	dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node);
	if (!dd) {
		kobject_put(&eq->kobj);
		return -ENOMEM;
Loading