From nobody Sun Feb 8 05:41:12 2026 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.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1545163409461893.9052778133638; Tue, 18 Dec 2018 12:03:29 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27235356F6; Tue, 18 Dec 2018 20:03:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ADF397A5FC; Tue, 18 Dec 2018 20:03:25 +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 EBF3C181B9E7; Tue, 18 Dec 2018 20:03:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wBIK3NIE001816 for ; Tue, 18 Dec 2018 15:03:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7C42C1895F; Tue, 18 Dec 2018 20:03:23 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-117-129.phx2.redhat.com [10.3.117.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3993660C44 for ; Tue, 18 Dec 2018 20:03:23 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Tue, 18 Dec 2018 15:03:16 -0500 Message-Id: <20181218200317.24947-3-jferlan@redhat.com> In-Reply-To: <20181218200317.24947-1-jferlan@redhat.com> References: <20181218200317.24947-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] storage: Add mountOpts to the storage pool mount command line 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: , MIME-Version: 1.0 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 18 Dec 2018 20:03:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add the mountOpts to the generated backend mount command line for the storage pool. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 4 ++++ tests/storagepoolxml2argvdata/pool-netfs-mountopts.argv | 1 + tests/storagepoolxml2argvtest.c | 1 + 3 files changed, 6 insertions(+) create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-mountopts.argv diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index a84ee5b600..6d7c01e425 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -4336,6 +4336,10 @@ virStorageBackendFileSystemMountCmd(const char *cmds= tr, virStorageBackendFileSystemMountCIFSArgs(cmd, src, def); else virStorageBackendFileSystemMountDefaultArgs(cmd, src, def); + + if (def->source.mountOpts) + virCommandAddArgList(cmd, "-o", def->source.mountOpts, NULL); + return cmd; } =20 diff --git a/tests/storagepoolxml2argvdata/pool-netfs-mountopts.argv b/test= s/storagepoolxml2argvdata/pool-netfs-mountopts.argv new file mode 100644 index 0000000000..16d35bc175 --- /dev/null +++ b/tests/storagepoolxml2argvdata/pool-netfs-mountopts.argv @@ -0,0 +1 @@ +mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nodev,nosuid diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtes= t.c index 2f2d40e027..0df97fb390 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -159,6 +159,7 @@ mymain(void) DO_TEST("pool-netfs-auto"); DO_TEST("pool-netfs-gluster"); DO_TEST("pool-netfs-cifs"); + DO_TEST("pool-netfs-mountopts"); DO_TEST_FAIL("pool-scsi"); DO_TEST_FAIL("pool-scsi-type-scsi-host"); DO_TEST_FAIL("pool-scsi-type-fc-host"); --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list