]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - block/elevator.c
block: Initial support for data-less (or empty) barrier support
[mirror_ubuntu-bionic-kernel.git] / block / elevator.c
index ec23ca02f2fed9e57a8977c36cd331a36cd5fbf9..952aee04a68ad7cc240b8ecb7a8a0e1590b9a33f 100644 (file)
@@ -712,6 +712,14 @@ struct request *elv_next_request(struct request_queue *q)
        int ret;
 
        while ((rq = __elv_next_request(q)) != NULL) {
+               /*
+                * Kill the empty barrier place holder, the driver must
+                * not ever see it.
+                */
+               if (blk_empty_barrier(rq)) {
+                       end_queued_request(rq, 1);
+                       continue;
+               }
                if (!(rq->cmd_flags & REQ_STARTED)) {
                        /*
                         * This is the first time the device driver