]> sourceware.org Git - lvm2.git/commitdiff
lvmetad: remove disabled case for "scan error"
authorDavid Teigland <teigland@redhat.com>
Wed, 25 May 2016 21:10:46 +0000 (16:10 -0500)
committerDavid Teigland <teigland@redhat.com>
Tue, 7 Jun 2016 15:17:00 +0000 (10:17 -0500)
Failures while populating lvmetad will be handling
differently in a subsequent commit.

daemons/lvmetad/lvmetad-client.h
daemons/lvmetad/lvmetad-core.c
lib/cache/lvmetad.c

index 47eb6b47f4ff85632b0612e187c99285962cedc6..b352c044998876d20f40fbf966c98a089ac64b21 100644 (file)
@@ -24,7 +24,6 @@
 #define LVMETAD_DISABLE_REASON_DIRECT          "DIRECT"
 #define LVMETAD_DISABLE_REASON_LVM1            "LVM1"
 #define LVMETAD_DISABLE_REASON_DUPLICATES      "DUPLICATES"
-#define LVMETAD_DISABLE_REASON_SCANERROR       "SCANERROR"
 
 struct volume_group;
 
index f9d0d4ce5397db657d0b0b8e06b6171879ad5fc1..51db92fa8f0c553b5c43f12f6b318a50469a6d63 100644 (file)
@@ -202,9 +202,8 @@ struct vg_info {
 #define GLFL_DISABLE_REASON_DIRECT     0x00000004
 #define GLFL_DISABLE_REASON_LVM1       0x00000008
 #define GLFL_DISABLE_REASON_DUPLICATES 0x00000010
-#define GLFL_DISABLE_REASON_SCANERROR  0x00000020
 
-#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_LVM1 | GLFL_DISABLE_REASON_DUPLICATES | GLFL_DISABLE_REASON_SCANERROR)
+#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_LVM1 | GLFL_DISABLE_REASON_DUPLICATES)
 
 #define VGFL_INVALID 0x00000001
 
@@ -2333,8 +2332,6 @@ static response set_global_info(lvmetad_state *s, request r)
                        reason_flags |= GLFL_DISABLE_REASON_LVM1;
                if (strstr(reason, LVMETAD_DISABLE_REASON_DUPLICATES))
                        reason_flags |= GLFL_DISABLE_REASON_DUPLICATES;
-               if (strstr(reason, LVMETAD_DISABLE_REASON_SCANERROR))
-                       reason_flags |= GLFL_DISABLE_REASON_SCANERROR;
        }
 
        if (global_invalid != -1) {
@@ -2388,11 +2385,10 @@ static response get_global_info(lvmetad_state *s, request r)
        memset(reason, 0, sizeof(reason));
 
        if (s->flags & GLFL_DISABLE) {
-               snprintf(reason, REASON_BUF_SIZE - 1, "%s%s%s%s",
+               snprintf(reason, REASON_BUF_SIZE - 1, "%s%s%s",
                         (s->flags & GLFL_DISABLE_REASON_DIRECT)     ? LVMETAD_DISABLE_REASON_DIRECT "," : "",
                         (s->flags & GLFL_DISABLE_REASON_LVM1)       ? LVMETAD_DISABLE_REASON_LVM1 "," : "",
-                        (s->flags & GLFL_DISABLE_REASON_DUPLICATES) ? LVMETAD_DISABLE_REASON_DUPLICATES "," : "",
-                        (s->flags & GLFL_DISABLE_REASON_SCANERROR)  ? LVMETAD_DISABLE_REASON_SCANERROR "," : "");
+                        (s->flags & GLFL_DISABLE_REASON_DUPLICATES) ? LVMETAD_DISABLE_REASON_DUPLICATES "," : "");
        }
 
        if (!reason[0])
index a87c952aeb383bd5eec4e5202961b6c565353065..bb86e8890e68af6776468479874e0d74345a99de 100644 (file)
@@ -1792,9 +1792,6 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, int do_wait)
 
        dev_iter_destroy(iter);
 
-       if (!ret)
-               lvmetad_set_disabled(cmd, LVMETAD_DISABLE_REASON_SCANERROR);
-
        _lvmetad_token = future_token;
        if (!_token_update(NULL)) {
                log_error("Failed to update lvmetad token after device scan.");
@@ -2401,9 +2398,6 @@ int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason)
                } else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_DUPLICATES)) {
                        *reason = "duplicate PVs were found";
 
-               } else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_SCANERROR)) {
-                       *reason = "scanning devices failed";
-
                } else {
                        *reason = "<unknown>";
                }
This page took 0.045656 seconds and 5 git commands to generate.