libblock ramdisk.c

Victor V. Vengerov vvv at oktet.ru
Fri Apr 11 13:18:49 UTC 2003


Brett,

Yes, you are right. This is the problem. Currently, no scatter/gather lists
are supported, therefore there was not problems before.

I have submitted the problem report to gnats:
http://www.rtems.com/cgi-bin/gnatsweb.pl?database=RTEMS&pr=385&cmd=view

Victor

Brett Swimley wrote:

>Hello all -
>
>I'm implementing a block device driver for a smartmedia card and wanted to use
>the ramdisk.c function as a reference.
>
>I believe I understand the concept of how the driver interacts with the block
>device read and write requests, but it seems to me that there is an error in
>both ramdisk_read and ramdisk_write.
>
>The "from" and "to" locations are calculated as the start of the block within
>the ram that data is to be transferred from/to for reads and writes
>respectively.  However, within the loops, the "from" and "to" locations are
>never updated.  Shouldn't they be updated as:
>
>from += rd->block_size;
>
>and
>
>to += rd->block_size;
>
>within the for loops in the ramdisk_read and ramdisk_write routines, respectively?
>
>It appears to me upon examination of the bdbuf.c source that only one
>scatter/gather buffer is ever being used, but I bring this issue up for
>completeness.
>
>Any comments would be appreciated.
>
>Regards,
>
>Brett Swimley
>
>
>  
>


-- 
Victor V. Vengerov
OKTET Ltd.
Ulianovskaya st., 1, office 533, St.-Petersburg 198504 Russia
phone: +7 812 4284384 (work), +7 812 9389372 (mobile), +7 812 4281653 (home)






More information about the users mailing list