Commit 1932d44e authored by Mike Hibler's avatar Mike Hibler

Enough with the isdelta() already!

parent 04e1b0d9
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2000-2015 University of Utah and the Flux Group. # Copyright (c) 2000-2016 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -1170,7 +1170,7 @@ sub SetupReloadFrisbee($) ...@@ -1170,7 +1170,7 @@ sub SetupReloadFrisbee($)
# only prepare on first image # only prepare on first image
my $prepare0 = $idx == 1 && $prepare ? 1 : 0; my $prepare0 = $idx == 1 && $prepare ? 1 : 0;
# only zero on full images # only zero on full images
my $zerofree0 = $image->isdelta() ? 0 : $zerofree; my $zerofree0 = $image->HaveFullImage() ? $zerofree : 0;
my $query_result = my $query_result =
DBQueryWarn("insert into current_reloads ". DBQueryWarn("insert into current_reloads ".
......
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2000-2015 University of Utah and the Flux Group. # Copyright (c) 2000-2016 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -2334,7 +2334,7 @@ sub SetupReload($$) ...@@ -2334,7 +2334,7 @@ sub SetupReload($$)
if ($WITHPROVENANCE && $WITHDELTAS) { if ($WITHPROVENANCE && $WITHDELTAS) {
my $founddelta = 0; my $founddelta = 0;
foreach my $image (@images) { foreach my $image (@images) {
if ($image->isdelta()) { if (!$image->HaveFullImage()) {
my $pimage = $image; my $pimage = $image;
my @ilist = (); my @ilist = ();
do { do {
...@@ -2345,7 +2345,7 @@ sub SetupReload($$) ...@@ -2345,7 +2345,7 @@ sub SetupReload($$)
goto failednode; goto failednode;
} }
push(@ilist, $pimage); push(@ilist, $pimage);
} while ($pimage->isdelta()); } while (!$pimage->HaveFullImage());
push @allimages, reverse(@ilist); push @allimages, reverse(@ilist);
$founddelta = 1; $founddelta = 1;
} }
...@@ -2385,7 +2385,7 @@ sub SetupReload($$) ...@@ -2385,7 +2385,7 @@ sub SetupReload($$)
# only prepare the first image # only prepare the first image
my $prepare0 = $idx == 1 && $prepare ? 1 : 0; my $prepare0 = $idx == 1 && $prepare ? 1 : 0;
# only zero when loading full images # only zero when loading full images
my $zerofree0 = $image->isdelta() ? 0: $zerofree; my $zerofree0 = $image->HaveFullImage() ? $zerofree : 0;
# XXX windows load # XXX windows load
my $format = $image->format(); my $format = $image->format();
......
...@@ -451,7 +451,6 @@ class Image ...@@ -451,7 +451,6 @@ class Image
function logfileid() { return $this->field("logfileid"); } function logfileid() { return $this->field("logfileid"); }
function noexport() { return $this->field("noexport"); } function noexport() { return $this->field("noexport"); }
function ready() { return $this->field("ready"); } function ready() { return $this->field("ready"); }
function isdelta() { return $this->field("isdelta"); }
function isdataset() { return $this->field("isdataset"); } function isdataset() { return $this->field("isdataset"); }
function nodelta() { return $this->field("nodelta"); } function nodelta() { return $this->field("nodelta"); }
function released() { return $this->field("released"); } function released() { return $this->field("released"); }
...@@ -906,7 +905,7 @@ class Image ...@@ -906,7 +905,7 @@ class Image
if ($DOPROVENANCE) { if ($DOPROVENANCE) {
$released = $this->released(); $released = $this->released();
$ready = $this->ready(); $ready = $this->ready();
$isdelta = $this->isdelta(); $isdelta = $this->size() ? 0 : 1;
$nodelta = $this->nodelta(); $nodelta = $this->nodelta();
echo "<tr> echo "<tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment