From patchwork Tue Oct 30 21:06:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 10661757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D86714E2 for ; Tue, 30 Oct 2018 22:39:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E25F2AB4A for ; Tue, 30 Oct 2018 22:39:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42B802AB73; Tue, 30 Oct 2018 22:39:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD4F32AB4A for ; Tue, 30 Oct 2018 22:39:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EBCF230832D8; Tue, 30 Oct 2018 22:39:11 +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 BE3175D75D; Tue, 30 Oct 2018 22:39:11 +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 7839C4CAA0; Tue, 30 Oct 2018 22:39:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w9UL7QQu001039 for ; Tue, 30 Oct 2018 17:07:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC2D46251E; Tue, 30 Oct 2018 21:07:26 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 512AA17B96; Tue, 30 Oct 2018 21:07:23 +0000 (UTC) Received: from smtp2.provo.novell.com (smtp2.provo.novell.com [137.65.250.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30A5B3001E4C; Tue, 30 Oct 2018 21:07:22 +0000 (UTC) Received: from apollon.suse.de.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Tue, 30 Oct 2018 15:07:18 -0600 From: Martin Wilck To: Christophe Varoqui Date: Tue, 30 Oct 2018 22:06:31 +0100 Message-Id: <20181030210653.29677-1-mwilck@suse.com> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 30 Oct 2018 21:07:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 30 Oct 2018 21:07:22 +0000 (UTC) for IP:'137.65.250.81' DOMAIN:'smtp2.provo.novell.com' HELO:'smtp2.provo.novell.com' FROM:'mwilck@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.81 smtp2.provo.novell.com 137.65.250.81 smtp2.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: Martin Wilck , dm-devel@redhat.com Subject: [dm-devel] [PATCH v3 00/22] libmultipath: checkers overhaul 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 30 Oct 2018 22:39:12 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Hi Christophe, This is v3 of my "checkers overhaul" series. Like v2, it's based on the previous "various multipath-tools patches" series. I'm resending only those patches that have changed wrt v1 from Oct. 12th. Let me know if you need the complete set. I kept Ben's Reviewed-by: tag in 21/22, as it really changed only in a trivial way. This series starts with a few minor fixes and then attempts an overhaul of the checker code. First, there's a block of patches to get rid of the "message" char array in struct checker, replacing it with an integer. This topic had been touched in recent discussion between Ben and myself. The next larger block fixes problems with checkers that try to check unsupported devices. It's an interesting experience to configure wrong checkers for the existing devices and see what happens. With these patches, paths won't be falsely teared down any more in such situations. The last patch cleans up the checker data structure by splitting it into a "checker class" and the path "checker instance". There's more work to do in this area, but this is a start. Regards, Martin ---- Changes v2->v3: - 03/22: fixed one minor issue mentioned by Ben; reverted the const-ification of checker_message(), as it will be reverted in 22/22 anyway. - 13/22: fix clariion checker semantics (Ben). - 21/22: rebased on top of updated 03/22. - 22/22: fix thread-safety issue from 03/22 (Ben). Changes v1->v2: - 11/22: rebased on top of "various multipath-tools patches" series Martin Wilck (22): libmultipath: fix use of uninitialized memory in write() libmultipath: fix memory leaks from scandir() use libmultipath/checkers: replace message by msgid libmultipath/checkers: cciss_tur: use message id libmultipath/checkers: directio: use message id libmultipath/checkers: emc_clariion: use message id libmultipath/checkers: hp_sw: use message id libmultipath/checkers: rdac: use message id libmultipath/checkers: readsector0: use message id libmultipath/checkers: tur: use message id multipathd: improve checker message logging libmultipath/checkers: support unsupported paths libmultipath: clariion checker: leave unsupported paths alone libmultipath: hp_sw checker: leave unsupported paths alone libmultipath: rdac checker: leave unsupported paths alone libmultipath: tur checker: leave unsupported paths alone libmultipath: pathinfo: don't blank wwid if checker fails multipathd: check_path: improve logging for "unusable path" case libmultipath: coalesce_paths: improve logging of orphaned paths libmultipath: sync_map_state: log failing paths libmultipath/checkers: cleanup class/instance model libmultipath: make checker_message thread safe libmultipath/checkers.c | 209 ++++++++++++++++++--------- libmultipath/checkers.h | 67 ++++++--- libmultipath/checkers/cciss_tur.c | 13 +- libmultipath/checkers/directio.c | 29 ++-- libmultipath/checkers/emc_clariion.c | 114 ++++++++++++--- libmultipath/checkers/hp_sw.c | 39 +++-- libmultipath/checkers/rdac.c | 92 ++++++++---- libmultipath/checkers/readsector0.c | 7 +- libmultipath/checkers/tur.c | 60 ++++---- libmultipath/config.c | 10 +- libmultipath/configure.c | 10 +- libmultipath/discovery.c | 16 +- libmultipath/foreign.c | 5 +- libmultipath/foreign/nvme.c | 6 +- libmultipath/print.c | 2 +- libmultipath/propsel.c | 19 +-- libmultipath/structs_vec.c | 5 +- libmultipath/sysfs.c | 5 +- libmultipath/util.c | 9 ++ libmultipath/util.h | 9 ++ multipathd/main.c | 35 +++-- 21 files changed, 519 insertions(+), 242 deletions(-)