Re: [kvm-devel] [PATCH RFC 2/3] Virtio draft II: example block driver

2007-06-07 Thread Rusty Russell
On Thu, 2007-06-07 at 15:19 +0300, Avi Kivity wrote: > Rusty Russell wrote: > > + sprintf(vblk->disk->disk_name, "vb%c", virtblk_index++); > > > > vd%c, in keeping with hd%c and sd%c? Should work, since iSeries' devices are /dev/iseries/vd%c. Is there already a magic routine to take the bas

Re: [kvm-devel] [PATCH RFC 2/3] Virtio draft II: example block driver

2007-06-07 Thread Avi Kivity
Rusty Russell wrote: > + sprintf(vblk->disk->disk_name, "vb%c", virtblk_index++); > vd%c, in keeping with hd%c and sd%c? -- error compiling committee.c: too many arguments to function - This SF.net email is sponsore

[kvm-devel] [PATCH RFC 2/3] Virtio draft II: example block driver

2007-06-07 Thread Rusty Russell
The block driver uses outbufs with sg[0] being the request information (struct virtio_blk_outhdr) with the type, sector and inbuf id. For a write, the rest of the sg will contain the data to be written. The first segment of the inbuf is a result code (struct virtio_blk_inhdr). For a read, the re