summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-05-25 16:10:46 -0500
committerDavid Teigland <teigland@redhat.com>2016-06-07 10:17:00 -0500
commit851ccfccaf3dae184e0bd5f222bdcfcef33fa3b8 (patch)
tree8b32360b3e6ee71cb8f0da7ad407d077051dae75
parent0e7f352c70decb779508b038a22e87c8e3f58b61 (diff)
downloadlvm2-851ccfccaf3dae184e0bd5f222bdcfcef33fa3b8.tar.gz
lvmetad: remove disabled case for "scan error"
Failures while populating lvmetad will be handling differently in a subsequent commit.
-rw-r--r--daemons/lvmetad/lvmetad-client.h1
-rw-r--r--daemons/lvmetad/lvmetad-core.c10
-rw-r--r--lib/cache/lvmetad.c6
3 files changed, 3 insertions, 14 deletions
diff --git a/daemons/lvmetad/lvmetad-client.h b/daemons/lvmetad/lvmetad-client.h
index 47eb6b47f..b352c0449 100644
--- a/daemons/lvmetad/lvmetad-client.h
+++ b/daemons/lvmetad/lvmetad-client.h
@@ -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;
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index f9d0d4ce5..51db92fa8 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -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])
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index a87c952ae..bb86e8890 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -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>";
}