From: Martin Peschke <mp3@de.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 2/3] Virtio draft IV: the block driver
Date: Tue, 10 Jul 2007 14:12:01 +0200 [thread overview]
Message-ID: <46937791.2000706@de.ibm.com> (raw)
In-Reply-To: <1184042575.6005.483.camel@localhost.localdomain>
Rusty Russell wrote:
> Hi Martin!
>
> I like this: moving the allocation into do_req() makes it even simpler:
>
> static void do_virtblk_request(request_queue_t *q)
> {
> struct virtio_blk *vblk = NULL;
> struct request *req;
> unsigned int issued = 0;
>
> while ((req = elv_next_request(q)) != NULL) {
> vblk = req->rq_disk->private_data;
> BUG_ON(req->nr_phys_segments > ARRAY_SIZE(vblk->sg));
>
> if (!do_req(q, vblk, req)) {
> /* Queue full? Wait. */
> blk_stop_queue(q);
> break;
> }
> blkdev_dequeue_request(req);
> issued++;
> }
>
> if (issued)
> vblk->vq->ops->sync(vblk->vq);
> }
ACK ;)
Thanks,
Martin
next prev parent reply other threads:[~2007-07-10 12:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 14:17 [PATCH 2/3] Virtio draft IV: the block driver Martin Peschke
2007-07-09 15:54 ` Martin Peschke
2007-07-10 4:42 ` Rusty Russell
2007-07-10 12:12 ` Martin Peschke [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-04 4:12 [PATCH 1/3] Virtio draft IV Rusty Russell
2007-07-04 4:19 ` [PATCH 2/3] Virtio draft IV: the block driver Rusty Russell
2007-07-05 7:32 ` Christian Borntraeger
2007-07-06 0:33 ` Rusty Russell
2007-07-06 0:33 ` Rusty Russell
2007-07-23 11:13 ` Christian Borntraeger
2007-07-24 3:02 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46937791.2000706@de.ibm.com \
--to=mp3@de.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.