Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-22 Thread Rusty Russell
On Fri, 2007-09-21 at 14:27 +0200, Jens Axboe wrote: > On Fri, Sep 21 2007, Rusty Russell wrote: > > I shall look through the code and see if I can figure out how to fix it. > > I'm assuming from your response that there's not some strange reason to > > preserve current behaviour. > > It surely so

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 13:47 +0200, Jens Axboe wrote: > On Fri, Sep 21 2007, Rusty Russell wrote: > > On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > > > We have end_queued_request(), lets add end_dequeued_request(). Below. > > > > OK, thanks, I'll throw that in the mix and test... > > I've

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Jens Axboe
On Fri, Sep 21 2007, Rusty Russell wrote: > On Thu, 2007-09-20 at 14:27 +0200, Jens Axboe wrote: > > On Thu, Sep 20 2007, Rusty Russell wrote: > > > The block driver uses scatter-gather lists with sg[0] being the > > > request information (struct virtio_blk_outhdr) with the type, sector > > > and i

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:27 +0200, Jens Axboe wrote: > On Thu, Sep 20 2007, Rusty Russell wrote: > > The block driver uses scatter-gather lists with sg[0] being the > > request information (struct virtio_blk_outhdr) with the type, sector > > and inbuf id. The next N sg entries are the bio itself,

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Jens Axboe
On Fri, Sep 21 2007, Rusty Russell wrote: > On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > > On Thu, Sep 20 2007, Rusty Russell wrote: > > > +static void end_dequeued_request(struct request *req, > > > + struct request_queue *q, int uptodate) > > > +{ > > > + /* And

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > On Thu, Sep 20 2007, Rusty Russell wrote: > > +static void end_dequeued_request(struct request *req, > > +struct request_queue *q, int uptodate) > > +{ > > + /* And so the insanity of the block layer infects us her

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-20 Thread Jens Axboe
On Thu, Sep 20 2007, Rusty Russell wrote: > +static void end_dequeued_request(struct request *req, > + struct request_queue *q, int uptodate) > +{ > + /* And so the insanity of the block layer infects us here. */ > + int nsectors = req->hard_nr_sectors; > + > +

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-20 Thread Jens Axboe
On Thu, Sep 20 2007, Rusty Russell wrote: > The block driver uses scatter-gather lists with sg[0] being the > request information (struct virtio_blk_outhdr) with the type, sector > and inbuf id. The next N sg entries are the bio itself, then the last > sg is the status byte. Whether the N entries

[kvm-devel] [PATCH 4/6] virtio block driver

2007-09-20 Thread Rusty Russell
The block driver uses scatter-gather lists with sg[0] being the request information (struct virtio_blk_outhdr) with the type, sector and inbuf id. The next N sg entries are the bio itself, then the last sg is the status byte. Whether the N entries are in or out depends on whether it's a read or a