Il 26/11/2013 05:05, Fam Zheng ha scritto: > + if (backing_bs && *backing_bs != '\0') { > + bs->backing_hd = bdrv_find(backing_bs); > + if (!bs->backing_hd) { > + error_setg(errp, "Backing device not found: %s", backing_bs); > + return -ENOENT; > + } > + bdrv_ref(bs->backing_hd); > + assert(!bs->backing_blocker); > + error_setg(&bs->backing_blocker, > + "device is used as backing hd of '%s'", > + bs->device_name); > + bdrv_op_block_all(bs->backing_hd, bs->backing_blocker);
Why should this blocker only apply to the "named backing file" case, and not to all backing files? Paolo > + pstrcpy(bs->backing_file, sizeof(bs->backing_file), > + bs->backing_hd->filename); > + pstrcpy(bs->backing_format, sizeof(bs->backing_format), > + bs->backing_hd->drv->format_name); > + }