Commit [db3b58]  Maximize  Restore  History

When cfq I/O scheduler is selected, get_request() in __make_request() calls

__cfq_get_queue(). __cfq_get_queue() finds an existing queue (struct
cfq_queue) of the current process for the device and returns it. If it's not
found, __cfq_get_queue() creates and returns a new one if __cfq_get_queue() is
called with __GFP_WAIT flag, or __cfq_get_queue() returns NULL (this means that
get_request() fails) if no __GFP_WAIT flag.

On the other hand, in __make_request(), get_request() is called without
__GFP_WAIT flag at the first time. Thus, the get_request() fails when there is
no existing queue, typically when it's called for the first I/O request of the
process to the device.

Though it will be followed by get_request_wait() for general case,
__make_request() will just end the I/O with an error (EWOULDBLOCK) when the
request was for read-ahead.

Signed-off-by: Jens Axboe <>
Signed-off-by: Kiyoshi Ueda <>
Signed-off-by: Jun'ichi Nomura <>

Kiyoshi Ueda Kiyoshi Ueda 2005-06-17

Jens Axboe Jens Axboe 2005-06-17

changed drivers/block/cfq-iosched.c
drivers/block/cfq-iosched.c Diff Switch to side-by-side view

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks