From nobody Sun May 5 13:16:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1494249951779148.6109408445526; Mon, 8 May 2017 06:25:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 69C373DBC0; Mon, 8 May 2017 13:25:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88A2F116D81; Mon, 8 May 2017 13:25:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E6A575EC67; Mon, 8 May 2017 13:25:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v47KWanb029695 for ; Sun, 7 May 2017 16:32:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9B451808C1; Sun, 7 May 2017 20:32:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92F447F8FD for ; Sun, 7 May 2017 20:32:34 +0000 (UTC) Received: from ascension.private.dragonsdawn.net (home.dragonsdawn.net [50.199.12.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 973B98553F for ; Sun, 7 May 2017 20:32:33 +0000 (UTC) Received: from hurricane.ee.washington.edu ([::ffff:10.1.10.165]) (AUTH: PLAIN gordon, TLS: TLS1.2, 128bits, ECDHE_RSA_AES_128_GCM_SHA256) by ascension.private.dragonsdawn.net with ESMTPSA; Sun, 07 May 2017 13:27:30 -0700 id 000000000002004D.00000000590F8332.00005A50 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 69C373DBC0 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=dragonsdawn.net Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 69C373DBC0 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 973B98553F Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=dragonsdawn.net Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=gordon@dragonsdawn.net DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 973B98553F To: libvir-list@redhat.com From: Gordon Messmer Message-ID: <1ae45180-4c89-105f-1b8e-d502f02ab14b@dragonsdawn.net> Date: Sun, 7 May 2017 13:27:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 Content-Language: en-US X-Greylist: Delayed for 00:05:01 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sun, 07 May 2017 20:32:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sun, 07 May 2017 20:32:33 +0000 (UTC) for IP:'50.199.12.33' DOMAIN:'home.dragonsdawn.net' HELO:'ascension.private.dragonsdawn.net' FROM:'gordon@dragonsdawn.net' RCPT:'' X-RedHat-Spam-Score: 0.799 (BAYES_50, RP_MATCHES_RCVD) 50.199.12.33 home.dragonsdawn.net 50.199.12.33 home.dragonsdawn.net X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Mon, 08 May 2017 09:25:40 -0400 Subject: [libvirt] [PATCH] Add "io" option to virsh attach-disk sub-command. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 08 May 2017 13:25:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8"; format="flowed" --- tools/virsh-domain.c | 14 +++++++++++--- tools/virsh.pod | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 0d19d0e..d2a2a05 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -267,6 +267,10 @@ static const vshCmdOptDef opts_attach_disk[] =3D { .type =3D VSH_OT_STRING, .help =3D N_("cache mode of disk device") }, + {.name =3D "io", + .type =3D VSH_OT_STRING, + .help =3D N_("io mode of disk device") + }, {.name =3D "type", .type =3D VSH_OT_STRING, .help =3D N_("target device type") @@ -504,8 +508,9 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) virDomainPtr dom =3D NULL; const char *source =3D NULL, *target =3D NULL, *driver =3D NULL, *subdriver =3D NULL, *type =3D NULL, *mode =3D NULL, - *iothread =3D NULL, *cache =3D NULL, *serial =3D NULL, - *straddr =3D NULL, *wwn =3D NULL, *targetbus =3D NULL; + *iothread =3D NULL, *cache =3D NULL, *io =3D NULL, + *serial =3D NULL, *straddr =3D NULL, *wwn =3D NULL, + *targetbus =3D NULL; struct DiskAddress diskAddr; bool isFile =3D false, functionReturn =3D false; int ret; @@ -537,6 +542,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) vshCommandOptStringReq(ctl, cmd, "mode", &mode) < 0 || vshCommandOptStringReq(ctl, cmd, "iothread", &iothread) < 0 || vshCommandOptStringReq(ctl, cmd, "cache", &cache) < 0 || + vshCommandOptStringReq(ctl, cmd, "io", &io) < 0 || vshCommandOptStringReq(ctl, cmd, "serial", &serial) < 0 || vshCommandOptStringReq(ctl, cmd, "wwn", &wwn) < 0 || vshCommandOptStringReq(ctl, cmd, "address", &straddr) < 0 || @@ -579,7 +585,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) virBufferAddLit(&buf, ">\n"); virBufferAdjustIndent(&buf, 2); - if (driver || subdriver || iothread || cache) { + if (driver || subdriver || iothread || cache || io) { virBufferAddLit(&buf, "\n"); } diff --git a/tools/virsh.pod b/tools/virsh.pod index cd1f25f..9656411 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2860,6 +2860,8 @@ I can specify the two specific mode=20 I or I. I can indicate the type of source (block|file) I can be one of "default", "none", "writethrough", "writeback", "directsync" or "unsafe". +I io is "threads", or "native" and selects between pthread based disk +I/O and native Linux AIO. I is the number within the range of domain IOThreads to which this disk may be attached (QEMU only). I is the serial of disk device. I is the wwn of disk device. --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list