On 08/02/2013 03:02 AM, Xu Wang wrote: > From: Xu Wang > > Backing file loop should be checked before calling change_backing_ > file(). If loop appeared, this calling should be stopped and an Breaking a function name across a line break is awkward. > error was printed. s/was // > > Signed-off-by: Xu Wang > --- > block.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > > + /* Check if loop exists in backing files chain after changed */ s/changed/change/ But isn't that a bit late? Don't you want to check that a backing loop will not be created, prior to making the change? > + if (bdrv_backing_file_loop_check(bs->filename, > + bs->drv ? bs->drv->format_name : NULL, > + backing_file, backing_fmt)) { > + return -EIO; > + } > + > if (drv->bdrv_change_backing_file != NULL) { > ret = drv->bdrv_change_backing_file(bs, backing_file, backing_fmt); > } else { > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org