1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Move persistent filter dump to more appropriate place.

After context_refresh is cache empty, the cache flush
does nothing.

Call it after lvmcache full rescan if running from
log lived process.
This commit is contained in:
Milan Broz 2009-11-24 16:11:37 +00:00
parent e1ab01e3ad
commit cd501dd440
3 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.56 -
====================================
Move persistent filter dump to more appropriate place.
Refresh device filters before full device rescan in lvmcache.
Return error status if vgchange fails to activate some volume.
Fix memory lock imbalance in locking code.

View File

@ -20,6 +20,7 @@
#include "locking.h"
#include "metadata.h"
#include "filter.h"
#include "filter-persistent.h"
#include "memlock.h"
#include "str_list.h"
#include "format-text.h"
@ -533,6 +534,13 @@ int lvmcache_label_scan(struct cmd_context *cmd, int full_scan)
goto out;
}
/*
* If we are a long-lived process, write out the updated persistent
* 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);
r = 1;
out:

View File

@ -1291,13 +1291,6 @@ int refresh_toolcontext(struct cmd_context *cmd)
if (!_init_segtypes(cmd))
return 0;
/*
* If we are a long-lived process, write out the updated persistent
* device cache for the benefit of short-lived processes.
*/
if (cmd->is_long_lived && cmd->dump_filter)
persistent_filter_dump(cmd->filter);
cmd->config_valid = 1;
reset_lvm_errno(1);