From: Laurent Vivier <Laurent.Vivier@bull.net>
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 17:13:03 +0100 [thread overview]
Message-ID: <1197043983.4521.8.camel@frecb07144> (raw)
In-Reply-To: <47596E0C.6050602@codemonkey.ws>
[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]
Le vendredi 07 décembre 2007 à 10:00 -0600, Anthony Liguori a écrit :
> 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.
Yes, I know, but I don't want to rewrite all block-raw.c just to change
the granularity of the I/O access. It is the best solution I found, if
you have some better ideas (and I know you have lot of good ideas), I
take them.
Regards,
Laurent
--
------------- Laurent.Vivier@bull.net --------------
"Any sufficiently advanced technology is
indistinguishable from magic." - Arthur C. Clarke
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-12-07 16:13 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
2007-12-07 16:13 ` Laurent Vivier [this message]
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=1197043983.4521.8.camel@frecb07144 \
--to=laurent.vivier@bull.net \
--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).