The HyperNews Linux KHG Discussion Pages

## block_read and block_write in Virtual Disk device driver?

  Forum: Device Drivers
  Keywords: block_read , block_write , strategy routine
  Date: Tue, 03 Mar 1998 00:03:07 GMT
  From: Simon Edwards <vxduser@bongo.demon.co.uk>

Ok, at the risk of sounding stupid, I'm going to ask the following question: In the "strategy" routine of a block device driver, is it possible to call the "block_read" and "block_write" functions, with the intent of using a dummy inode and file handle to read and write data from OTHER devices? The reason I ask is that I am toying with the concept of writing a "virtual disk" device driver - and thus when the virtual disk needs to read or write in its strategy routine, it would need to use various other devices to read and write from the underlying REAL devices. Is this at all possible? If not, why not - and how the hell would you approach this problem if not!!?