mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Don't bother to write out an empty cache.
This commit is contained in:
parent
b849de1d18
commit
c50c2886f7
@ -141,7 +141,12 @@ int persistent_filter_dump(struct dev_filter *f)
|
||||
struct pfilter *pf = (struct pfilter *) f->private;
|
||||
|
||||
FILE *fp;
|
||||
|
||||
|
||||
if (!hash_get_num_entries(pf->devices)) {
|
||||
log_very_verbose("Internal persistent device cache empty "
|
||||
"- not writing to %s", pf->file);
|
||||
return 0;
|
||||
}
|
||||
log_very_verbose("Dumping persistent device cache to %s", pf->file);
|
||||
|
||||
fp = fopen(pf->file, "w");
|
||||
|
Loading…
Reference in New Issue
Block a user