linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Marappan, Gopinath" <Gopinath.Marappan@dell.com>
To: "linux-lvm@redhat.com" <linux-lvm@redhat.com>
Cc: "parakunnath, remesh" <Remesh.Parakunnath@dell.com>,
	"Rajappa, Ajaykumar" <Ajaykumar.Rajappa@Dell.com>,
	"Tarikere, Madhu" <Madhu.Tarikere@dell.com>
Subject: [linux-lvm] Fix for Bug 2109351 - multipath_component_detection = 0 in lvm.conf does not have any effect
Date: Thu, 21 Jul 2022 06:52:09 +0000	[thread overview]
Message-ID: <DM6PR19MB249191C1C763815BDDFE998588919@DM6PR19MB2491.namprd19.prod.outlook.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1443 bytes --]

Regarding a fix for this bug -  https://bugzilla.redhat.com/show_bug.cgi?id=2109351

multipath_component_detection parameter is not considered when lvm scans for PVs.

This patch should fix that issue.  It ensures that the multipath_component_detction parameter
from lvm.conf is considered before checking for duplicated PVIDs and ignoring them if they are
multipath components.

I have built the patch and verified that it works.

diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 22edcfd84..892636aa7 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -898,7 +898,8 @@ next:
        /*
         * Get rid of multipath components based on matching wwids.
         */
-       if (_all_multipath_components(cmd, info, pvid, &altdevs, &dev_mpath)) {
+        if ( find_config_tree_bool(cmd, devices_multipath_component_detection_CFG, NULL) &&
+             _all_multipath_components(cmd, info, pvid, &altdevs, &dev_mpath) ){
                if (info && dev_mpath && (info->dev != dev_mpath)) {
                        /*
                         * info should be dropped from lvmcache and info->dev

I tried to create a pull request on https://github.com/lvmteam/lvm2, but I couldn't as I don't have access.

If I am granted access to the lvm2 github repo, I can create a PR for this patch.

Kindly let me know how to proceed with this.

Thanks,
Gopi



Internal Use - Confidential

[-- Attachment #1.2: Type: text/html, Size: 6391 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

                 reply	other threads:[~2022-07-26  8:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR19MB249191C1C763815BDDFE998588919@DM6PR19MB2491.namprd19.prod.outlook.com \
    --to=gopinath.marappan@dell.com \
    --cc=Ajaykumar.Rajappa@Dell.com \
    --cc=Madhu.Tarikere@dell.com \
    --cc=Remesh.Parakunnath@dell.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).