*/
void lvmetad_release_token(void);
+// FIXME What's described here doesn't appear to be implemented yet.
/*
* Send a new version of VG metadata to lvmetad. This is normally called after
* vg_write but before vg_commit. After vg_commit, lvmetad_vg_commit is called
}
}
+ /*
+ * If precommit is not supported, changes take effect immediately.
+ * FIXME Replace with a more-accurate FMT_COMMIT flag.
+ */
+ if (!(vg->fid->fmt->features & FMT_PRECOMMIT) && !lvmetad_vg_update(vg))
+ return_0;
+
return 1;
}
return cache_updated;
}
- if (!lvmetad_vg_update(vg))
- return 0;
+ /* Skip if we already did this in vg_write */
+ if ((vg->fid->fmt->features & FMT_PRECOMMIT) && !lvmetad_vg_update(vg))
+ return_0;
cache_updated = _vg_commit_mdas(vg);
lvid = (const union lvid *) lvid_s;
- log_very_verbose("Finding volume group for uuid %s", lvid_s);
+ log_very_verbose("Finding %svolume group for uuid %s", precommitted ? "precommitted " : "", lvid_s);
if (!(vg = _vg_read_by_vgid(cmd, (const char *)lvid->id[0].uuid, precommitted))) {
log_error("Volume group for uuid not found: %s", lvid_s);
return NULL;
return NULL;
}
-
const char *find_vgname_from_pvid(struct cmd_context *cmd,
const char *pvid)
{