Jason Wang <jasow...@redhat.com> wrote: > Paolo Bonzini writes: > > On 04/01/2011 08:22 AM, Jason Wang wrote: > > > + > > > + if (drive->bs == NULL) { > > > + return 1; > > > > Is it okay to return 1 here? Have you tested the case when both the > > source and the target drives have no floppy? > > > > Thanks for the reminding, and it could be fixed by put all pre/post callbacks > into the subsections. > > > (The "media_changed == 2" in my sample code was basically a way to save > > the "media present" state of the drive on the source). > > > > Right, but it would make subsection saving be the common case (consider most > of > the vm may just have one floppy but we have two drives). A better solution > maybe: > > 1 Set default_migration_media_changed be 0 for 0.15 and 1 for elder > 2 Unconditiaonlly send subsection when it was 0, and do not send subsection > when > it was 1
If you do this, you are just removing the capability of migrating to older versions. If you need to send a subsection unconditionlly, then just upgrade the version of the device, it is going to give the same result. Later, Juan.