All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	aliguori@us.ibm.com, qemu-devel@nongnu.org,
	stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] [RFC] libqblock draft code v1
Date: Thu, 02 Aug 2012 11:00:13 +0200	[thread overview]
Message-ID: <501A419D.2060307@redhat.com> (raw)
In-Reply-To: <501A3B24.6000203@linux.vnet.ibm.com>

Il 02/08/2012 10:32, Wenchao Xia ha scritto:
>>
>> ssize_t qb_read(struct QBlockState *qbs, void *buf, size_t len,  off_t
>> offset)
>>
>   OK.
> 
>>> +{
>>> +    int ret;
>>> +    BlockDriverState *bs;
>>> +
>>> +    bs = (BlockDriverState *)qbs->bdrvs;
>>> +
>>> +    ret = bdrv_read(bs, start / 512,
>>> +                        buf, len / 512);
>>
>> IIRC there is a constant for 512 somewhere.
>>
>   will include that header.

Also assert that start and len are aligned.

Paolo

      reply	other threads:[~2012-08-02  9:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01  9:09 [Qemu-devel] [PATCH] [RFC] libqblock draft code v1 Wenchao Xia
2012-08-01 10:44 ` Paolo Bonzini
2012-08-02  7:57   ` Wenchao Xia
2012-08-02  8:59     ` Paolo Bonzini
2012-08-02 10:23       ` Stefan Hajnoczi
2012-08-01 12:49 ` Stefan Hajnoczi
2012-08-01 13:25   ` Eric Blake
2012-08-02 10:18     ` Stefan Hajnoczi
2012-08-02 11:11     ` Daniel P. Berrange
2012-08-02 11:13       ` Paolo Bonzini
2012-08-03  7:54         ` Wenchao Xia
2012-08-02  8:18   ` Wenchao Xia
2012-08-02 10:17     ` Stefan Hajnoczi
2012-08-02 11:08       ` Paolo Bonzini
2012-08-01 18:04 ` Blue Swirl
2012-08-02  8:32   ` Wenchao Xia
2012-08-02  9:00     ` Paolo Bonzini [this message]

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=501A419D.2060307@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /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.