Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
[PATCH] block/elevator.c: remove unused exports
[PATCH] splice: fix smaller sized splice reads
[PATCH] Don't inherit ->splice_pipe across forks
[patch] cleanup: use blk_queue_stopped
[PATCH] Document online io scheduler switching

+37 -5
+22
Documentation/block/switching-sched.txt
···
··· 1 + As of the Linux 2.6.10 kernel, it is now possible to change the 2 + IO scheduler for a given block device on the fly (thus making it possible, 3 + for instance, to set the CFQ scheduler for the system default, but 4 + set a specific device to use the anticipatory or noop schedulers - which 5 + can improve that device's throughput). 6 + 7 + To set a specific scheduler, simply do this: 8 + 9 + echo SCHEDNAME > /sys/block/DEV/queue/scheduler 10 + 11 + where SCHEDNAME is the name of a defined IO scheduler, and DEV is the 12 + device name (hda, hdb, sga, or whatever you happen to have). 13 + 14 + The list of defined schedulers can be found by simply doing 15 + a "cat /sys/block/DEV/queue/scheduler" - the list of valid names 16 + will be displayed, with the currently selected scheduler in brackets: 17 + 18 + # cat /sys/block/hda/queue/scheduler 19 + noop anticipatory deadline [cfq] 20 + # echo anticipatory > /sys/block/hda/queue/scheduler 21 + # cat /sys/block/hda/queue/scheduler 22 + noop [anticipatory] deadline cfq
-2
block/elevator.c
··· 895 EXPORT_SYMBOL(elv_dispatch_sort); 896 EXPORT_SYMBOL(elv_add_request); 897 EXPORT_SYMBOL(__elv_add_request); 898 - EXPORT_SYMBOL(elv_requeue_request); 899 EXPORT_SYMBOL(elv_next_request); 900 EXPORT_SYMBOL(elv_dequeue_request); 901 EXPORT_SYMBOL(elv_queue_empty); 902 - EXPORT_SYMBOL(elv_completed_request); 903 EXPORT_SYMBOL(elevator_exit); 904 EXPORT_SYMBOL(elevator_init);
··· 895 EXPORT_SYMBOL(elv_dispatch_sort); 896 EXPORT_SYMBOL(elv_add_request); 897 EXPORT_SYMBOL(__elv_add_request); 898 EXPORT_SYMBOL(elv_next_request); 899 EXPORT_SYMBOL(elv_dequeue_request); 900 EXPORT_SYMBOL(elv_queue_empty); 901 EXPORT_SYMBOL(elevator_exit); 902 EXPORT_SYMBOL(elevator_init);
+2 -2
block/ll_rw_blk.c
··· 1554 * don't plug a stopped queue, it must be paired with blk_start_queue() 1555 * which will restart the queueing 1556 */ 1557 - if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)) 1558 return; 1559 1560 if (!test_and_set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags)) { ··· 1587 */ 1588 void __generic_unplug_device(request_queue_t *q) 1589 { 1590 - if (unlikely(test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags))) 1591 return; 1592 1593 if (!blk_remove_plug(q))
··· 1554 * don't plug a stopped queue, it must be paired with blk_start_queue() 1555 * which will restart the queueing 1556 */ 1557 + if (blk_queue_stopped(q)) 1558 return; 1559 1560 if (!test_and_set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags)) { ··· 1587 */ 1588 void __generic_unplug_device(request_queue_t *q) 1589 { 1590 + if (unlikely(blk_queue_stopped(q))) 1591 return; 1592 1593 if (!blk_remove_plug(q))
+12 -1
fs/splice.c
··· 275 error = 0; 276 bytes = 0; 277 for (i = 0; i < nr_pages; i++, index++) { 278 find_page: 279 /* 280 * lookup the page for this index ··· 375 * force quit after adding this page 376 */ 377 nr_pages = i; 378 } 379 } 380 fill_it: 381 pages[i] = page; 382 - bytes += PAGE_CACHE_SIZE - loff; 383 loff = 0; 384 } 385
··· 275 error = 0; 276 bytes = 0; 277 for (i = 0; i < nr_pages; i++, index++) { 278 + unsigned int this_len; 279 + 280 + if (!len) 281 + break; 282 + 283 + /* 284 + * this_len is the max we'll use from this page 285 + */ 286 + this_len = min(len, PAGE_CACHE_SIZE - loff); 287 find_page: 288 /* 289 * lookup the page for this index ··· 366 * force quit after adding this page 367 */ 368 nr_pages = i; 369 + this_len = min(this_len, loff); 370 } 371 } 372 fill_it: 373 pages[i] = page; 374 + bytes += this_len; 375 + len -= this_len; 376 loff = 0; 377 } 378
+1
kernel/fork.c
··· 180 atomic_set(&tsk->usage,2); 181 atomic_set(&tsk->fs_excl, 0); 182 tsk->btrace_seq = 0; 183 return tsk; 184 } 185
··· 180 atomic_set(&tsk->usage,2); 181 atomic_set(&tsk->fs_excl, 0); 182 tsk->btrace_seq = 0; 183 + tsk->splice_pipe = NULL; 184 return tsk; 185 } 186