----- Original Message ----- > From: "Luiz Capitulino" <lcapitul...@redhat.com> > To: "Federico Simoncelli" <fsimo...@redhat.com> > Cc: qemu-devel@nongnu.org, mtosa...@redhat.com, pbonz...@redhat.com, > kw...@redhat.com, arm...@redhat.com > Sent: Friday, February 24, 2012 7:17:22 PM > Subject: Re: [PATCH 1/2 v2] Add blkmirror block driver > > On Fri, 24 Feb 2012 16:49:03 +0000 > Federico Simoncelli <fsimo...@redhat.com> wrote: > > > + /* Parse the raw image filename */ > > + filename2 = g_malloc(strlen(filename)+1); > > + escape = 0; > > + for (i = n = 0; i < strlen(filename); i++) { > > + if (!escape && filename[i] == ':') { > > + break; > > + } > > + if (!escape && filename[i] == '\\') { > > + escape = 1; > > + } else { > > + escape = 0; > > + } > > + > > + if (!escape) { > > + filename2[n++] = filename[i]; > > + } > > + } > > + filename2[n] = '\0'; > > You're escaping only the first image name string, is that > intentional?
Yes, it was also documented here by Marcelo: > > diff --git a/docs/blkmirror.txt b/docs/blkmirror.txt > > new file mode 100644 > > index 0000000..cf73f3f > > --- /dev/null > > +++ b/docs/blkmirror.txt > > @@ -0,0 +1,16 @@ > > +Block mirror driver > > +------------------- > > + > > +This driver will mirror writes to two distinct images. > > +It's used internally by live block copy. > > + > > +Format > > +------ > > + > > +blkmirror:/image1.img:/image2.img > > + > > +'\' (backslash) can be used to escape colon processing > > +as a separator, in the first image filename. > > +Backslashes themselves also can be escaped as '\\'. > > + > > + Anyway this format is encapsulated by blockdev-migrate. -- Federico