Re: [PATCH RFC 12/12] vdpa_sim_blk: implement ramdisk behaviour

From: Stefano Garzarella
Date: Mon Nov 16 2020 - 06:24:05 EST


On Mon, Nov 16, 2020 at 04:50:43AM -0500, Michael S. Tsirkin wrote:
On Fri, Nov 13, 2020 at 02:47:12PM +0100, Stefano Garzarella wrote:
The previous implementation wrote only the status of each request.
This patch implements a more accurate block device simulator,
providing a ramdisk-like behavior.

Also handle VIRTIO_BLK_T_GET_ID request, always answering the
"vdpa_blk_sim" string.

Maybe an ioctl to specify the id makes more sense.

I agree that make sense to make it configurable from the user, but I'm not sure an ioctl() is the best interface with this device simulator.

Maybe we can use a module parameter as in the net simulator or even better using the new vdpa management tool recently proposed (I need to check better how we can extend it).

What do you think?

Thanks,
Stefano