You are reading 2.2 sources, maybe try the 2.4 sources as they are
easier to follow in this regard IMHO.
What happens is that we assign dev->current_request &dev->plug, so that
the front request is recognizable as the 'plug' and not a valid request.
You seem to completely misunderstand plugging -- if we just put the new
request on the queue and scheduled tq_disk, then there would be no
plugging going on at all. What we do instead is add this specific 'plug
request' and queue lots of stuff behind that. Not until someone needs
the data on the queue is the 'plug request' removed and the request_fn
run. This happens for instance if _someone else_ calls tq_disk,
typically __wait_on_buffer.
> So we can as well put the new req on the queue without dummy req.
Wrong
> If i'm incorrect please explain what's exact process and the reason
See?
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/