libblock ramdisk.c

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


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:


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;
>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
>Any comments would be appreciated.
>Brett Swimley

Victor V. Vengerov
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