]> sourceware.org Git - lvm2.git/commitdiff
vdo: just one probe is enough
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 17 Feb 2021 10:12:11 +0000 (11:12 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 17 Feb 2021 10:21:35 +0000 (11:21 +0100)
target_present_version() can handle modprobing no need to try it
twice.

lib/vdo/vdo.c

index f26874ce57c26456a32426c16e4167574cf2ba8b..52e9443ea755f8c6cf1bba998c10250387b60436 100644 (file)
@@ -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.",
This page took 0.035855 seconds and 5 git commands to generate.