[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] Real SCSI device passthrough (v3)
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] Real SCSI device passthrough (v3) |
Date: |
Fri, 07 Dec 2007 17:13:03 +0100 |
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
--
------------- address@hidden --------------
"Any sufficiently advanced technology is
indistinguishable from magic." - Arthur C. Clarke
signature.asc
Description: Ceci est une partie de message numériquement signée
Re: [Qemu-devel] [PATCH 0/2] Real SCSI device passthrough, Thiemo Seufer, 2007/12/09