All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - vdo: just one probe is enough
Date: Wed, 17 Feb 2021 10:54:42 +0000 (GMT)	[thread overview]
Message-ID: <20210217105442.6F06E3857C60@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5bf1dba9eb8a8b77410e386e59dadeb27801b14e
Commit:        5bf1dba9eb8a8b77410e386e59dadeb27801b14e
Parent:        a7cb25c877ad70c48fa66258f8e3f2157e2e2be5
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Feb 17 11:12:11 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Feb 17 11:21:35 2021 +0100

vdo: just one probe is enough

target_present_version() can handle modprobing no need to try it
twice.
---
 lib/vdo/vdo.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lib/vdo/vdo.c b/lib/vdo/vdo.c
index f26874ce5..52e9443ea 100644
--- a/lib/vdo/vdo.c
+++ b/lib/vdo/vdo.c
@@ -414,13 +414,9 @@ static int _vdo_target_present(struct cmd_context *cmd,
 	if (!_vdo_checked) {
 		_vdo_checked = 1;
 
-		if (!target_present_version(cmd, TARGET_NAME_VDO, 0,
-					    &maj, &min, &patchlevel)) {
-			/* Try to load kmod VDO module */
-			if (!module_present(cmd, MODULE_NAME_VDO) ||
-			    !target_version(TARGET_NAME_VDO, &maj, &min, &patchlevel))
-				return 0;
-		}
+		if (!target_present_version(cmd, TARGET_NAME_VDO, 1,
+					    &maj, &min, &patchlevel))
+			return 0;
 
 		if (maj < 6 || (maj == 6 && min < 2)) {
 			log_warn("WARNING: Target %s version %u.%u.%u is too old.",



                 reply	other threads:[~2021-02-17 10:54 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=20210217105442.6F06E3857C60@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.