Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+40 -25
+15 -10
block/blk-cgroup.c
··· 235 235 blkg->online = true; 236 236 spin_unlock(&blkcg->lock); 237 237 238 - if (!ret) 238 + if (!ret) { 239 + if (blkcg == &blkcg_root) { 240 + q->root_blkg = blkg; 241 + q->root_rl.blkg = blkg; 242 + } 239 243 return blkg; 244 + } 240 245 241 246 /* @blkg failed fully initialized, use the usual release path */ 242 247 blkg_put(blkg); ··· 340 335 rcu_assign_pointer(blkcg->blkg_hint, NULL); 341 336 342 337 /* 338 + * If root blkg is destroyed. Just clear the pointer since root_rl 339 + * does not take reference on root blkg. 340 + */ 341 + if (blkcg == &blkcg_root) { 342 + blkg->q->root_blkg = NULL; 343 + blkg->q->root_rl.blkg = NULL; 344 + } 345 + 346 + /* 343 347 * Put the reference taken at the time of creation so that when all 344 348 * queues are gone, group can be destroyed. 345 349 */ ··· 374 360 blkg_destroy(blkg); 375 361 spin_unlock(&blkcg->lock); 376 362 } 377 - 378 - /* 379 - * root blkg is destroyed. Just clear the pointer since 380 - * root_rl does not take reference on root blkg. 381 - */ 382 - q->root_blkg = NULL; 383 - q->root_rl.blkg = NULL; 384 363 } 385 364 386 365 /* ··· 977 970 ret = PTR_ERR(blkg); 978 971 goto out_unlock; 979 972 } 980 - q->root_blkg = blkg; 981 - q->root_rl.blkg = blkg; 982 973 983 974 list_for_each_entry(blkg, &q->blkg_list, q_node) 984 975 cnt++;
+2 -4
block/blk-core.c
··· 1549 1549 if (plug) { 1550 1550 /* 1551 1551 * If this is the first request added after a plug, fire 1552 - * of a plug trace. If others have been added before, check 1553 - * if we have multiple devices in this plug. If so, make a 1554 - * note to sort the list before dispatch. 1552 + * of a plug trace. 1555 1553 */ 1556 - if (list_empty(&plug->list)) 1554 + if (!request_count) 1557 1555 trace_block_plug(q); 1558 1556 else { 1559 1557 if (request_count >= BLK_MAX_REQUEST_COUNT) {
+2 -2
block/blk-exec.c
··· 68 68 spin_lock_irq(q->queue_lock); 69 69 70 70 if (unlikely(blk_queue_dying(q))) { 71 + rq->cmd_flags |= REQ_QUIET; 71 72 rq->errors = -ENXIO; 72 - if (rq->end_io) 73 - rq->end_io(rq, rq->errors); 73 + __blk_end_request_all(rq, rq->errors); 74 74 spin_unlock_irq(q->queue_lock); 75 75 return; 76 76 }
+2 -2
block/cfq-iosched.c
··· 1803 1803 1804 1804 if (samples) { 1805 1805 v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum); 1806 - do_div(v, samples); 1806 + v = div64_u64(v, samples); 1807 1807 } 1808 1808 __blkg_prfill_u64(sf, pd, v); 1809 1809 return 0; ··· 4358 4358 if (!eq) 4359 4359 return -ENOMEM; 4360 4360 4361 - cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node); 4361 + cfqd = kzalloc_node(sizeof(*cfqd), GFP_KERNEL, q->node); 4362 4362 if (!cfqd) { 4363 4363 kobject_put(&eq->kobj); 4364 4364 return -ENOMEM;
+1 -1
block/deadline-iosched.c
··· 346 346 if (!eq) 347 347 return -ENOMEM; 348 348 349 - dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node); 349 + dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node); 350 350 if (!dd) { 351 351 kobject_put(&eq->kobj); 352 352 return -ENOMEM;
+1 -1
block/elevator.c
··· 155 155 { 156 156 struct elevator_queue *eq; 157 157 158 - eq = kmalloc_node(sizeof(*eq), GFP_KERNEL | __GFP_ZERO, q->node); 158 + eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node); 159 159 if (unlikely(!eq)) 160 160 goto err; 161 161
+1 -2
block/genhd.c
··· 1252 1252 { 1253 1253 struct gendisk *disk; 1254 1254 1255 - disk = kmalloc_node(sizeof(struct gendisk), 1256 - GFP_KERNEL | __GFP_ZERO, node_id); 1255 + disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id); 1257 1256 if (disk) { 1258 1257 if (!init_part_stats(&disk->part0)) { 1259 1258 kfree(disk);
+1 -1
fs/bio-integrity.c
··· 735 735 mempool_destroy(bs->bio_integrity_pool); 736 736 737 737 if (bs->bvec_integrity_pool) 738 - mempool_destroy(bs->bio_integrity_pool); 738 + mempool_destroy(bs->bvec_integrity_pool); 739 739 } 740 740 EXPORT_SYMBOL(bioset_integrity_free); 741 741
+11
include/linux/blkdev.h
··· 862 862 return blk_queue_get_max_sectors(q, rq->cmd_flags); 863 863 } 864 864 865 + static inline unsigned int blk_rq_count_bios(struct request *rq) 866 + { 867 + unsigned int nr_bios = 0; 868 + struct bio *bio; 869 + 870 + __rq_for_each_bio(bio, rq) 871 + nr_bios++; 872 + 873 + return nr_bios; 874 + } 875 + 865 876 /* 866 877 * Request issue related functions. 867 878 */
+4 -2
include/trace/events/block.h
··· 618 618 __field( unsigned int, nr_sector ) 619 619 __field( dev_t, old_dev ) 620 620 __field( sector_t, old_sector ) 621 + __field( unsigned int, nr_bios ) 621 622 __array( char, rwbs, RWBS_LEN) 622 623 ), 623 624 ··· 628 627 __entry->nr_sector = blk_rq_sectors(rq); 629 628 __entry->old_dev = dev; 630 629 __entry->old_sector = from; 630 + __entry->nr_bios = blk_rq_count_bios(rq); 631 631 blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); 632 632 ), 633 633 634 - TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", 634 + TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu %u", 635 635 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, 636 636 (unsigned long long)__entry->sector, 637 637 __entry->nr_sector, 638 638 MAJOR(__entry->old_dev), MINOR(__entry->old_dev), 639 - (unsigned long long)__entry->old_sector) 639 + (unsigned long long)__entry->old_sector, __entry->nr_bios) 640 640 ); 641 641 642 642 #endif /* _TRACE_BLOCK_H */