On Mon, 27 Feb 2012 13:49:17 +0100 Paolo Bonzini <pbonz...@redhat.com> wrote:
> On 02/27/2012 01:12 PM, Luiz Capitulino wrote: > > > If I didn't make any mistake in the code I'm just enforcing that when > > > you specify "incremental" you also need a new image. > > > There are still other valid cases where they are optional. > > > > Which operation will be performed if 'incremental' is not passed? If > > it's passed, which operation will be performed if 'new_image_file' is not? > > There are four cases: > > 1) incremental=false, new_image_file not passed: > right now fail; in the future: > - create an image on dest with no backing file; > - writes will be mirrored to current_image_file and dest > - start streaming from current_image_file to dest > > 2) incremental=false, new_image_file passed: > right now fail; in the future: > - create an image on dest with no backing file; > - live-snapshot based on current_image_file to new_image_file; > - writes will be mirrored to new_image_file and dest > - start streaming from current_image_file to dest > > > 3) incremental=true, new_image_file not passed: > - error > > 4) incremental=true, new_image_file passed: > - no images will be created > - writes will be mirrored to new_image_file and dest IMHO, this is asking for two commands, where cases 1 & 2 is one of them and cases 3 & 4 is the other one. Note how 'incremental' goes away and 'new_image_file' really becomes an optional.