From patchwork Tue Jun 9 21:35:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 11596639 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 373831391 for ; Tue, 9 Jun 2020 21:35:48 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DBDEF20734 for ; Tue, 9 Jun 2020 21:35:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DzTF0BJ9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBDEF20734 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591738546; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Y2BKC3w7l+z66wa31SnSF8q+2Bd25OQr0kHtQw++hK8=; b=DzTF0BJ9OnMG3To2lQra7IEdMHrSyGKFh5a/m9d8exHEJQXcBaZS789yMx3maJKWi2LqZA TwmDqmNrrljBRTLlT55TSthsVoX8DmY9izoEzCs/+Sw0S7AJSu2qZwbFj7TdbHjciWXvIv qASHPK/TOELDmqIw8eQjTgReigeAglI= 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-217-4lrkiKgfPkWYWDqUXzUKEg-1; Tue, 09 Jun 2020 17:35:44 -0400 X-MC-Unique: 4lrkiKgfPkWYWDqUXzUKEg-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 A93BF107ACCD; Tue, 9 Jun 2020 21:35:39 +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 E68AE1001901; Tue, 9 Jun 2020 21:35:38 +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 367FDB3498; Tue, 9 Jun 2020 21:35:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 059LZYI9029275 for ; Tue, 9 Jun 2020 17:35:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 676297BFE9; Tue, 9 Jun 2020 21:35:34 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from octiron.msp.redhat.com (octiron.msp.redhat.com [10.15.80.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 84ECC7BFE3; Tue, 9 Jun 2020 21:35:31 +0000 (UTC) Received: from octiron.msp.redhat.com (localhost.localdomain [127.0.0.1]) by octiron.msp.redhat.com (8.14.9/8.14.9) with ESMTP id 059LZTBx026846; Tue, 9 Jun 2020 16:35:30 -0500 Received: (from bmarzins@localhost) by octiron.msp.redhat.com (8.14.9/8.14.9/Submit) id 059LZTnD026845; Tue, 9 Jun 2020 16:35:29 -0500 From: Benjamin Marzinski To: Christophe Varoqui Date: Tue, 9 Jun 2020 16:35:26 -0500 Message-Id: <1591738529-26810-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: device-mapper development , Nikhil Kshirsagar , Martin Wilck Subject: [dm-devel] [PATCH v2 0/3] multipath: change default devnode blacklist 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: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com I recently got a request to add the Oracle ASM filer driver devices to multipath's builtin devnode blacklist. However, instead of having to do always this for each device type individually, I decided to make multipath blacklist all non scsi, nvme, and dasd devnodes by default. This is what the multipath udev rules already do. Changes from v1: Everything. Martin suggested an alternative method for doing this, which is to treat an exclamation mark at the start of the blacklist/exceptions regexes as inverting the matching on the rest of the regex. Benjamin Marzinski (3): libmultipath: remove _blacklist_exceptions functions libmultipath: fix parser issue with comments in strings libmultipath: invert regexes that start with exclamation point libmultipath/blacklist.c | 103 +++++++++++++++------------------- libmultipath/blacklist.h | 3 + libmultipath/parser.c | 4 +- multipath/multipath.conf.5 | 17 ++++-- tests/blacklist.c | 110 +++++++++++++++++++++++++++++++++++++ tests/parser.c | 42 ++++++++++++++ tests/test-lib.c | 2 +- 7 files changed, 215 insertions(+), 66 deletions(-) Reviewed-by: Martin Wilck