the device cache file is dumped both in vgscan and clvmd process.
Unfortunately, clvmd calls lvmcache_label_scan,
it properly destroys persistent filter, but during
persistent_filter_dump it merges old cache content back!
This causes that change in filters is not properly propagated
into device cache after vgscan on cluster.
(Only new devices are added.)
https://bugzilla.redhat.com/show_bug.cgi?id=591861
Version 2.02.65 -
=================================
+ Do not merge old device cache after we run full scan. (2.02.56)
Add pkgconfigdir Makefile variable for make install override.
Switch usage of Libs.private: to Requires.private: in devmapper.pc, lvm2app.pc.
Use field Requires.private: for devmapper-event.pc.
* device cache for the benefit of short-lived processes.
*/
if (full_scan == 2 && cmd->is_long_lived && cmd->dump_filter)
- persistent_filter_dump(cmd->filter);
+ persistent_filter_dump(cmd->filter, 0);
r = 1;
void destroy_toolcontext(struct cmd_context *cmd)
{
if (cmd->dump_filter)
- persistent_filter_dump(cmd->filter);
+ persistent_filter_dump(cmd->filter, 1);
archive_exit(cmd);
backup_exit(cmd);
fprintf(fp, "\n\t]\n");
}
-int persistent_filter_dump(struct dev_filter *f)
+int persistent_filter_dump(struct dev_filter *f, int merge_existing)
{
struct pfilter *pf;
char *tmp_file;
/*
* If file contents changed since we loaded it, merge new contents
*/
- if (info.st_ctime != pf->ctime)
+ if (merge_existing && info.st_ctime != pf->ctime)
/* Keep cft open to avoid losing lock */
persistent_filter_load(f, &cft);
int persistent_filter_wipe(struct dev_filter *f);
int persistent_filter_load(struct dev_filter *f, struct config_tree **cft_out);
-int persistent_filter_dump(struct dev_filter *f);
+int persistent_filter_dump(struct dev_filter *f, int merge_existing);
#endif