On 04/23/2015 05:55 PM, Stefan Hajnoczi wrote: > On Wed, Apr 22, 2015 at 05:28:01PM +0800, Wen Congyang wrote: >> On 04/22/2015 05:18 PM, Stefan Hajnoczi wrote: >>> On Tue, Apr 21, 2015 at 05:28:01PM +0200, Paolo Bonzini wrote: >>>> On 21/04/2015 03:25, Wen Congyang wrote: >>>>>>> Please do not introduce "<name>+colo" block drivers. This approach is >>>>>>> invasive and makes block replication specific to only a few block >>>>>>> drivers, e.g. NBD or qcow2. >>>>> NBD is used to connect to secondary qemu, so it must be used. But the >>>>> primary >>>>> qemu uses quorum, so the primary disk can be any format. >>>>> The secondary disk is nbd target, and it can also be any format. The cache >>>>> disk(active disk/hidden disk) is an empty disk, and it is created before >>>>> run >>>>> COLO. The cache disk format is qcow2 now. In theory, it can be ant format >>>>> which >>>>> supports backing file. But the driver should be updated to support colo >>>>> mode. >>>>> >>>>>> A cleaner approach is a QMP command or -drive options that work for any >>>>>> BlockDriverState. >>>>> >>>>> OK, I will add a new drive option to avoid use "<name>+colo". >>>> >>>> Actually I liked the "foo+colo" names. >>>> >>>> These are just internal details of the implementations and the >>>> primary/secondary disks actually can be any format. >>>> >>>> Stefan, what was your worry with the +colo block drivers? >>> >>> Why does NBD need to know about COLO? It should be possible to use >>> iSCSI or other protocols too. >> >> Hmm, if you want to use iSCSI or other protocols, you should update the >> driver >> to implement block replication's control interface. >> >> Currently, we only support nbd now. > > I took a quick look at the NBD patches in this series, it looks like > they are a hacky way to make quorum dynamically reconfigurable. > > In other words, what you really need is a way to enable/disable a quorum > child or even add/remove children at run-time. > > NBD is not the right place to implement that. Add APIs to quorum so > COLO code can use them. > > Or maybe I'm misinterpreting the patches, I only took a quick look...
Hmm, if we can enable/disable or add/remove a child at run-time, it is another choice. Thanks Wen Congyang > > Stefan >