diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-09-27 13:01:25 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 11:03:56 +0200 |
commit | bf2de6f5a4faf0197268f18d08969b003b87b6e8 (patch) | |
tree | 16830a15a7effea352445a7aba5dbb433314d3eb /block/elevator.c | |
parent | c07e2b41291853b19fff11ceee3657df252a4e42 (diff) |
block: Initial support for data-less (or empty) barrier support
This implements functionality to pass down or insert a barrier
in a queue, without having data attached to it. The ->prepare_flush_fn()
infrastructure from data barriers are reused to provide this
functionality.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c index ec23ca02f2fe..952aee04a68a 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -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 |