mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
lvmetad: remove disabled case for "scan error"
Failures while populating lvmetad will be handling differently in a subsequent commit.
This commit is contained in:
parent
0e7f352c70
commit
851ccfccaf
@ -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;
|
||||
|
||||
|
@ -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])
|
||||
|
6
lib/cache/lvmetad.c
vendored
6
lib/cache/lvmetad.c
vendored
@ -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>";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user