Rusty Russell wrote:
Hmm... Perhaps I should move the used arrays into the "struct
virtio_device" and guarantee that the id (returned by add_*buf) is an
index into that.  Then we can trivially add a corresponding bit array.


That may force the virtio backend to do things it doesn't want to.

This also makes the "id" easier to use from the driver side: if we add a
"max_id" field it can size its own arrays if it wants to.  Gets rid of
the linked-list in the block driver...

How about

   struct virtio_completion {
       unsigned long length;
       void *data;
   };

   int virtio_complete(struct virtio_completion *completions, int nr);


where 'data' is an opaque pointer passed by the device during add_*buf()?

--
error compiling committee.c: too many arguments to function

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Reply via email to