Compatible Support Forums: Block driver

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Block driver

#1 User is offline   kobedf 

  • newbie
  • Group: Members
  • Posts: 32
  • Joined: 13-October 04

Posted 06 June 2005 - 11:08 AM

Hi

i am building a block driver.It is supposed to emulate the physical driver by using a file.Furthermore , the writing takes
place inside a kernel thread.

I have a vdisk_request function where i do
blkdev_dequeue_request(req);
and then put the requests in a queue
The kernel thread than takes requests from the queue and
writes the info to the file.After the writing i do
end_that_request_last(req);


When i call this function i get a
kernel BUG at drivers/ll_rw_blk.c:2167
invalid operand:0000[#1]


At line 2167 i find
BUG_ON(!list_empty(&req->queuelist));
in the __blk_put_request function.


I understand that we need to obtain a lock to do any change on the request queue.I have a lock in my disk structure
but if i try spin_unlock(&dev->lock) or spin_lock(&dev->lock)
the program just ignores the call ( which is correct behavior on a single processor system)


Any idea what the problem could be?
thanks
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users