[pve-devel] r4960 - pve-common/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue Aug 10 11:41:05 CEST 2010
Author: dietmar
Date: 2010-08-10 09:41:05 +0000 (Tue, 10 Aug 2010)
New Revision: 4960
Modified:
pve-common/trunk/ChangeLog
pve-common/trunk/INotify.pm
Log:
* INotify.pm (parse_ccache_options): new shadow option
Modified: pve-common/trunk/ChangeLog
===================================================================
--- pve-common/trunk/ChangeLog 2010-08-10 09:34:35 UTC (rev 4959)
+++ pve-common/trunk/ChangeLog 2010-08-10 09:41:05 UTC (rev 4960)
@@ -0,0 +1,4 @@
+2010-08-10 Proxmox Support Team <support at proxmox.com>
+
+ * INotify.pm (parse_ccache_options): new shadow option
+
Modified: pve-common/trunk/INotify.pm
===================================================================
--- pve-common/trunk/INotify.pm 2010-08-10 09:34:35 UTC (rev 4959)
+++ pve-common/trunk/INotify.pm 2010-08-10 09:41:05 UTC (rev 4960)
@@ -17,6 +17,7 @@
my $inotify;
my $inotify_pid = 0;
my $versions;
+my $shadowfiles = {};
# to enable cached operation, you need to call 'inotify_init'
# inotify handles are a limited resource, so use with care (only
@@ -24,11 +25,6 @@
# Note: please close the inotify handle after you fork
-# fixme: remove somehow
-my $shadowfiles = {
- '/etc/network/interfaces' => '/etc/network/interfaces.new',
-};
-
sub ccache_default_writer {
my ($filename, $data) = @_;
@@ -278,6 +274,8 @@
$ccinfo->{$opt} = $v;
} elsif ($opt eq 'nocache') {
$ccinfo->{$opt} = $v;
+ } elsif ($opt eq 'shadow') {
+ $ccinfo->{$opt} = $v;
} elsif ($opt eq 'noclone') {
# noclone flag for large read-only data chunks like aplinfo
$ccinfo->{$opt} = $v;
@@ -307,6 +305,10 @@
$ccinfo->{update} = $update;
parse_ccache_options($ccinfo, %options);
+
+ if ($options{shadow}) {
+ $shadowfiles->{$filename} = $options{shadow};
+ }
$ccachemap->{$id} = $filename;
$ccache->{$filename} = $ccinfo;
More information about the pve-devel
mailing list