block: trace all devices plug operation
[firefly-linux-kernel-4.4.55.git] / block / blk-core.c
index d5745b5833c9d76527809c41b4718c3df70407df..91037f74668e341587b95385977035f18fb39f4f 100644 (file)
@@ -1549,11 +1549,9 @@ get_rq:
        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) {
@@ -2315,6 +2313,9 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
                case -EBADE:
                        error_type = "critical nexus";
                        break;
+               case -ETIMEDOUT:
+                       error_type = "timeout";
+                       break;
                case -EIO:
                default:
                        error_type = "I/O";
@@ -3180,7 +3181,8 @@ int __init blk_dev_init(void)
 
        /* used for unplugging and affects IO latency/throughput - HIGHPRI */
        kblockd_workqueue = alloc_workqueue("kblockd",
-                                           WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
+                                           WQ_MEM_RECLAIM | WQ_HIGHPRI |
+                                           WQ_POWER_EFFICIENT, 0);
        if (!kblockd_workqueue)
                panic("Failed to create kblockd\n");