From nobody Tue May 7 16:34:29 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.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559048362; cv=none; d=zoho.com; s=zohoarc; b=DH6qUSMt+kSOWM6gM0rU4hgd2n5fQpHdRcFdHD+9KsJcFUwKVU5gTAUxN+IVdrk5twTLXjP3AXbO+SjNnsbzRC57X56wVtg8WBIJ+4wHYBhYiTw5GkqT/KgcS+CvDkiS2CYyBQHh+T8fIeujG9lO1jHc2GZD/qobYA/WQd5jiEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559048362; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=xwIdTkMkOxNc0wCzVpVrFSI+i3qixtYE7W8kX+srMXI=; b=C4Ri7j5g06q7Ou5BPzaOTd/hMXht+uE5z6EKivo+nzJw07Pt11UgnjVNp082Z3iuqlTyJhoAF1XiFN3bRBh/WiUPayvtzflzfJXXktcBMvFO7w6FaZAFXqZv7yz0E59t69a/CYGSV45Y4UQX1Xcxb8MhD+ZblyDzfiKI8zv2xDM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1559048362076811.568840956969; Tue, 28 May 2019 05:59:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5340181E08; Tue, 28 May 2019 12:58:58 +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 2B10A67174; Tue, 28 May 2019 12:58:57 +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 D2C0A1806B16; Tue, 28 May 2019 12:58:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4SCwmo8017545 for ; Tue, 28 May 2019 08:58:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 202E6512F3; Tue, 28 May 2019 12:58:48 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 186116A24E for ; Tue, 28 May 2019 12:58:45 +0000 (UTC) Received: from mail-ed1-f98.google.com (mail-ed1-f98.google.com [209.85.208.98]) (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 E4DDEC0AD290 for ; Tue, 28 May 2019 12:58:25 +0000 (UTC) Received: by mail-ed1-f98.google.com with SMTP id n17so31696798edb.0 for ; Tue, 28 May 2019 05:58:25 -0700 (PDT) Received: from smtp.corp.quobyte.com (business-90-187-78-141.pool2.vodafone-ip.de. [90.187.78.141]) by smtp-relay.gmail.com with ESMTPS id v16sm303795edm.29.2019.05.28.05.58.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2019 05:58:24 -0700 (PDT) Received: from kaisers.corp.quobyte.com (unknown [172.18.1.13]) by smtp.corp.quobyte.com (Postfix) with SMTP id D91371A0372C2; Tue, 28 May 2019 12:58:22 +0000 (UTC) Received: by kaisers.corp.quobyte.com (sSMTP sendmail emulation); Tue, 28 May 2019 14:58:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quobyte.com; s=google; h=from:to:cc:subject:date:message-id; bh=p/iD9gUU/Fewkbie89q5t1Kq226is3lckYW4e/JWo4M=; b=Rkopkqf4OkGmXiHIgbJMgtbrVgc9qFZtdb263Y8qGjvlyt7AULSNnIETfg8v90xFLj SQwHoqDTZbEQ4yRa9Bcj36jCGeEpKc1W5j3TdSMCglq6ZFi75J/Vx98i2/VQPRJ+GhgV AtgUsFtASaLFTN0owrnkz3dnQTDI0zRmGm8gA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=p/iD9gUU/Fewkbie89q5t1Kq226is3lckYW4e/JWo4M=; b=mloy8W2X7fseqkgSut1yCrrNn9eIc0NCdYAb+/0UGW5vDpiZPMRw0TRijMLvyVbs54 hjeyq9+1HuE+nbEFb4yCVLznIl5w/+ulxIMUfJDH6qrx2LuXIoTGFDj3WoJCtbxTynsH /m5yjVNWxrTOpynmUQ16dhMMqvmA/bPeCtLc7Lge8makMZDmZQCGM7ZwJLdbLgg9WMjC WWKdtz59p1s/9cGraAxyLBGV6RTUBKGCQswYurhSuD8BYWTHI02pW8YjH3OQP3DZUha5 5o/g4La8aTucO+pLcfuKhjVueJU/C94j8aDppSwOkhqWezA46TOXxfI3zgLElezvk7/j hyJg== X-Gm-Message-State: APjAAAVO0qv2vDjwdxa7V3+WThWidB8TPQkGdD9aLAJI3xhK2bHbsnPi GbFX42EH8Bzx8dgDsRX8oCJ3KsWwNRiJPcZElejjdn6edz0vxQ== X-Google-Smtp-Source: APXvYqz0o3gFK8tKdn7JjQOJ2iTxjfXTTgZms+DWPANsXI5QLPRlC5n7MTCRFjLCzUtxeSpRbw8KTgPV6RpX X-Received: by 2002:a17:906:25c5:: with SMTP id n5mr70721642ejb.110.1559048304387; Tue, 28 May 2019 05:58:24 -0700 (PDT) X-Relaying-Domain: quobyte.com From: Silvan Kaiser To: libvir-list@redhat.com Date: Tue, 28 May 2019 14:55:29 +0200 Message-Id: <20190528125529.960-1-silvan@quobyte.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 28 May 2019 12:58:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 28 May 2019 12:58:26 +0000 (UTC) for IP:'209.85.208.98' DOMAIN:'mail-ed1-f98.google.com' HELO:'mail-ed1-f98.google.com' FROM:'silvan@quobyte.com' RCPT:'' X-RedHat-Spam-Score: -0.109 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE) 209.85.208.98 mail-ed1-f98.google.com 209.85.208.98 mail-ed1-f98.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Silvan Kaiser Subject: [libvirt] [PATCH] virfile: adds quobyte as a shared fs 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 28 May 2019 12:59:16 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Adds detection of a Quobyte shared file system for live migration. Signed-off-by: Silvan Kaiser --- src/util/virfile.c | 13 ++++++++++++- src/util/virfile.h | 1 + tests/virfiledata/mounts3.txt | 1 + tests/virfilemock.c | 3 +++ tests/virfiletest.c | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index f7415cf633..a46b8792f6 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3434,6 +3434,9 @@ int virFilePrintf(FILE *fp, const char *msg, ...) # ifndef GPFS_SUPER_MAGIC # define GPFS_SUPER_MAGIC 0x47504653 # endif +# ifndef QB_MAGIC +# define QB_MAGIC 0x51626d6e +# endif =20 # define PROC_MOUNTS "/proc/mounts" =20 @@ -3490,6 +3493,10 @@ virFileIsSharedFixFUSE(const char *path, VIR_DEBUG("Found gluster FUSE mountpoint=3D%s for path=3D%s. " "Fixing shared FS type", mntDir, canonPath); *f_type =3D GFS2_MAGIC; + } else if (STREQ_NULLABLE(mntType, "fuse.quobyte")) { + VIR_DEBUG("Found Quobyte FUSE mountpoint=3D%s for path=3D%s. " + "Fixing shared FS type", mntDir, canonPath); + *f_type =3D QB_MAGIC; } =20 ret =3D 0; @@ -3582,6 +3589,9 @@ virFileIsSharedFSType(const char *path, if ((fstypes & VIR_FILE_SHFS_GPFS) && (f_type =3D=3D GPFS_SUPER_MAGIC)) return 1; + if ((fstypes & VIR_FILE_SHFS_QB) && + (f_type =3D=3D QB_MAGIC)) + return 1; =20 return 0; } @@ -3771,7 +3781,8 @@ int virFileIsSharedFS(const char *path) VIR_FILE_SHFS_SMB | VIR_FILE_SHFS_CIFS | VIR_FILE_SHFS_CEPH | - VIR_FILE_SHFS_GPFS); + VIR_FILE_SHFS_GPFS| + VIR_FILE_SHFS_QB); } =20 =20 diff --git a/src/util/virfile.h b/src/util/virfile.h index 641960e2ca..e06855ea86 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -212,6 +212,7 @@ enum { VIR_FILE_SHFS_CIFS =3D (1 << 5), VIR_FILE_SHFS_CEPH =3D (1 << 6), VIR_FILE_SHFS_GPFS =3D (1 << 7), + VIR_FILE_SHFS_QB =3D (1 << 8), }; =20 int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL= (1); diff --git a/tests/virfiledata/mounts3.txt b/tests/virfiledata/mounts3.txt index 4377e5d471..b91804a4e4 100644 --- a/tests/virfiledata/mounts3.txt +++ b/tests/virfiledata/mounts3.txt @@ -36,3 +36,4 @@ root@host:/tmp/mkdir /gluster/sshfs fuse.sshfs rw 0 0 192.168.0.1:/ceph/data /ceph ceph rw,noatime,name=3Dcephfs,secret=3D,acl,wsize=3D16777216 0 0 192.168.0.1,192.168.0.2,192.168.0.3:/ceph/data2 /ceph/multi ceph rw,noatim= e,name=3Dcephfs,secret=3D,acl,wsize=3D16777216 0 0 gpfs_data /gpfs/data gpfs rw,relatime 0 0 +quobyte@192.168.0.1/data /quobyte fuse.quobyte rw,nosuid,nodev,noatime,use= r_id=3D0,group_id=3D0,allow_other 0 0 diff --git a/tests/virfilemock.c b/tests/virfilemock.c index 106032f857..54c57d417b 100644 --- a/tests/virfilemock.c +++ b/tests/virfilemock.c @@ -92,6 +92,9 @@ setmntent(const char *filename, const char *type) #ifndef GPFS_SUPER_MAGIC # define GPFS_SUPER_MAGIC 0x47504653 #endif +# ifndef QB_MAGIC +# define QB_MAGIC 0x51626d6e +# endif =20 =20 static int diff --git a/tests/virfiletest.c b/tests/virfiletest.c index e2bd4953ed..aa4c3435e5 100644 --- a/tests/virfiletest.c +++ b/tests/virfiletest.c @@ -458,6 +458,7 @@ mymain(void) DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/ceph/file", true); DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/ceph/multi/file", true= ); DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/gpfs/data", true); + DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/quobyte", true); =20 return ret !=3D 0 ? EXIT_FAILURE : EXIT_SUCCESS; } --=20 2.16.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list