[lkml]   [2007]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectproblem with ending requests asynchronously in my block device driver


I've a block device driver which does the following,

Inside the request function I do something like this:
request(fn) {

while ((req = elv_next_request(q)) != NULL) {
....................set up the request;
call the transfer(set_up_req) function;
spin_unlock_irq (q->queue_lock);
/* allow callback to execute as it needs the lock!!! */
spin_lock_irq (q->queue_lock);

and the transfer function calls the scsi_execute_asyn(....) with the
callback function doing the end request. So, the ending of the request is
done like below:

callback(fn) {

spin_lock_irqsave(q->queue_lock, flags);
if (!end_that_request_first(set_up_req->req, cmpstatus,
set_up_req->req->nr_sectors)) {
spin_unlock_irqrestore(q->queue_lock, flags);

This code works fine with most of the kernel versions, but fails on some
like , Linux 2.6.18-8.el5-xen

Please help me to find out where I'm going wrong?

Thanks in advance for an early reply.
Anil P.

View this message in context:
Sent from the linux-kernel mailing list archive at

 \ /
  Last update: 2007-12-15 22:09    [W:0.026 / U:2.664 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site