mirror of https://github.com/jimsalterjrs/sanoid
Merge pull request #946 from rightaditya/master
Fix single quotes that should be double quotes
This commit is contained in:
commit
826d4d1c07
12
sanoid
12
sanoid
|
|
@ -868,10 +868,10 @@ sub getsnaps {
|
||||||
@rawsnaps = <FH>;
|
@rawsnaps = <FH>;
|
||||||
close FH;
|
close FH;
|
||||||
|
|
||||||
open FH, "> $cache.tmp" or die 'Could not write to $cache.tmp!\n';
|
open FH, "> $cache.tmp" or die "Could not write to $cache.tmp!\n";
|
||||||
print FH @rawsnaps;
|
print FH @rawsnaps;
|
||||||
close FH;
|
close FH;
|
||||||
rename("$cache.tmp", "$cache") or die 'Could not rename to $cache!\n';
|
rename("$cache.tmp", "$cache") or die "Could not rename to $cache!\n";
|
||||||
removelock('sanoid_cacheupdate');
|
removelock('sanoid_cacheupdate');
|
||||||
} else {
|
} else {
|
||||||
if ($args{'verbose'}) { print "INFO: deferring cache update - valid cache update lock held by another sanoid process.\n"; }
|
if ($args{'verbose'}) { print "INFO: deferring cache update - valid cache update lock held by another sanoid process.\n"; }
|
||||||
|
|
@ -1106,10 +1106,10 @@ sub init {
|
||||||
print "INFO: dataset cache expired - updating from zfs list.\n";
|
print "INFO: dataset cache expired - updating from zfs list.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open FH, "> $cachedatasetspath.tmp" or die 'Could not write to $cachedatasetspath.tmp!\n';
|
open FH, "> $cachedatasetspath.tmp" or die "Could not write to $cachedatasetspath.tmp!\n";
|
||||||
print FH @updatedatasets;
|
print FH @updatedatasets;
|
||||||
close FH;
|
close FH;
|
||||||
rename("$cachedatasetspath.tmp", "$cachedatasetspath") or die 'Could not rename to $cachedatasetspath!\n';
|
rename("$cachedatasetspath.tmp", "$cachedatasetspath") or die "Could not rename to $cachedatasetspath!\n";
|
||||||
removelock('sanoid_cachedatasetupdate');
|
removelock('sanoid_cachedatasetupdate');
|
||||||
} else {
|
} else {
|
||||||
if ($args{'verbose'}) { print "INFO: deferring dataset cache update - valid cache update lock held by another sanoid process.\n"; }
|
if ($args{'verbose'}) { print "INFO: deferring dataset cache update - valid cache update lock held by another sanoid process.\n"; }
|
||||||
|
|
@ -1733,14 +1733,14 @@ sub removecachedsnapshots {
|
||||||
my @rawsnaps = <FH>;
|
my @rawsnaps = <FH>;
|
||||||
close FH;
|
close FH;
|
||||||
|
|
||||||
open FH, "> $cache.tmp" or die 'Could not write to $cache.tmp!\n';
|
open FH, "> $cache.tmp" or die "Could not write to $cache.tmp!\n";
|
||||||
foreach my $snapline ( @rawsnaps ) {
|
foreach my $snapline ( @rawsnaps ) {
|
||||||
my @columns = split("\t", $snapline);
|
my @columns = split("\t", $snapline);
|
||||||
my $snap = $columns[0];
|
my $snap = $columns[0];
|
||||||
print FH $snapline unless ( exists($pruned{$snap}) );
|
print FH $snapline unless ( exists($pruned{$snap}) );
|
||||||
}
|
}
|
||||||
close FH;
|
close FH;
|
||||||
rename("$cache.tmp", "$cache") or die 'Could not rename to $cache!\n';
|
rename("$cache.tmp", "$cache") or die "Could not rename to $cache!\n";
|
||||||
|
|
||||||
removelock('sanoid_cacheupdate');
|
removelock('sanoid_cacheupdate');
|
||||||
%snaps = getsnaps(\%config,$cacheTTL,0);
|
%snaps = getsnaps(\%config,$cacheTTL,0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue