diff options
Diffstat (limited to 'lib/label/hints.c')
-rw-r--r-- | lib/label/hints.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/label/hints.c b/lib/label/hints.c index c2eb71ee0..8fc01a13e 100644 --- a/lib/label/hints.c +++ b/lib/label/hints.c @@ -156,6 +156,7 @@ #include <sys/file.h> #include <sys/sysmacros.h> +/* FIXME: move online pv functions to pvs_online.c */ int online_pvid_file_read(char *path, int *major, int *minor, char *vgname); static const char *_hints_file = DEFAULT_RUN_DIR "/hints"; @@ -1405,7 +1406,7 @@ int get_hints(struct cmd_context *cmd, struct dm_list *hints_out, int *newhints, *newhints = NEWHINTS_NONE; /* No commands are using hints. */ - if (!cmd->enable_hints) + if (!cmd->enable_hints && !cmd->hints_pvs_online) return 0; /* @@ -1425,7 +1426,11 @@ int get_hints(struct cmd_context *cmd, struct dm_list *hints_out, int *newhints, if (!cmd->use_hints) return 0; - /* hints = "pvs_online" */ + /* + * enable_hints is 0 for the special hints=pvs_online + * and by lvm.conf hints="none" does not disable hints=pvs_online. + * hints=pvs_online can be disabled with --nohints. + */ if (cmd->hints_pvs_online) { if (!_get_hints_from_pvs_online(cmd, &hints_list, devs_in, devs_out)) { log_debug("get_hints: pvs_online failed"); |