From dd9927bcde34c3ce595404340961175b2a5b6bab Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 23 Jan 2007 16:03:54 +0000 Subject: [PATCH] Long-lived processes write out persistent dev cache in refresh_toolcontext(). --- WHATS_NEW | 1 + lib/commands/toolcontext.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index eb28d97df..5e752f4ef 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.20 - =================================== + Long-lived processes write out persistent dev cache in refresh_toolcontext(). Fix refresh_toolcontext() always to wipe persistent device filter cache. Add is_long_lived to toolcontext. Add --clustered to man pages. diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index 02747df48..480a8a821 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -1080,6 +1080,13 @@ 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; return 1; }