Re: [PATCH 02/11] kvm tools: Hold a copy of ops struct inside disk_image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-11-01 at 08:44 +0200, Pekka Enberg wrote:
> On Sun, Oct 30, 2011 at 7:35 PM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
> > This makes passing different ops structures easier since you don't have
> > to keep them somewhere else after initializing disk_image.
> >
> > Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
> 
> Why do we want to do this? Why would you ever want to allocate ops via
> malloc() or on the stack?

It's mostly there to avoid having to either keep ops in a global struct
or to malloc() them, instead - it just holds them as part of disk_image;

It's useful with how we handle read-only ops now, you can see how we use
RO image now (private mmap() with fallback to AIO with no write op).

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux