From nobody Sat Apr 11 23:02:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1773061895; cv=none; d=zohomail.com; s=zohoarc; b=B04grDb2ipFGJU5kPQv0jjWEe3bEqu9hqpFUZJvmASFZhpR7VUazKVlz4UarUdnMak9ZN727k4mR9gkI3TuHK79x2qqw/OXvuPVGcTGXi2Q9+d6JCgqX+5zb8/iZAOwl0L6uRmavpY93eBHNulgCvwpm/qssHjCpSL03E8YL3DI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773061895; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sb0wOxDlYw2qEo06xo1VesM/lciM5QCiUq/6uJ4HNtk=; b=GZSh5heWgqoWfutKDAXLSlN6TfTXo2J3QHYn/1lLNlR3wnSfyD/7F/guQehj9G3nUq9/UK92IpN+ncSfrLswQ0PHo/mSde3fTs/D4+W5hEJ55a7gBL2e4+NNptbUa+ly8ag72Dkp6iC0ZPYeGySd0miFir3UkGIVVbplExVudfU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773061895814997.7786851150594; Mon, 9 Mar 2026 06:11:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vzaLn-0007NN-7J; Mon, 09 Mar 2026 09:08:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzaLd-0007FP-7H for qemu-devel@nongnu.org; Mon, 09 Mar 2026 09:08:39 -0400 Received: from smtp-out1.suse.de ([195.135.223.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vzaLb-0008Dl-B9 for qemu-devel@nongnu.org; Mon, 09 Mar 2026 09:08:36 -0400 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 79CF14D21E; Mon, 9 Mar 2026 13:08:05 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4C14C3EEF2; Mon, 9 Mar 2026 13:08:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MPuiBDTGrmlJcAAAD6G6ig (envelope-from ); Mon, 09 Mar 2026 13:08:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773061685; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sb0wOxDlYw2qEo06xo1VesM/lciM5QCiUq/6uJ4HNtk=; b=ByvzfRizL7ocLytJqpjURgxjg1S9RCHT27jZmXu24CQwsEBnCnoO8ydFBwISPr/Ol9n5wL V72F80u2jXCM+s5qQsq0pCJSeoX5SQq6zh8wq3aABzvmNArZh7FRh+/zxnQwbp6Wbo187Z VvTpvQyNw1y7tIuNi794a7sRJZwViqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773061685; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sb0wOxDlYw2qEo06xo1VesM/lciM5QCiUq/6uJ4HNtk=; b=/Nx2YnA9YNh9pRGoxH/Qnaqlt5ouk4MhYnLdjdA4rMVbTIQ4mmLuvD2vhZw32Hh5K+hWbc 4EhAJXxO15VpLkAw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ByvzfRiz; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="/Nx2YnA9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773061685; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sb0wOxDlYw2qEo06xo1VesM/lciM5QCiUq/6uJ4HNtk=; b=ByvzfRizL7ocLytJqpjURgxjg1S9RCHT27jZmXu24CQwsEBnCnoO8ydFBwISPr/Ol9n5wL V72F80u2jXCM+s5qQsq0pCJSeoX5SQq6zh8wq3aABzvmNArZh7FRh+/zxnQwbp6Wbo187Z VvTpvQyNw1y7tIuNi794a7sRJZwViqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773061685; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sb0wOxDlYw2qEo06xo1VesM/lciM5QCiUq/6uJ4HNtk=; b=/Nx2YnA9YNh9pRGoxH/Qnaqlt5ouk4MhYnLdjdA4rMVbTIQ4mmLuvD2vhZw32Hh5K+hWbc 4EhAJXxO15VpLkAw== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Lukas Straub Subject: [PULL 18/22] qemu-colo.rst: Simplify the block replication setup Date: Mon, 9 Mar 2026 10:07:23 -0300 Message-ID: <20260309130730.20526-19-farosas@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260309130730.20526-1-farosas@suse.de> References: <20260309130730.20526-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_RATELIMITED(0.00)[rspamd.com]; FREEMAIL_CC(0.00)[redhat.com,web.de]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:mid,suse.de:email]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DKIM_TRACE(0.00)[suse.de:+]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVRCPT(0.00)[web.de] X-Rspamd-Queue-Id: 79CF14D21E X-Spam-Score: -3.01 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.223.130; envelope-from=farosas@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1773061896034158500 Content-Type: text/plain; charset="utf-8" From: Lukas Straub On the primary side we don't actually need the replication block driver, since it only passes trough all IO. So simplify the setup and also use 'blockdev-add' instead of 'human-monitor-command'. This is how my clients use colo in production. Reviewed-by: Fabiano Rosas Signed-off-by: Lukas Straub Link: https://lore.kernel.org/qemu-devel/20260302-colo_unit_test_multifd-v1= 1-17-d653fb3b1d80@web.de Signed-off-by: Fabiano Rosas --- docs/system/qemu-colo.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/system/qemu-colo.rst b/docs/system/qemu-colo.rst index 671c56448e..a8f608b95e 100644 --- a/docs/system/qemu-colo.rst +++ b/docs/system/qemu-colo.rst @@ -242,8 +242,8 @@ Note: **4.** On Primary VM's QEMU monitor, issue command:: =20 {"execute":"qmp_capabilities"} - {"execute": "human-monitor-command", "arguments": {"command-line": "dr= ive_add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file= .host=3D127.0.0.2,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplic= ation0"}} - {"execute": "x-blockdev-change", "arguments":{"parent": "colo-disk0", = "node": "replication0" } } + {"execute": "blockdev-add", "arguments": {"driver": "nbd", "node-name"= : "nbd0", "server": {"type": "inet", "host": "127.0.0.2", "port": "9999"}, = "export": "parent0", "detect-zeroes": "on"} } + {"execute": "x-blockdev-change", "arguments":{"parent": "colo-disk0", = "node": "nbd0" } } {"execute": "migrate-set-capabilities", "arguments": {"capabilities": = [ {"capability": "x-colo", "state": true } ] } } {"execute": "migrate", "arguments": {"uri": "tcp:127.0.0.2:9998" } } =20 @@ -271,7 +271,7 @@ Primary Failover The Secondary died, resume on the Primary:: =20 {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0",= "child": "children.1"} } - {"execute": "human-monitor-command", "arguments":{ "command-line": "dr= ive_del replication0" } } + {"execute": "blockdev-del", "arguments": {"node-name": "nbd0"} } {"execute": "object-del", "arguments":{ "id": "comp0" } } {"execute": "object-del", "arguments":{ "id": "iothread1" } } {"execute": "object-del", "arguments":{ "id": "m0" } } @@ -311,8 +311,8 @@ Wait until disk is synced, then:: {"execute": "stop"} {"execute": "block-job-cancel", "arguments":{ "device": "resync"} } =20 - {"execute": "human-monitor-command", "arguments":{ "command-line": "dr= ive_add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file= .host=3D127.0.0.2,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplic= ation0"}} - {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0",= "node": "replication0" } } + {"execute": "blockdev-add", "arguments": {"driver": "nbd", "node-name"= : "nbd0", "server": {"type": "inet", "host": "127.0.0.2", "port": "9999"}, = "export": "parent0", "detect-zeroes": "on"} } + {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0",= "node": "nbd0" } } =20 {"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "= id": "m0", "netdev": "hn0", "queue": "tx", "outdev": "mirror0" } } {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector= ", "id": "redire0", "netdev": "hn0", "queue": "rx", "indev": "compare_out" = } } @@ -343,8 +343,8 @@ Wait until disk is synced, then:: {"execute": "stop"} {"execute": "block-job-cancel", "arguments":{ "device": "resync" } } =20 - {"execute": "human-monitor-command", "arguments":{ "command-line": "dr= ive_add -n buddy driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file= .host=3D127.0.0.1,file.port=3D9999,file.export=3Dparent0,node-name=3Dreplic= ation0"}} - {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0",= "node": "replication0" } } + {"execute": "blockdev-add", "arguments": {"driver": "nbd", "node-name"= : "nbd0", "server": {"type": "inet", "host": "127.0.0.1", "port": "9999"}, = "export": "parent0", "detect-zeroes": "on"} } + {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0",= "node": "nbd0" } } =20 {"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "= id": "m0", "insert": "before", "position": "id=3Drew0", "netdev": "hn0", "q= ueue": "tx", "outdev": "mirror0" } } {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector= ", "id": "redire0", "insert": "before", "position": "id=3Drew0", "netdev": = "hn0", "queue": "rx", "indev": "compare_out" } } --=20 2.51.0