qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] Real SCSI device passthrough (v3)
Date: Fri, 07 Dec 2007 10:00:12 -0600	[thread overview]
Message-ID: <47596E0C.6050602@codemonkey.ws> (raw)
In-Reply-To: <1197041399.4521.2.camel@frecb07144>

Laurent Vivier wrote:
> Le vendredi 07 décembre 2007 à 15:22 +0000, Paul Brook a écrit :
>   
>> On Friday 07 December 2007, Laurent Vivier wrote:
>>     
>>> -    acb->aiocb.aio_nbytes = nb_sectors * 512;
>>> +    if (nb_sectors < 0)
>>> +        acb->aiocb.aio_nbytes = -nb_sectors;
>>> +    else
>>> +        acb->aiocb.aio_nbytes = nb_sectors * 512;
>>>       
>> Ugly hacks like this need at least a decent comment.
>>     
>
> Yes, you're right but I'm always wondering if it is the good way to do
> what I want: read a number of bytes instead of a number of sectors.
> Perhaps I should define a new function in the qemu AIO interface ?
>   

I think the crux of the problem is that you're using the BlockDriver API 
for something that isn't actually a block driver.

Regards,

Anthony Liguori

> There is another ugly hack, did you find it ? ;-)
>
> Laurent
>   

  reply	other threads:[~2007-12-07 16:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 14:23 [Qemu-devel] [PATCH 0/2] Real SCSI device passthrough Laurent Vivier
2007-12-07 14:23 ` [Qemu-devel] [PATCH 1/2] SCSI cleanup Laurent Vivier
2007-12-07 14:23   ` [Qemu-devel] [PATCH 2/2] Real SCSI device passthrough (v3) Laurent Vivier
2007-12-07 15:22     ` Paul Brook
2007-12-07 15:29       ` Laurent Vivier
2007-12-07 16:00         ` Anthony Liguori [this message]
2007-12-07 16:13           ` Laurent Vivier
2007-12-09 23:16 ` [Qemu-devel] [PATCH 0/2] Real SCSI device passthrough Thiemo Seufer

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=47596E0C.6050602@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).