From patchwork Thu Sep 24 04:59:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 11796113 X-Patchwork-Delegate: christophe.varoqui@free.fr 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 8578459D for ; Thu, 24 Sep 2020 05:00:04 +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-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C6A3235F7 for ; Thu, 24 Sep 2020 05:00:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HCl6x4WM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C6A3235F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600923602; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6M9wvLANak0uZMqn9+XTa6D9AMy+mzglsTjmkVcYXIY=; b=HCl6x4WMKjsZcQFzx26D0orq/AXkL2FfS9dozQrg0ip2c0gZq5mqIk4ptgnA5kWt6n0SAM ZrWR+qMbHZNWsLJYnDukQss+jtD43o2lA1l0//6Y2qYgouNKgEhYj4K0cXHFy0G32D+/gU +JZ9+i4ppCKJKYtT/sH2SECWILzO+4Y= 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-397-cu5SzPsIPfqsGoHJco6SZg-1; Thu, 24 Sep 2020 01:00:00 -0400 X-MC-Unique: cu5SzPsIPfqsGoHJco6SZg-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 3DDF7800493; Thu, 24 Sep 2020 04:59:56 +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 F261560C15; Thu, 24 Sep 2020 04:59: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 C74F4180B656; Thu, 24 Sep 2020 04:59:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08O4xcoU024623 for ; Thu, 24 Sep 2020 00:59:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6624A5D990; Thu, 24 Sep 2020 04:59:38 +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 B46055D733; Thu, 24 Sep 2020 04:59:34 +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 08O4xXOV017462; Wed, 23 Sep 2020 23:59:33 -0500 Received: (from bmarzins@localhost) by octiron.msp.redhat.com (8.14.9/8.14.9/Submit) id 08O4xXYO017461; Wed, 23 Sep 2020 23:59:33 -0500 From: Benjamin Marzinski To: Christophe Varoqui Date: Wed, 23 Sep 2020 23:59:29 -0500 Message-Id: <1600923569-17412-4-git-send-email-bmarzins@redhat.com> In-Reply-To: <1600923569-17412-1-git-send-email-bmarzins@redhat.com> References: <1600923569-17412-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: dm-devel@redhat.com Cc: device-mapper development , Martin Wilck Subject: [dm-devel] [RFC PATCH v2 3/3] libmultipath: change log level for null uid_attribute 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.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 If uid_attribute is explicitly set to an empty string, multipath should log the uid at the default log level, since using the fallback code is the expected behavior. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index f650534f..435f2639 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -2091,7 +2091,8 @@ get_uid (struct path * pp, int path_state, struct udev_device *udev, } if ((!udev_available || (len <= 0 && allow_fallback)) && has_uid_fallback(pp)) { - used_fallback = 1; + if (udev_available || !(udev && pp->uid_attribute)) + used_fallback = 1; len = uid_fallback(pp, path_state, &origin); } }