Main Page | Report this Page
Linux Forum Index  »  Linux Development - System  »  CDROM block device driver...
Page 1 of 1    

CDROM block device driver...

Author Message
Ashu...
Posted: Mon Jul 20, 2009 12:02 am
Guest
Hi,

I am working on a CDROM block device driver in linux 2.6.26. In the
request function I
call the function elv_next_request to get the next request. From the
request I use the
req->sector, req->nr_sectors, req->buffer to read the issue a read to
CDROM sectors.

Mount and directory browsing results in a request of 4 blocks of data
which works. But
when copying a file, it makes a bigger request (64, 128, 265 etc). So
for a request of
128 sectors, my request function reads all these consecutive sectors,
but in subsequent
request starting address is the previous sector + 4 and not
prev_sector + 256, I have to
read all the sector again.

Am I missing something here? Do I need to update some req structure
members to
indicate how may blocks have been read?

Thanks,
Ashu
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Mar 21, 2010 11:52 pm