hi all
actually for my block device driver i have ..the following requirement : pl see
my need is
1.take the requets from the request queue
2.put it in some other linked list
3.then at some other point of time
where a request processing function takes request from the
linked list and processes it and prepares response ...
e.g in case of read request the resulting data which is read from the device.
4.request is responded by that function only and ends the request
now i am doing it in this way
while elv_next_request()
{
take the request -- copy it to another structure
and add it to the linked list .
end_request(req,0)
}
process function()
{
take node from linked list
process it
gets the result and prepares the response
and my response contains the pointer to req(original request)
take request queue lock
put result back in req->buffer
end_request(req ,1)
release request queue lock
}
my ques is
Q1.is this scheme correct ..i mean i dont dequeue the request i let it remain there
and skip it by passing 0 to end_request
then i process it later on and now end the request by passing 1 to it
is this design okay ..
--
Thanks & Regards
Nidhi