From patchwork Fri Mar 26 21:29:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167679 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D07FC433DB for ; Fri, 26 Mar 2021 21:31:14 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3629619D3 for ; Fri, 26 Mar 2021 21:31:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3629619D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-425-cjq3DjryP0aAUiP9nvy40Q-1; Fri, 26 Mar 2021 17:31:01 -0400 X-MC-Unique: cjq3DjryP0aAUiP9nvy40Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F7BC814256; Fri, 26 Mar 2021 21:30:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 603261725E; Fri, 26 Mar 2021 21:30:55 +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 305FE4BB7C; Fri, 26 Mar 2021 21:30:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU93Z001679 for ; Fri, 26 Mar 2021 17:30:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 002142026D2D; Fri, 26 Mar 2021 21:30:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EEF972026D6A for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 89C43185A7B4 for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-486-Kbppyf2qMHS2rU0pLQsTkQ-1; Fri, 26 Mar 2021 17:30:00 -0400 X-MC-Unique: Kbppyf2qMHS2rU0pLQsTkQ-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0C3A5AD8D; Fri, 26 Mar 2021 21:29:59 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:38 +0100 Message-Id: <20210326212944.3136-2-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU93Z001679 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 1/7] multipath-tools Makefiles: make pkg-config configurable X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck This is useful for building in a cross-compilation environment. Signed-off-by: Martin Wilck --- Makefile.inc | 6 ++++-- libdmmp/Makefile | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 0542930..f1e2313 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -15,6 +15,8 @@ # Uncomment to disable dmevents polling support # ENABLE_DMEVENTS_POLL = 0 +PKGCONFIG ?= pkg-config + ifeq ($(TOPDIR),) TOPDIR = .. endif @@ -36,8 +38,8 @@ ifndef RUN endif ifndef SYSTEMD - ifeq ($(shell pkg-config --modversion libsystemd >/dev/null 2>&1 && echo 1), 1) - SYSTEMD = $(shell pkg-config --modversion libsystemd | awk '{print $$1}') + ifeq ($(shell $(PKGCONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1) + SYSTEMD = $(shell $(PKGCONFIG) --modversion libsystemd | awk '{print $$1}') else ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1) SYSTEMD = $(shell systemctl --version 2> /dev/null | \ diff --git a/libdmmp/Makefile b/libdmmp/Makefile index 1dd3f34..4175c3f 100644 --- a/libdmmp/Makefile +++ b/libdmmp/Makefile @@ -16,9 +16,9 @@ HEADERS = libdmmp/libdmmp.h OBJS = libdmmp.o libdmmp_mp.o libdmmp_pg.o libdmmp_path.o libdmmp_misc.o CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden -I$(libdmmpdir) -I$(mpathcmddir) \ - $(shell pkg-config --cflags json-c) + $(shell $(PKGCONFIG) --cflags json-c) -LIBDEPS += $(shell pkg-config --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread +LIBDEPS += $(shell $(PKGCONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread all: $(LIBS) doc From patchwork Fri Mar 26 21:29:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167671 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69839C433C1 for ; Fri, 26 Mar 2021 21:30:35 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EFB7E61A24 for ; Fri, 26 Mar 2021 21:30:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFB7E61A24 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-503-JIKu_UvvMq-9VOOGffkdAg-1; Fri, 26 Mar 2021 17:30:31 -0400 X-MC-Unique: JIKu_UvvMq-9VOOGffkdAg-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9513F180FCAD; Fri, 26 Mar 2021 21:30:25 +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 776FD89D07; Fri, 26 Mar 2021 21:30: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 4076A180B450; Fri, 26 Mar 2021 21:30:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU7UT001661 for ; Fri, 26 Mar 2021 17:30:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id B59B710545E4; Fri, 26 Mar 2021 21:30:07 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B146010545CF for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A9FA805B3B for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-450-szL3bEwVN2WBbSfGSmncPA-1; Fri, 26 Mar 2021 17:30:00 -0400 X-MC-Unique: szL3bEwVN2WBbSfGSmncPA-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 52975ADD7; Fri, 26 Mar 2021 21:29:59 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:39 +0100 Message-Id: <20210326212944.3136-3-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU7UT001661 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 2/7] multipath-tools Makefiles: allow building test programs only X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck "make test" builds and runs test programs. For multiarch / cross-compilation environments, it's useful to be able to separate these steps. Signed-off-by: Martin Wilck --- Makefile | 7 +++++-- tests/Makefile | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bddb2bf..c5bedcf 100644 --- a/Makefile +++ b/Makefile @@ -51,8 +51,11 @@ clean: $(BUILDDIRS.clean) install: $(BUILDDIRS:=.install) uninstall: $(BUILDDIRS:=.uninstall) -test: all - $(MAKE) -C tests +test-progs: all + $(MAKE) -C tests progs + +test: test-progs + $(MAKE) -C tests all valgrind-test: all $(MAKE) -C tests valgrind diff --git a/tests/Makefile b/tests/Makefile index 11ca1be..e70c8ed 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -20,6 +20,7 @@ HELPERS := test-lib.o test-log.o .PRECIOUS: $(TESTS:%=%-test) all: $(TESTS:%=%.out) +progs: $(TESTS:%=%-test) lib/libchecktur.so valgrind: $(TESTS:%=%.vgr) # test-specific compiler flags From patchwork Fri Mar 26 21:29:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167669 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01CE2C433E0 for ; Fri, 26 Mar 2021 21:30:32 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 950E661A24 for ; Fri, 26 Mar 2021 21:30:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 950E661A24 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-584-D7fwEk0fNLqkxU4jdiAhWQ-1; Fri, 26 Mar 2021 17:30:28 -0400 X-MC-Unique: D7fwEk0fNLqkxU4jdiAhWQ-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 60D6B83DC24; Fri, 26 Mar 2021 21:30:24 +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 4327789D09; Fri, 26 Mar 2021 21:30:24 +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 13753180B450; Fri, 26 Mar 2021 21:30:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU9JU001696 for ; Fri, 26 Mar 2021 17:30:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8767D1037AD; Fri, 26 Mar 2021 21:30:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 813491037AF for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B66E1803AFD for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-333-yzXyH4T1N6idkiSP-CYanQ-1; Fri, 26 Mar 2021 17:30:01 -0400 X-MC-Unique: yzXyH4T1N6idkiSP-CYanQ-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9BE06ADDD; Fri, 26 Mar 2021 21:29:59 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:40 +0100 Message-Id: <20210326212944.3136-4-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU9JU001696 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 3/7] github workflows: add containerized / multi-arch tests X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Until now, our CI only tested builds on Ubuntu, the default github runner. This commit adds containerized build/test workflows, which can cover a much larger range of distributions and environments. I've distinguished "native" runs, where the architecture is compatible with the architecture of the runners (assumed to be x86_64), and "foreign" runs with different architectures. The former can run "make test" just like in any ordinary environment. To run tests in "foreign arch" environments, I use qemu-user for runtime emulation. That's done with the help of the "multiarch/qemu-user-static" container. Runtime containers for testing need to have the qemu-user-static binary (compiled for x86_64) for their target architecture built in. In theory, we could do the same thing for build containers too, but it would be grossly inefficient. Instead, I've focused on Debian environments for the foreign architectures, relying on Debian's nice multiarch / cross-compilation features. Compilation is run in a dedicated cross-build container, and only the test runs are carried out in the emulation. The set of tests currently includes: native: - Debian Jessie, x86_64/i386 (gcc 4.9, clang 3.5, glibc 2.19) - Debian Buster, x86_64/i386 (gcc 8.3, clang 7.0, glibc 2.28) - Debian Sid, x86_64/i386 (gcc 10.2, clang 11.0, glibc 2.31) - Alpine, x86_64/i386 (gcc 10.2, clang 10.0, musl libc 1.2) - Fedora 34, x86_64 (gcc 11.0, clang 12.0, glibc 2.33) foreign: - Debian Buster, ppc64le/aarch64/s390x This covers a rather broad range of compiler and C library versions and should be fine for some time to come. Note: In theory, it would be possible to just fetch base containers via github actions, and install the dependencies as part of the build procedure. But that would be quite resource-intensive and slow. Therefore I've decided to use pre-built containers. The current container setup fetches containers from my docker hub repository. The containers there (multipath-build-$os-$arch and multipath-run-$os-$arch) come from my "build-multipath" repository (https://github.com/mwilck/build-multipath), and are created via github actions, too. The upload of the built container images to docker hub requires the use of tokens and secrets. I'd considered adding these container definitions and workflows to the multipath-tools repository. We'd just need to create reasonable rules for running the respective workflows. I expect these container images to remain relatively stable; it makes no sense to rebuild the images for every multipath-tools commit. Tell me if you want this in the multipath-tools repo, and if you're ok with hosting the images in my docker hub repo. Signed-off-by: Martin Wilck --- .github/workflows/build-and-unittest.yaml | 4 +- .github/workflows/foreign.yaml | 65 +++++++++++++++++++++++ .github/workflows/native.yaml | 31 +++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/foreign.yaml create mode 100644 .github/workflows/native.yaml diff --git a/.github/workflows/build-and-unittest.yaml b/.github/workflows/build-and-unittest.yaml index 4173576..bf37b13 100644 --- a/.github/workflows/build-and-unittest.yaml +++ b/.github/workflows/build-and-unittest.yaml @@ -1,5 +1,7 @@ name: basic-build-and-ci -on: [push] +on: + push: + branches: [master queue tip] jobs: bionic: runs-on: ubuntu-18.04 diff --git a/.github/workflows/foreign.yaml b/.github/workflows/foreign.yaml new file mode 100644 index 0000000..505a777 --- /dev/null +++ b/.github/workflows/foreign.yaml @@ -0,0 +1,65 @@ +name: compile and unit test on foreign arch +on: + push: + branches: + - master + - queue + - tip + +jobs: + + build: + runs-on: ubuntu-20.04 + strategy: + matrix: + os: [buster] + arch: ['ppc64le', 'aarch64', 's390x'] + container: mwilck/multipath-build-${{ matrix.os }}-${{ matrix.arch }} + steps: + - name: checkout + uses: actions/checkout@v1 + - name: build and test + if: ${{ matrix.arch == '' || matrix.arch == '-i386' }} + run: make test + - name: build + if: ${{ matrix.arch != '' && matrix.arch != '-i386' }} + run: make test-progs + - name: archive + if: ${{ matrix.arch != '' && matrix.arch != '-i386' }} + run: > + tar cfv binaries.tar + Makefile* + libmpathcmd/*.so* libmultipath/*.so* + tests/lib tests/*-test tests/Makefile tests/*.so* + - uses: actions/upload-artifact@v1 + if: ${{ matrix.arch != '' && matrix.arch != '-i386' }} + with: + name: multipath-${{ matrix.os }}-${{ matrix.arch }} + path: binaries.tar + + test: + runs-on: ubuntu-20.04 + needs: build + strategy: + matrix: + os: [buster] + arch: ['ppc64le', 'aarch64', 's390x'] + steps: + - name: get binaries + uses: actions/download-artifact@v1 + with: + name: multipath-${{ matrix.os }}-${{ matrix.arch }} + - name: unpack + run: tar xfv multipath-${{ matrix.os }}-${{ matrix.arch }}/binaries.tar + - name: enable foreign arch + run: sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset + - name: run tests + # Github actions doesn't support referencing docker images with + # context variables. Workaround: use mosteo-actions/docker-run action + # See https://github.community/t/expressions-in-docker-uri/16271 + uses: mosteo-actions/docker-run@v1 + with: + image: mwilck/multipath-run-${{ matrix.os }}-${{ matrix.arch }} + # The runner is an image that has "make" as entrypoint + # So run "make -C tests" here + command: -C tests diff --git a/.github/workflows/native.yaml b/.github/workflows/native.yaml new file mode 100644 index 0000000..abd39a0 --- /dev/null +++ b/.github/workflows/native.yaml @@ -0,0 +1,31 @@ +name: compile and unit test on native arch +on: + push: + branches: + - master + - queue + - tip + +jobs: + build-and-test: + runs-on: ubuntu-20.04 + strategy: + matrix: + os: [buster, jessie, sid, alpine, fedora-34] + arch: ['', '-i386'] + exclude: + - os: fedora-34 + arch: '-i386' + container: mwilck/multipath-build-${{ matrix.os }}${{ matrix.arch }} + steps: + - name: checkout + uses: actions/checkout@v1 + - name: build and test + run: make test + - name: clean + run: make clean + - name: clang + env: + CC: clang + run: make test + From patchwork Fri Mar 26 21:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167667 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C29B3C433E0 for ; Fri, 26 Mar 2021 21:30:21 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 561F061A2A for ; Fri, 26 Mar 2021 21:30:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 561F061A2A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-330-OHRym6p4PFKw7kfP8tJ9vA-1; Fri, 26 Mar 2021 17:30:17 -0400 X-MC-Unique: OHRym6p4PFKw7kfP8tJ9vA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D0CC4180FCA1; Fri, 26 Mar 2021 21:30:13 +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 6CFA310013D6; Fri, 26 Mar 2021 21:30:13 +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 A5B181800215; Fri, 26 Mar 2021 21:30:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU8o0001673 for ; Fri, 26 Mar 2021 17:30:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8970B21121A7; Fri, 26 Mar 2021 21:30:08 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7FAD421121C3 for ; Fri, 26 Mar 2021 21:30:06 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0E44680A1D2 for ; Fri, 26 Mar 2021 21:30:06 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-546-SMi3d04sP-erfC2wLOngrw-1; Fri, 26 Mar 2021 17:30:01 -0400 X-MC-Unique: SMi3d04sP-erfC2wLOngrw-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EDAAAADEF; Fri, 26 Mar 2021 21:29:59 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:41 +0100 Message-Id: <20210326212944.3136-5-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU8o0001673 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 4/7] libdmmp: allow building without perl X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Add the kernel-doc generated manpages of libdmmp to git, and change the libdmmp Makefile to regenerate them (only) when necessary. This allows us to drop perl as a build-time requirement. Signed-off-by: Martin Wilck --- libdmmp/Makefile | 37 ++++++------- libdmmp/docs/man/dmmp_context_free.3 | 15 ++++++ libdmmp/docs/man/dmmp_context_log_func_set.3 | 21 ++++++++ .../docs/man/dmmp_context_log_priority_get.3 | 23 ++++++++ .../docs/man/dmmp_context_log_priority_set.3 | 29 ++++++++++ libdmmp/docs/man/dmmp_context_new.3 | 19 +++++++ libdmmp/docs/man/dmmp_context_timeout_get.3 | 15 ++++++ libdmmp/docs/man/dmmp_context_timeout_set.3 | 19 +++++++ libdmmp/docs/man/dmmp_context_userdata_get.3 | 15 ++++++ libdmmp/docs/man/dmmp_context_userdata_set.3 | 18 +++++++ libdmmp/docs/man/dmmp_flush_mpath.3 | 36 +++++++++++++ libdmmp/docs/man/dmmp_last_error_msg.3 | 16 ++++++ libdmmp/docs/man/dmmp_log_priority_str.3 | 24 +++++++++ libdmmp/docs/man/dmmp_mpath_array_free.3 | 18 +++++++ libdmmp/docs/man/dmmp_mpath_array_get.3 | 36 +++++++++++++ libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 | 17 ++++++ libdmmp/docs/man/dmmp_mpath_name_get.3 | 18 +++++++ libdmmp/docs/man/dmmp_mpath_wwid_get.3 | 13 +++++ libdmmp/docs/man/dmmp_path_array_get.3 | 25 +++++++++ libdmmp/docs/man/dmmp_path_blk_name_get.3 | 17 ++++++ libdmmp/docs/man/dmmp_path_group_array_get.3 | 27 ++++++++++ libdmmp/docs/man/dmmp_path_group_id_get.3 | 18 +++++++ .../docs/man/dmmp_path_group_priority_get.3 | 16 ++++++ .../docs/man/dmmp_path_group_selector_get.3 | 16 ++++++ libdmmp/docs/man/dmmp_path_group_status_get.3 | 23 ++++++++ libdmmp/docs/man/dmmp_path_group_status_str.3 | 26 +++++++++ libdmmp/docs/man/dmmp_path_status_get.3 | 54 +++++++++++++++++++ libdmmp/docs/man/dmmp_path_status_str.3 | 34 ++++++++++++ libdmmp/docs/man/dmmp_reconfig.3 | 27 ++++++++++ libdmmp/docs/man/dmmp_strerror.3 | 33 ++++++++++++ libdmmp/docs/{ => man}/libdmmp.h.3 | 0 31 files changed, 683 insertions(+), 22 deletions(-) create mode 100644 libdmmp/docs/man/dmmp_context_free.3 create mode 100644 libdmmp/docs/man/dmmp_context_log_func_set.3 create mode 100644 libdmmp/docs/man/dmmp_context_log_priority_get.3 create mode 100644 libdmmp/docs/man/dmmp_context_log_priority_set.3 create mode 100644 libdmmp/docs/man/dmmp_context_new.3 create mode 100644 libdmmp/docs/man/dmmp_context_timeout_get.3 create mode 100644 libdmmp/docs/man/dmmp_context_timeout_set.3 create mode 100644 libdmmp/docs/man/dmmp_context_userdata_get.3 create mode 100644 libdmmp/docs/man/dmmp_context_userdata_set.3 create mode 100644 libdmmp/docs/man/dmmp_flush_mpath.3 create mode 100644 libdmmp/docs/man/dmmp_last_error_msg.3 create mode 100644 libdmmp/docs/man/dmmp_log_priority_str.3 create mode 100644 libdmmp/docs/man/dmmp_mpath_array_free.3 create mode 100644 libdmmp/docs/man/dmmp_mpath_array_get.3 create mode 100644 libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 create mode 100644 libdmmp/docs/man/dmmp_mpath_name_get.3 create mode 100644 libdmmp/docs/man/dmmp_mpath_wwid_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_array_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_blk_name_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_group_array_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_group_id_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_group_priority_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_group_selector_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_group_status_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_group_status_str.3 create mode 100644 libdmmp/docs/man/dmmp_path_status_get.3 create mode 100644 libdmmp/docs/man/dmmp_path_status_str.3 create mode 100644 libdmmp/docs/man/dmmp_reconfig.3 create mode 100644 libdmmp/docs/man/dmmp_strerror.3 rename libdmmp/docs/{ => man}/libdmmp.h.3 (100%) diff --git a/libdmmp/Makefile b/libdmmp/Makefile index 4175c3f..764a0bc 100644 --- a/libdmmp/Makefile +++ b/libdmmp/Makefile @@ -21,12 +21,13 @@ CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden -I$(libdmmpdir) -I$(mpathcmddir) \ LIBDEPS += $(shell $(PKGCONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread all: $(LIBS) doc +.PHONY: doc doc.gz clean install uninstall check speed_test dep_clean $(LIBS): $(OBJS) $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS) $(LN) $@ $(DEVLIB) -install: +install: doc.gz mkdir -p $(DESTDIR)$(usrlibdir) $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(usrlibdir)/$(LIBS) $(INSTALL_PROGRAM) -m 644 -D \ @@ -40,11 +41,7 @@ install: $(DESTDIR)$(pkgconfdir)/$(PKGFILE) perl -i -pe 's|__INCLUDEDIR__|$(includedir)|g' \ $(DESTDIR)$(pkgconfdir)/$(PKGFILE) - @for file in docs/man/*.3.gz; do \ - $(INSTALL_PROGRAM) -m 644 -D \ - $$file \ - $(DESTDIR)$(man3dir)/ || exit $?; \ - done + $(INSTALL_PROGRAM) -m 644 -t $(DESTDIR)$(man3dir) docs/man/*.3.gz uninstall: $(RM) $(DESTDIR)$(usrlibdir)/$(LIBS) @@ -58,7 +55,7 @@ uninstall: clean: dep_clean $(RM) core *.a *.o *.gz *.so *.so.* - $(RM) -r docs/man + $(RM) docs/man/*.gz $(MAKE) -C test clean include $(wildcard $(OBJS:.o=.d)) @@ -69,23 +66,19 @@ check: all speed_test: all $(MAKE) -C test speed_test -doc: docs/man/$(EXTRA_MAN_FILES).gz +doc.gz: doc $(patsubst %,%.gz,$(wildcard docs/man/*.3)) -TEMPFILE := $(shell mktemp) +doc: docs/man/dmmp_strerror.3 -docs/man/$(EXTRA_MAN_FILES).gz: $(HEADERS) - @for file in $(EXTRA_MAN_FILES); do \ - $(INSTALL_PROGRAM) -v -m 644 -D docs/$$file docs/man/$$file; \ - done - cat $(HEADERS) | \ - perl docs/doc-preclean.pl > "$(TEMPFILE)" - perl docs/kernel-doc -man "$(TEMPFILE)" | \ - perl docs/split-man.pl docs/man - -rm -f "$(TEMPFILE)" - @for file in docs/man/*.3; do \ - gzip -f $$file; \ - done - find docs/man -type f -name \*[0-9].gz +docs/man/%.3.gz: docs/man/%.3 + gzip -c $< >$@ + +docs/man/dmmp_strerror.3: $(HEADERS) + TEMPFILE=$(shell mktemp); \ + cat $^ | perl docs/doc-preclean.pl >$$TEMPFILE; \ + perl docs/kernel-doc -man $$TEMPFILE | \ + perl docs/split-man.pl docs/man; \ + rm -f $$TEMPFILE dep_clean: $(RM) $(OBJS:.o=.d) diff --git a/libdmmp/docs/man/dmmp_context_free.3 b/libdmmp/docs/man/dmmp_context_free.3 new file mode 100644 index 0000000..0d26f42 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_free.3 @@ -0,0 +1,15 @@ +.TH "dmmp_context_free" 3 "dmmp_context_free" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_free \- Release the memory of struct dmmp_context. +.SH SYNOPSIS +.B "void" dmmp_context_free +.BI "(struct dmmp_context *" ctx ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +.SH "DESCRIPTION" + +Release the memory of struct dmmp_context, but the userdata memory defined +via \fBdmmp_context_userdata_set\fP will not be touched. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_context_log_func_set.3 b/libdmmp/docs/man/dmmp_context_log_func_set.3 new file mode 100644 index 0000000..986793d --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_log_func_set.3 @@ -0,0 +1,21 @@ +.TH "dmmp_context_log_func_set" 3 "dmmp_context_log_func_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_log_func_set \- Set log handler function. +.SH SYNOPSIS +.B "void" dmmp_context_log_func_set +.BI "(struct dmmp_context *" ctx "," +.BI "void (*" log_func ") (struct dmmp_context *ctx, int priority, const char *file, int line, const char *func_name, const char *format, va_list args));" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.IP "log_func" 12 +Pointer of log handler function. If set to NULL, all log will be +ignored. +.SH "DESCRIPTION" + +Set custom log handler. The log handler will be invoked when log message +is equal or more important(less value) than log priority setting. +Please check manpage libdmmp.h(3) for detail usage. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_context_log_priority_get.3 b/libdmmp/docs/man/dmmp_context_log_priority_get.3 new file mode 100644 index 0000000..9a273a2 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_log_priority_get.3 @@ -0,0 +1,23 @@ +.TH "dmmp_context_log_priority_get" 3 "dmmp_context_log_priority_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_log_priority_get \- Get log priority. +.SH SYNOPSIS +.B "int" dmmp_context_log_priority_get +.BI "(struct dmmp_context *" ctx ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve current log priority. Valid log priority values are: + +* DMMP_LOG_PRIORITY_ERROR -- 3 + +* DMMP_LOG_PRIORITY_WARNING -- 4 + +* DMMP_LOG_PRIORITY_INFO -- 5 + +* DMMP_LOG_PRIORITY_DEBUG -- 7 +.SH "RETURN" +int, log priority. diff --git a/libdmmp/docs/man/dmmp_context_log_priority_set.3 b/libdmmp/docs/man/dmmp_context_log_priority_set.3 new file mode 100644 index 0000000..469c5a4 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_log_priority_set.3 @@ -0,0 +1,29 @@ +.TH "dmmp_context_log_priority_set" 3 "dmmp_context_log_priority_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_log_priority_set \- Set log priority. +.SH SYNOPSIS +.B "void" dmmp_context_log_priority_set +.BI "(struct dmmp_context *" ctx "," +.BI "int " priority ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.IP "priority" 12 +int, log priority. +.SH "DESCRIPTION" + + +When library generates log message, only equal or more important(less value) +message will be forwarded to log handler function. Valid log priority values +are: + +* DMMP_LOG_PRIORITY_ERROR -- 3 + +* DMMP_LOG_PRIORITY_WARNING -- 4 + +* DMMP_LOG_PRIORITY_INFO -- 5 + +* DMMP_LOG_PRIORITY_DEBUG -- 7 +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_context_new.3 b/libdmmp/docs/man/dmmp_context_new.3 new file mode 100644 index 0000000..0eaeb00 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_new.3 @@ -0,0 +1,19 @@ +.TH "dmmp_context_new" 3 "dmmp_context_new" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_new \- Create struct dmmp_context. +.SH SYNOPSIS +.B "struct dmmp_context *" dmmp_context_new +.BI "(" void ");" +.SH ARGUMENTS +.IP "void" 12 +no arguments +.SH "DESCRIPTION" + +The default logging level (DMMP_LOG_PRIORITY_DEFAULT) is +DMMP_LOG_PRIORITY_WARNING which means only warning and error message will be +forward to log handler function. The default log handler function will print +log message to STDERR, to change so, please use \fBdmmp_context_log_func_set\fP +to set your own log handler, check manpage libdmmp.h(3) for detail. +.SH "RETURN" +Pointer of 'struct dmmp_context'. Should be freed by +\fBdmmp_context_free\fP. diff --git a/libdmmp/docs/man/dmmp_context_timeout_get.3 b/libdmmp/docs/man/dmmp_context_timeout_get.3 new file mode 100644 index 0000000..1df2793 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_timeout_get.3 @@ -0,0 +1,15 @@ +.TH "dmmp_context_timeout_get" 3 "dmmp_context_timeout_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_timeout_get \- Get IPC timeout. +.SH SYNOPSIS +.B "unsigned int" dmmp_context_timeout_get +.BI "(struct dmmp_context *" ctx ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve timeout value of IPC connection to multipathd daemon. +.SH "RETURN" +unsigned int. Timeout in milliseconds. diff --git a/libdmmp/docs/man/dmmp_context_timeout_set.3 b/libdmmp/docs/man/dmmp_context_timeout_set.3 new file mode 100644 index 0000000..f3d7709 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_timeout_set.3 @@ -0,0 +1,19 @@ +.TH "dmmp_context_timeout_set" 3 "dmmp_context_timeout_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_timeout_set \- Set IPC timeout. +.SH SYNOPSIS +.B "void" dmmp_context_timeout_set +.BI "(struct dmmp_context *" ctx "," +.BI "unsigned int " tmo ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.IP "tmo" 12 +Timeout in milliseconds(1 seconds equal 1000 milliseconds). +0 means infinite, function only return when error or pass. +.SH "DESCRIPTION" + +By default, the IPC to multipathd daemon will timeout after 60 seconds. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_context_userdata_get.3 b/libdmmp/docs/man/dmmp_context_userdata_get.3 new file mode 100644 index 0000000..fb713d5 --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_userdata_get.3 @@ -0,0 +1,15 @@ +.TH "dmmp_context_userdata_get" 3 "dmmp_context_userdata_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_userdata_get \- Get user data pointer. +.SH SYNOPSIS +.B "void *" dmmp_context_userdata_get +.BI "(struct dmmp_context *" ctx ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve user data pointer from 'struct dmmp_context'. +.SH "RETURN" +void *. Pointer of user defined data. diff --git a/libdmmp/docs/man/dmmp_context_userdata_set.3 b/libdmmp/docs/man/dmmp_context_userdata_set.3 new file mode 100644 index 0000000..c5bf63f --- /dev/null +++ b/libdmmp/docs/man/dmmp_context_userdata_set.3 @@ -0,0 +1,18 @@ +.TH "dmmp_context_userdata_set" 3 "dmmp_context_userdata_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_context_userdata_set \- Set user data pointer. +.SH SYNOPSIS +.B "void" dmmp_context_userdata_set +.BI "(struct dmmp_context *" ctx "," +.BI "void *" userdata ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.IP "userdata" 12 +Pointer of user defined data. +.SH "DESCRIPTION" + +Store user data pointer into 'struct dmmp_context'. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_flush_mpath.3 b/libdmmp/docs/man/dmmp_flush_mpath.3 new file mode 100644 index 0000000..cdfd526 --- /dev/null +++ b/libdmmp/docs/man/dmmp_flush_mpath.3 @@ -0,0 +1,36 @@ +.TH "dmmp_flush_mpath" 3 "dmmp_flush_mpath" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_flush_mpath \- Flush specified multipath device map if unused. +.SH SYNOPSIS +.B "int" dmmp_flush_mpath +.BI "(struct dmmp_context *" ctx "," +.BI "const char *" mpath_name ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.IP "mpath_name" 12 +const char *. The name of multipath device map. +.SH "DESCRIPTION" + +Flush a multipath device map specified as parameter, if unused. +.SH "RETURN" +int. Valid error codes are: + +* DMMP_OK + +* DMMP_ERR_BUG + +* DMMP_ERR_NO_MEMORY + +* DMMP_ERR_NO_DAEMON + +* DMMP_ERR_MPATH_BUSY + +* DMMP_ERR_MPATH_NOT_FOUND + +* DMMP_ERR_INVALID_ARGUMENT + +* DMMP_ERR_PERMISSION_DENY + +Error number could be converted to string by \fBdmmp_strerror\fP. diff --git a/libdmmp/docs/man/dmmp_last_error_msg.3 b/libdmmp/docs/man/dmmp_last_error_msg.3 new file mode 100644 index 0000000..20acbc6 --- /dev/null +++ b/libdmmp/docs/man/dmmp_last_error_msg.3 @@ -0,0 +1,16 @@ +.TH "dmmp_last_error_msg" 3 "dmmp_last_error_msg" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_last_error_msg \- Retrieves the last error message. +.SH SYNOPSIS +.B "const char *" dmmp_last_error_msg +.BI "(struct dmmp_context *" ctx ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieves the last error message. +.SH "RETURN" +const char *. No need to free this memory, the resources will get +freed when \fBdmmp_context_free\fP. diff --git a/libdmmp/docs/man/dmmp_log_priority_str.3 b/libdmmp/docs/man/dmmp_log_priority_str.3 new file mode 100644 index 0000000..3b5f828 --- /dev/null +++ b/libdmmp/docs/man/dmmp_log_priority_str.3 @@ -0,0 +1,24 @@ +.TH "dmmp_log_priority_str" 3 "dmmp_log_priority_str" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_log_priority_str \- Convert log priority to string. +.SH SYNOPSIS +.B "const char *" dmmp_log_priority_str +.BI "(int " priority ");" +.SH ARGUMENTS +.IP "priority" 12 +int. Log priority. +.SH "DESCRIPTION" + +Convert log priority to string (const char *). +.SH "RETURN" +const char *. Valid string are: + +* "ERROR" for DMMP_LOG_PRIORITY_ERROR + +* "WARN " for DMMP_LOG_PRIORITY_WARNING + +* "INFO " for DMMP_LOG_PRIORITY_INFO + +* "DEBUG" for DMMP_LOG_PRIORITY_DEBUG + +* "Invalid argument" for invalid log priority. diff --git a/libdmmp/docs/man/dmmp_mpath_array_free.3 b/libdmmp/docs/man/dmmp_mpath_array_free.3 new file mode 100644 index 0000000..8c294e0 --- /dev/null +++ b/libdmmp/docs/man/dmmp_mpath_array_free.3 @@ -0,0 +1,18 @@ +.TH "dmmp_mpath_array_free" 3 "dmmp_mpath_array_free" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_mpath_array_free \- Free 'struct dmmp_mpath' pointer array. +.SH SYNOPSIS +.B "void" dmmp_mpath_array_free +.BI "(struct dmmp_mpath **" dmmp_mps "," +.BI "uint32_t " dmmp_mp_count ");" +.SH ARGUMENTS +.IP "dmmp_mps" 12 +Pointer of 'struct dmmp_mpath' array. +.IP "dmmp_mp_count" 12 +uint32_t, the size of 'dmmp_mps' pointer array. +.SH "DESCRIPTION" + +Free the 'dmmp_mps' pointer array generated by \fBdmmp_mpath_array_get\fP. +If provided 'dmmp_mps' pointer is NULL or dmmp_mp_count == 0, do nothing. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_mpath_array_get.3 b/libdmmp/docs/man/dmmp_mpath_array_get.3 new file mode 100644 index 0000000..e211db4 --- /dev/null +++ b/libdmmp/docs/man/dmmp_mpath_array_get.3 @@ -0,0 +1,36 @@ +.TH "dmmp_mpath_array_get" 3 "dmmp_mpath_array_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_mpath_array_get \- Query all existing multipath devices. +.SH SYNOPSIS +.B "int" dmmp_mpath_array_get +.BI "(struct dmmp_context *" ctx "," +.BI "struct dmmp_mpath ***" dmmp_mps "," +.BI "uint32_t *" dmmp_mp_count ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.IP "dmmp_mps" 12 +Output pointer array of 'struct dmmp_mpath'. +If this pointer is NULL, your program will be terminated by assert. +.IP "dmmp_mp_count" 12 +Output pointer of uint32_t. Hold the size of 'dmmp_mps' pointer array. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Query all existing multipath devices and store them into a pointer array. +The memory of 'dmmp_mps' should be freed via \fBdmmp_mpath_array_free\fP. +.SH "RETURN" +int. Valid error codes are: + +* DMMP_OK + +* DMMP_ERR_BUG + +* DMMP_ERR_NO_MEMORY + +* DMMP_ERR_NO_DAEMON + +* DMMP_ERR_INCONSISTENT_DATA + +Error number could be converted to string by \fBdmmp_strerror\fP. diff --git a/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 b/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 new file mode 100644 index 0000000..e802fe6 --- /dev/null +++ b/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 @@ -0,0 +1,17 @@ +.TH "dmmp_mpath_kdev_name_get" 3 "dmmp_mpath_kdev_name_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_mpath_kdev_name_get \- Retrieve kernel DEVNAME of certain mpath. +.SH SYNOPSIS +.B "const char *" dmmp_mpath_kdev_name_get +.BI "(struct dmmp_mpath *" dmmp_mp ");" +.SH ARGUMENTS +.IP "dmmp_mp" 12 +Pointer of 'struct dmmp_mpath'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve DEVNAME name used by kernel uevent of specified mpath. +For example: 'dm-1'. +.SH "RETURN" +const char *. No need to free this memory, the resources will get +freed when \fBdmmp_mpath_array_free\fP. diff --git a/libdmmp/docs/man/dmmp_mpath_name_get.3 b/libdmmp/docs/man/dmmp_mpath_name_get.3 new file mode 100644 index 0000000..d70579e --- /dev/null +++ b/libdmmp/docs/man/dmmp_mpath_name_get.3 @@ -0,0 +1,18 @@ +.TH "dmmp_mpath_name_get" 3 "dmmp_mpath_name_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_mpath_name_get \- Retrieve name(alias) of certain mpath. +.SH SYNOPSIS +.B "const char *" dmmp_mpath_name_get +.BI "(struct dmmp_mpath *" dmmp_mp ");" +.SH ARGUMENTS +.IP "dmmp_mp" 12 +Pointer of 'struct dmmp_mpath'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve the name (also known as alias) of certain mpath. +When the config 'user_friendly_names' been set 'no', the name will be +identical to WWID retrieved by \fBdmmp_mpath_wwid_get\fP. +.SH "RETURN" +const char *. No need to free this memory, the resources will get +freed when \fBdmmp_mpath_array_free\fP. diff --git a/libdmmp/docs/man/dmmp_mpath_wwid_get.3 b/libdmmp/docs/man/dmmp_mpath_wwid_get.3 new file mode 100644 index 0000000..3d060e9 --- /dev/null +++ b/libdmmp/docs/man/dmmp_mpath_wwid_get.3 @@ -0,0 +1,13 @@ +.TH "dmmp_mpath_wwid_get" 3 "dmmp_mpath_wwid_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_mpath_wwid_get \- Retrieve WWID of certain mpath. +.SH SYNOPSIS +.B "const char *" dmmp_mpath_wwid_get +.BI "(struct dmmp_mpath *" dmmp_mp ");" +.SH ARGUMENTS +.IP "dmmp_mp" 12 +Pointer of 'struct dmmp_mpath'. +If this pointer is NULL, your program will be terminated by assert. +.SH "RETURN" +const char *. No need to free this memory, the resources will get +freed when \fBdmmp_mpath_array_free\fP. diff --git a/libdmmp/docs/man/dmmp_path_array_get.3 b/libdmmp/docs/man/dmmp_path_array_get.3 new file mode 100644 index 0000000..53340b3 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_array_get.3 @@ -0,0 +1,25 @@ +.TH "dmmp_path_array_get" 3 "dmmp_path_array_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_array_get \- Retrieve path pointer array. +.SH SYNOPSIS +.B "void" dmmp_path_array_get +.BI "(struct dmmp_path_group *" dmmp_pg "," +.BI "struct dmmp_path ***" dmmp_ps "," +.BI "uint32_t *" dmmp_p_count ");" +.SH ARGUMENTS +.IP "dmmp_pg" 12 +Pointer of 'struct dmmp_path_group'. +If this pointer is NULL, your program will be terminated by assert. +.IP "dmmp_ps" 12 +Output pointer of 'struct dmmp_path' pointer array. +If this pointer is NULL, your program will be terminated by assert. +.IP "dmmp_p_count" 12 +Output pointer of uint32_t. Hold the size of 'dmmp_ps' pointer array. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +The memory of output pointer array is hold by 'struct dmmp_mpath', no +need to free this memory, the resources will got freed when +\fBdmmp_mpath_array_free\fP. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_path_blk_name_get.3 b/libdmmp/docs/man/dmmp_path_blk_name_get.3 new file mode 100644 index 0000000..da5f9f0 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_blk_name_get.3 @@ -0,0 +1,17 @@ +.TH "dmmp_path_blk_name_get" 3 "dmmp_path_blk_name_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_blk_name_get \- Retrieve block name. +.SH SYNOPSIS +.B "const char *" dmmp_path_blk_name_get +.BI "(struct dmmp_path *" dmmp_p ");" +.SH ARGUMENTS +.IP "dmmp_p" 12 +Pointer of 'struct dmmp_path'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve block name of certain path. The example of block names are "sda", +"nvme0n1". +.SH "RETURN" +const char *. No need to free this memory, the resources will get +freed when \fBdmmp_mpath_array_free\fP. diff --git a/libdmmp/docs/man/dmmp_path_group_array_get.3 b/libdmmp/docs/man/dmmp_path_group_array_get.3 new file mode 100644 index 0000000..6eee4a2 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_group_array_get.3 @@ -0,0 +1,27 @@ +.TH "dmmp_path_group_array_get" 3 "dmmp_path_group_array_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_group_array_get \- Retrieve path groups pointer array. +.SH SYNOPSIS +.B "void" dmmp_path_group_array_get +.BI "(struct dmmp_mpath *" dmmp_mp "," +.BI "struct dmmp_path_group ***" dmmp_pgs "," +.BI "uint32_t *" dmmp_pg_count ");" +.SH ARGUMENTS +.IP "dmmp_mp" 12 +Pointer of 'struct dmmp_mpath'. +If this pointer is NULL, your program will be terminated by assert. +.IP "dmmp_pgs" 12 +Output pointer of 'struct dmmp_path_group' pointer array. +If this pointer is NULL, your program will be terminated by assert. +.IP "dmmp_pg_count" 12 +Output pointer of uint32_t. Hold the size of 'dmmp_pgs' pointer array. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve the path groups of certain mpath. + +The memory of output pointer array is hold by 'struct dmmp_mpath', no +need to free this memory, the resources will got freed when +\fBdmmp_mpath_array_free\fP. +.SH "RETURN" +void diff --git a/libdmmp/docs/man/dmmp_path_group_id_get.3 b/libdmmp/docs/man/dmmp_path_group_id_get.3 new file mode 100644 index 0000000..4f07b53 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_group_id_get.3 @@ -0,0 +1,18 @@ +.TH "dmmp_path_group_id_get" 3 "dmmp_path_group_id_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_group_id_get \- Retrieve path group ID. +.SH SYNOPSIS +.B "uint32_t" dmmp_path_group_id_get +.BI "(struct dmmp_path_group *" dmmp_pg ");" +.SH ARGUMENTS +.IP "dmmp_pg" 12 +Pointer of 'struct dmmp_path_group'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Retrieve the path group ID which could be used to switch active path group +via command: + +multipathd -k'switch multipath mpathb group $id' +.SH "RETURN" +uint32_t. diff --git a/libdmmp/docs/man/dmmp_path_group_priority_get.3 b/libdmmp/docs/man/dmmp_path_group_priority_get.3 new file mode 100644 index 0000000..a48b270 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_group_priority_get.3 @@ -0,0 +1,16 @@ +.TH "dmmp_path_group_priority_get" 3 "dmmp_path_group_priority_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_group_priority_get \- Retrieve path group priority. +.SH SYNOPSIS +.B "uint32_t" dmmp_path_group_priority_get +.BI "(struct dmmp_path_group *" dmmp_pg ");" +.SH ARGUMENTS +.IP "dmmp_pg" 12 +Pointer of 'struct dmmp_path_group'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +The enabled path group with highest priority will be next active path group +if active path group down. +.SH "RETURN" +uint32_t. diff --git a/libdmmp/docs/man/dmmp_path_group_selector_get.3 b/libdmmp/docs/man/dmmp_path_group_selector_get.3 new file mode 100644 index 0000000..407b3f4 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_group_selector_get.3 @@ -0,0 +1,16 @@ +.TH "dmmp_path_group_selector_get" 3 "dmmp_path_group_selector_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_group_selector_get \- Retrieve path group selector. +.SH SYNOPSIS +.B "const char *" dmmp_path_group_selector_get +.BI "(struct dmmp_path_group *" dmmp_pg ");" +.SH ARGUMENTS +.IP "dmmp_pg" 12 +Pointer of 'struct dmmp_path_group'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Path group selector determine which path in active path group will be +use to next I/O. +.SH "RETURN" +const char *. diff --git a/libdmmp/docs/man/dmmp_path_group_status_get.3 b/libdmmp/docs/man/dmmp_path_group_status_get.3 new file mode 100644 index 0000000..a81aeb3 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_group_status_get.3 @@ -0,0 +1,23 @@ +.TH "dmmp_path_group_status_get" 3 "dmmp_path_group_status_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_group_status_get \- Retrieve path group status. +.SH SYNOPSIS +.B "uint32_t" dmmp_path_group_status_get +.BI "(struct dmmp_path_group *" dmmp_pg ");" +.SH ARGUMENTS +.IP "dmmp_pg" 12 +Pointer of 'struct dmmp_path_group'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +The valid path group statuses are: + +* DMMP_PATH_GROUP_STATUS_UNKNOWN + +* DMMP_PATH_GROUP_STATUS_ENABLED -- standby to be active + +* DMMP_PATH_GROUP_STATUS_DISABLED -- disabled due to all path down + +* DMMP_PATH_GROUP_STATUS_ACTIVE -- selected to handle I/O +.SH "RETURN" +uint32_t. diff --git a/libdmmp/docs/man/dmmp_path_group_status_str.3 b/libdmmp/docs/man/dmmp_path_group_status_str.3 new file mode 100644 index 0000000..e4a9f74 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_group_status_str.3 @@ -0,0 +1,26 @@ +.TH "dmmp_path_group_status_str" 3 "dmmp_path_group_status_str" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_group_status_str \- Convert path group status to string. +.SH SYNOPSIS +.B "const char *" dmmp_path_group_status_str +.BI "(uint32_t " pg_status ");" +.SH ARGUMENTS +.IP "pg_status" 12 +uint32_t. Path group status. +When provided value is not a valid path group status, return "Invalid +argument". +.SH "DESCRIPTION" + +Convert path group status uint32_t to string (const char *). +.SH "RETURN" +const char *. Valid string are: + +* "Invalid argument" + +* "undef" + +* "enabled" + +* "disabled" + +* "active" diff --git a/libdmmp/docs/man/dmmp_path_status_get.3 b/libdmmp/docs/man/dmmp_path_status_get.3 new file mode 100644 index 0000000..025cfee --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_status_get.3 @@ -0,0 +1,54 @@ +.TH "dmmp_path_status_get" 3 "dmmp_path_status_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_status_get \- Retrieve the path status. +.SH SYNOPSIS +.B "uint32_t" dmmp_path_status_get +.BI "(struct dmmp_path *" dmmp_p ");" +.SH ARGUMENTS +.IP "dmmp_p" 12 +Pointer of 'struct dmmp_path'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +The valid path statuses are: + +* DMMP_PATH_STATUS_UNKNOWN + +* DMMP_PATH_STATUS_DOWN + +Path is down and you shouldn't try to send commands to it. + +* DMMP_PATH_STATUS_UP + +Path is up and I/O can be sent to it. + +* DMMP_PATH_STATUS_SHAKY + +Only emc_clariion checker when path not available for "normal" +operations. + +* DMMP_PATH_STATUS_GHOST + +Only hp_sw and rdac checkers. Indicates a "passive/standby" +path on active/passive HP arrays. These paths will return valid +answers to certain SCSI commands (tur, read_capacity, inquiry, +start_stop), but will fail I/O commands. The path needs an +initialization command to be sent to it in order for I/Os to +succeed. + +* DMMP_PATH_STATUS_PENDING + +Available for all async checkers when a check IO is in flight. + +* DMMP_PATH_STATUS_TIMEOUT + +Only tur checker when command timed out. + +* DMMP_PATH_STATUS_DELAYED + +If a path fails after being up for less than delay_watch_checks checks, +when it comes back up again, it will not be marked as up until it has +been up for delay_wait_checks checks. During this time, it is marked as +"delayed". +.SH "RETURN" +uint32_t. diff --git a/libdmmp/docs/man/dmmp_path_status_str.3 b/libdmmp/docs/man/dmmp_path_status_str.3 new file mode 100644 index 0000000..3944d39 --- /dev/null +++ b/libdmmp/docs/man/dmmp_path_status_str.3 @@ -0,0 +1,34 @@ +.TH "dmmp_path_status_str" 3 "dmmp_path_status_str" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_path_status_str \- Convert path status to string. +.SH SYNOPSIS +.B "const char *" dmmp_path_status_str +.BI "(uint32_t " path_status ");" +.SH ARGUMENTS +.IP "path_status" 12 +uint32_t. Path status. +When provided value is not a valid path status, return +"Invalid argument". +.SH "DESCRIPTION" + +Convert path status uint32_t to string (const char *): + +* DMMP_PATH_STATUS_UNKNOWN -- "undef" + +* DMMP_PATH_STATUS_DOWN -- "faulty" + +* DMMP_PATH_STATUS_UP -- "ready" + +* DMMP_PATH_STATUS_SHAKY -- "shaky" + +* DMMP_PATH_STATUS_GHOST -- "ghost" + +* DMMP_PATH_STATUS_PENDING -- "pending" + +* DMMP_PATH_STATUS_TIMEOUT -- "timeout" + +* DMMP_PATH_STATUS_REMOVED -- "removed" + +* DMMP_PATH_STATUS_DELAYED -- "delayed" +.SH "RETURN" +const char *. The meaning of status value. diff --git a/libdmmp/docs/man/dmmp_reconfig.3 b/libdmmp/docs/man/dmmp_reconfig.3 new file mode 100644 index 0000000..a743e30 --- /dev/null +++ b/libdmmp/docs/man/dmmp_reconfig.3 @@ -0,0 +1,27 @@ +.TH "dmmp_reconfig" 3 "dmmp_reconfig" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_reconfig \- Instruct multipathd daemon to do reconfiguration. +.SH SYNOPSIS +.B "int" dmmp_reconfig +.BI "(struct dmmp_context *" ctx ");" +.SH ARGUMENTS +.IP "ctx" 12 +Pointer of 'struct dmmp_context'. +If this pointer is NULL, your program will be terminated by assert. +.SH "DESCRIPTION" + +Instruct multipathd daemon to do reconfiguration. +.SH "RETURN" +int. Valid error codes are: + +* DMMP_OK + +* DMMP_ERR_BUG + +* DMMP_ERR_NO_MEMORY + +* DMMP_ERR_NO_DAEMON + +* DMMP_ERR_PERMISSION_DENY + +Error number could be converted to string by \fBdmmp_strerror\fP. diff --git a/libdmmp/docs/man/dmmp_strerror.3 b/libdmmp/docs/man/dmmp_strerror.3 new file mode 100644 index 0000000..4d753d3 --- /dev/null +++ b/libdmmp/docs/man/dmmp_strerror.3 @@ -0,0 +1,33 @@ +.TH "dmmp_strerror" 3 "dmmp_strerror" "March 2021" "Device Mapper Multipath API - libdmmp Manual" +.SH NAME +dmmp_strerror \- Convert error code to string. +.SH SYNOPSIS +.B "const char *" dmmp_strerror +.BI "(int " rc ");" +.SH ARGUMENTS +.IP "rc" 12 +int. Return code by libdmmp functions. When provided error code is not a +valid error code, return "Invalid argument". +.SH "DESCRIPTION" + +Convert error code (int) to string (const char *): + +* DMMP_OK -- "OK" + +* DMMP_ERR_BUG -- "BUG of libdmmp library" + +* DMMP_ERR_NO_MEMORY -- "Out of memory" + +* DMMP_ERR_IPC_TIMEOUT -- "Timeout when communicate with multipathd, +try to set bigger timeout value via dmmp_context_timeout_set ()" + +* DMMP_ERR_IPC_ERROR -- "Error when communicate with multipathd daemon" + +* DMMP_ERR_NO_DAEMON -- "The multipathd daemon not started" + +* DMMP_ERR_INCOMPATIBLE -- "The multipathd daemon version is not +compatible with current library" + +* Other invalid error number -- "Invalid argument" +.SH "RETURN" +const char *. The meaning of provided error code. diff --git a/libdmmp/docs/libdmmp.h.3 b/libdmmp/docs/man/libdmmp.h.3 similarity index 100% rename from libdmmp/docs/libdmmp.h.3 rename to libdmmp/docs/man/libdmmp.h.3 From patchwork Fri Mar 26 21:29:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167673 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36CB4C433DB for ; Fri, 26 Mar 2021 21:30:58 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CEB4F619F7 for ; Fri, 26 Mar 2021 21:30:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEB4F619F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-86-xlQV5nmBNBmkA9N-l_wUeg-1; Fri, 26 Mar 2021 17:30:54 -0400 X-MC-Unique: xlQV5nmBNBmkA9N-l_wUeg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 84FE6180FCA5; Fri, 26 Mar 2021 21:30:50 +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 63FD7607CB; Fri, 26 Mar 2021 21:30:50 +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 28F29180C5A9; Fri, 26 Mar 2021 21:30:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU8RT001674 for ; Fri, 26 Mar 2021 17:30:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8C7DB21121D1; Fri, 26 Mar 2021 21:30:08 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8608D21121D2 for ; Fri, 26 Mar 2021 21:30:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 05C53801E8D for ; Fri, 26 Mar 2021 21:30:08 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-260-KIahAughPOWBDfaxooWR7g-1; Fri, 26 Mar 2021 17:30:03 -0400 X-MC-Unique: KIahAughPOWBDfaxooWR7g-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3E8D5AF4F; Fri, 26 Mar 2021 21:30:00 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:42 +0100 Message-Id: <20210326212944.3136-6-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU8RT001674 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 5/7] multipath-tools Makefile: build before install X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck "make install" in a clean directory fails. Fix it by making "all" a dependency of "install". Signed-off-by: Martin Wilck --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c5bedcf..7f21db8 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ $(BUILDDIRS:=.uninstall): $(MAKE) -C ${@:.uninstall=} uninstall clean: $(BUILDDIRS.clean) -install: $(BUILDDIRS:=.install) +install: all $(BUILDDIRS:=.install) uninstall: $(BUILDDIRS:=.uninstall) test-progs: all From patchwork Fri Mar 26 21:29:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167677 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AA1CC433C1 for ; Fri, 26 Mar 2021 21:31:09 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B283D619D3 for ; Fri, 26 Mar 2021 21:31:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B283D619D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-139-UvneSkX9NTO-k8ADHYeKAQ-1; Fri, 26 Mar 2021 17:31:04 -0400 X-MC-Unique: UvneSkX9NTO-k8ADHYeKAQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DF62D81426D; Fri, 26 Mar 2021 21:30:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDA835DDAD; Fri, 26 Mar 2021 21:30: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 884EE4A7C9; Fri, 26 Mar 2021 21:30:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU9Go001695 for ; Fri, 26 Mar 2021 17:30:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 879011037B4; Fri, 26 Mar 2021 21:30:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 824441037B1 for ; Fri, 26 Mar 2021 21:30:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1018480C8DB for ; Fri, 26 Mar 2021 21:30:08 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-449-Hj3DB2_wPw-5ZXyNDqAwNQ-1; Fri, 26 Mar 2021 17:30:03 -0400 X-MC-Unique: Hj3DB2_wPw-5ZXyNDqAwNQ-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8640EAF95; Fri, 26 Mar 2021 21:30:00 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:43 +0100 Message-Id: <20210326212944.3136-7-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU9Go001695 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 6/7] fixup "multipath-tools tests: check if /sys/dev/block is non-empty" X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Don't run closedir() if opendir() failed. Fixes: "multipath-tools tests: check if /sys/dev/block is non-empty" Signed-off-by: Martin Wilck --- tests/devt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/devt.c b/tests/devt.c index d971302..0ad100a 100644 --- a/tests/devt.c +++ b/tests/devt.c @@ -37,8 +37,8 @@ static bool sys_dev_block_exists(void) break; } } + closedir(dir); } - closedir(dir); return rc; } From patchwork Fri Mar 26 21:29:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12167675 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF2E5C433DB for ; Fri, 26 Mar 2021 21:31:02 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7848861A2A for ; Fri, 26 Mar 2021 21:31:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7848861A2A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-CFdqDw3YMQ6upBGhCAyGew-1; Fri, 26 Mar 2021 17:30:58 -0400 X-MC-Unique: CFdqDw3YMQ6upBGhCAyGew-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34BBE107B7C3; Fri, 26 Mar 2021 21:30:53 +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 173215D6DC; Fri, 26 Mar 2021 21:30:53 +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 D5C5F180B450; Fri, 26 Mar 2021 21:30:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12QLU9pC001680 for ; Fri, 26 Mar 2021 17:30:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 021E32026D48; Fri, 26 Mar 2021 21:30:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EFFC92026D07 for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BA207803C9F for ; Fri, 26 Mar 2021 21:30:05 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-298-UMO3hp_aN4KhPnxgK0I8JA-1; Fri, 26 Mar 2021 17:30:03 -0400 X-MC-Unique: UMO3hp_aN4KhPnxgK0I8JA-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C9087AF98; Fri, 26 Mar 2021 21:30:00 +0000 (UTC) From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Fri, 26 Mar 2021 22:29:44 +0100 Message-Id: <20210326212944.3136-8-mwilck@suse.com> In-Reply-To: <20210326212944.3136-1-mwilck@suse.com> References: <20210326212944.3136-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 12QLU9pC001680 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 7/7] libmultipath: fix warning with clang 3.5 X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Fixes the following warning with clang 3.5: io_err_stat.c:613:31: error: missing field 'slot' initializer [-Werror,-Wmissing-field-initializers] struct _vector _pathvec = {0,}; Signed-off-by: Martin Wilck --- libmultipath/io_err_stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c index abdd0b4..d8d91f6 100644 --- a/libmultipath/io_err_stat.c +++ b/libmultipath/io_err_stat.c @@ -610,7 +610,7 @@ static void process_async_ios_event(int timeout_nsecs, char *dev) static void service_paths(void) { - struct _vector _pathvec = {0}; + struct _vector _pathvec = { .allocated = 0 }; /* avoid gcc warnings that &_pathvec will never be NULL in vector ops */ struct _vector * const tmp_pathvec = &_pathvec; struct io_err_stat_path *pp;