Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-22 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Oct 18, 2012 at 02:50:56PM +1030, Rusty Russell wrote: Asias He as...@redhat.com writes: +#define BLK_HDR 0 What's this for, exactly? Please add a comment. The block headr is in the first and separate buffer. Please don't assume

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-17 Thread Rusty Russell
Asias He as...@redhat.com writes: +#define BLK_HDR0 What's this for, exactly? Please add a comment. The block headr is in the first and separate buffer. Please don't assume this! We're trying to fix all the assumptions in qemu at the moment. vhost_net handles this correctly, taking

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-13 Thread Michael S. Tsirkin
On Fri, Oct 12, 2012 at 09:18:54PM +0800, Asias He wrote: Hello Michael, Thanks for the review! On 10/11/2012 08:41 PM, Michael S. Tsirkin wrote: On Tue, Oct 09, 2012 at 04:05:18PM +0800, Asias He wrote: vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-12 Thread Asias He
Hello Michael, Thanks for the review! On 10/11/2012 08:41 PM, Michael S. Tsirkin wrote: On Tue, Oct 09, 2012 at 04:05:18PM +0800, Asias He wrote: vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper in-kernel AIO interface, this version converts guest's I/O request

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-11 Thread Michael S. Tsirkin
On Tue, Oct 09, 2012 at 04:05:18PM +0800, Asias He wrote: vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper in-kernel AIO interface, this version converts guest's I/O request to bio and use submit_bio() to submit I/O directly. So this version any supports raw

[PATCH] vhost-blk: Add vhost-blk support v2

2012-10-09 Thread Asias He
vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper in-kernel AIO interface, this version converts guest's I/O request to bio and use submit_bio() to submit I/O directly. So this version any supports raw block device as guest's disk image, e.g. /dev/sda, /dev/ram0. We

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-09 Thread Christoph Hellwig
+static int vhost_blk_req_submit(struct vhost_blk_req *req, struct file *file) +{ + + struct inode *inode = file-f_mapping-host; + struct block_device *bdev = inode-i_bdev; + int ret; Please just pass the block_device directly instead of a file struct. + + ret =

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-09 Thread Asias He
Hello Christoph! On 10/10/2012 01:39 AM, Christoph Hellwig wrote: +static int vhost_blk_req_submit(struct vhost_blk_req *req, struct file *file) +{ + +struct inode *inode = file-f_mapping-host; +struct block_device *bdev = inode-i_bdev; +int ret; Please just pass the