From nobody Sun May 19 11:31:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1690282641; cv=none; d=zohomail.com; s=zohoarc; b=JOZaD/W46By6JNvg5uIUAAIvIHVzMrY59y9DueGVsyqam//A+fAEZQcwuMd8RJAhFrtMpnLRHPeOkqPsyKohSwOsAvoOHVLvrGcEKqRLQWB/98oOCaVRoQe0cGhhpDi7jF/AOEveYgLku2fcFnnsTLNppssMoIiKDSpLDHibiYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690282641; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=S6adrxO1euIeAIGWYCITsUviI9QWWawSuJ6WXuE5nIM=; b=jm3SizysQ0RNhOfopqVnvIF6pqo/IWcqwIz73RBcG3838ZKWH9oHIntIujtu+daSc2te/12eMFpplLI4VK2rZwXERe9p8uRMzz+pjMsE496CUtZAUJDFBzEHym/dc+oOAnAwZbSCSLuMzrQTbr8HOAJeKNOHELt9jJFajFIolFE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1690282641016846.0770235624822; Tue, 25 Jul 2023 03:57:21 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-640-3dnfdLdvO52ew8bIw7nxfg-1; Tue, 25 Jul 2023 06:57:16 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9788029AA39B; Tue, 25 Jul 2023 10:57:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15D9340C206F; Tue, 25 Jul 2023 10:57:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8D83C1946589; Tue, 25 Jul 2023 10:57:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9CDBD1946587 for ; Tue, 25 Jul 2023 10:57:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4142440C2070; Tue, 25 Jul 2023 10:57:10 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3E4340C206F for ; Tue, 25 Jul 2023 10:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690282640; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=S6adrxO1euIeAIGWYCITsUviI9QWWawSuJ6WXuE5nIM=; b=Uw/myJMLXW9NScOl25MlvHAcNRR5Q4WCw2+7Bngaf5VlNHmkfVaxpsuvdtXQTT7LfxL+ja z1hipeEg3Y8lVHhkmJXdLIeLvBjE/qA4EaYGQFWkUQ6ExQAcUOwQfADGmAZuyvoc3SvALO OcOJyPNfRvY/dcqw8HdckjbQqtGT9H8= X-MC-Unique: 3dnfdLdvO52ew8bIw7nxfg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] util: file: Mark 'BeeGFS' as shared filesystem Date: Tue, 25 Jul 2023 12:57:08 +0200 Message-ID: <0a2abb99d09a2fb7ea5f179e9d50c941270755c4.1690282628.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1690282641712100001 Content-Type: text/plain; charset="utf-8" BeeGFS is a shared/distributed filesystem: https://doc.beegfs.io/latest/overview/overview.html Mark it as shared based on it's magic number: https://git.beegfs.io/pub/v7/-/blob/master/client_module/source/filesystem/= FhgfsOpsSuper.h#L14 Closes: https://gitlab.com/libvirt/libvirt/-/issues/508 Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- src/util/virfile.c | 6 +++++- src/util/virfile.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 7c44a2a963..2984e2ead2 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3382,6 +3382,8 @@ virFileRemoveLastComponent(char *path) # endif # define VIR_ACFS_MAGIC 0x61636673 +/* https://git.beegfs.io/pub/v7/-/blob/master/client_module/source/filesys= tem/FhgfsOpsSuper.h#L14 */ +# define VIR_BEEGFS_MAGIC 0x19830326 /* formerly fhgfs */ # define PROC_MOUNTS "/proc/mounts" @@ -3469,6 +3471,7 @@ static const struct virFileSharedFsData virFileShared= Fs[] =3D { { .fstype =3D VIR_FILE_SHFS_CEPH, .magic =3D CEPH_SUPER_MAGIC }, { .fstype =3D VIR_FILE_SHFS_GPFS, .magic =3D GPFS_SUPER_MAGIC }, { .fstype =3D VIR_FILE_SHFS_ACFS, .magic =3D VIR_ACFS_MAGIC }, + { .fstype =3D VIR_FILE_SHFS_BEEGFS, .magic =3D VIR_BEEGFS_MAGIC }, }; @@ -3719,7 +3722,8 @@ int virFileIsSharedFS(const char *path) VIR_FILE_SHFS_GPFS| VIR_FILE_SHFS_QB | VIR_FILE_SHFS_ACFS | - VIR_FILE_SHFS_GLUSTERFS); + VIR_FILE_SHFS_GLUSTERFS | + VIR_FILE_SHFS_BEEGFS); } diff --git a/src/util/virfile.h b/src/util/virfile.h index b75a7cc53b..60bb1d64e7 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -226,6 +226,7 @@ enum { VIR_FILE_SHFS_QB =3D (1 << 8), /* Quobyte shared filesystem */ VIR_FILE_SHFS_ACFS =3D (1 << 9), /* Oracle ASM Cluster File System */ VIR_FILE_SHFS_GLUSTERFS =3D (1 << 10), /* gluster's FUSE-based client = */ + VIR_FILE_SHFS_BEEGFS =3D (1 << 11), /* BeeGFS/fhGFS */ }; int virFileIsSharedFSType(const char *path, unsigned int fstypes) ATTRIBUT= E_NONNULL(1); --=20 2.41.0