master - pvresize: Fix orphan PV size calculation.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5eee73bd7cb8e4...
Commit: 5eee73bd7cb8e4712ad5e5d13a3bffb78e02c9ca
Parent: ebac2ed5be9ba2bd4c606209f1a9396e32dafe88
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Jan 17 01:12:04 2014 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Jan 17 01:12:04 2014 +0000
pvresize: Fix orphan PV size calculation.
The size of any metadata must be ignored when calculating the size of an
orphan PV.
Bug introduced by 603b45e0ed1032875f587eda3391c47b6652303c ("pvresize: Do
not use pv_read (get the PV from orphan VG).")
---
lib/format_text/format-text.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 22d772f..6e309a3 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -2278,7 +2278,7 @@ static int _text_pv_resize(const struct format_type *fmt,
}
/* If there's a VG, reduce size by counting in pe_start and metadata areas. */
- if (vg) {
+ if (vg && !is_orphan_vg(vg->name)) {
size_reduction = pv_pe_start(pv);
if ((mda = fid_get_mda_indexed(fid, pvid, ID_LEN, 1)) &&
(mdac = mda->metadata_locn))
10 years, 3 months
master - pvresize: Avoid archiving orphan VG metadata.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ebac2ed5be9ba2...
Commit: ebac2ed5be9ba2bd4c606209f1a9396e32dafe88
Parent: b662f3c8dd52f489a8f5b5eeb69bc37ea40ff768
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jan 16 23:02:59 2014 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jan 16 23:02:59 2014 +0000
pvresize: Avoid archiving orphan VG metadata.
Block creations of archive and backup files for internal orphan VGs.
Bug introduced by 603b45e0ed1032875f587eda3391c47b6652303c ("pvresize: Do
not use pv_read (get the PV from orphan VG).")
---
lib/format_text/archiver.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index c1fe3f5..31d17ef 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -111,6 +111,10 @@ static int __archive(struct volume_group *vg)
int archive(struct volume_group *vg)
{
+ /* Don't archive orphan VGs. */
+ if (is_orphan_vg(vg->name))
+ return 1;
+
if (vg_is_archived(vg))
return 1; /* VG has been already archived */
@@ -251,6 +255,10 @@ int backup_locally(struct volume_group *vg)
int backup(struct volume_group *vg)
{
+ /* Don't back up orphan VGs. */
+ if (is_orphan_vg(vg->name))
+ return 1;
+
if (vg_is_clustered(vg))
if (!remote_backup_metadata(vg))
stack;
10 years, 3 months
master - udev: do not drop SYSTEMD_READY for non-activating events
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b662f3c8dd52f4...
Commit: b662f3c8dd52f489a8f5b5eeb69bc37ea40ff768
Parent: 3813cd7a3c3e763c346405664fba97edf7110d13
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jan 14 17:49:39 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jan 14 17:59:56 2014 +0100
udev: do not drop SYSTEMD_READY for non-activating events
Do not drop device's flag to report readiness for systemd
processing if there's any event that follows the activatiion
event itself. Otherwise, systemd would lost track of this device
on any other event that follows the activating event (IOW, we
need to make SYSTEMD_READY variable change level-based, not edge-based).
This patch applies for MD and loop devices used as PVs.
(intra-release fix for commit 4c267c7286145165dfe078f77d18d194a21a2e1c)
---
udev/69-dm-lvm-metad.rules.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
index d0b7b2a..e8304b5 100644
--- a/udev/69-dm-lvm-metad.rules.in
+++ b/udev/69-dm-lvm-metad.rules.in
@@ -54,7 +54,7 @@ IMPORT{db}="LVM_MD_PV_ACTIVATED"
ACTION=="add", ENV{LVM_MD_PV_ACTIVATED}=="1", GOTO="lvm_scan"
ACTION=="change", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1", GOTO="lvm_scan"
ACTION=="add", KERNEL=="md[0-9]*p[0-9]*", GOTO="lvm_scan"
-ENV{SYSTEMD_READY}="0"
+ENV{LVM_MD_PV_ACTIVATED}!="1", ENV{SYSTEMD_READY}="0"
GOTO="lvm_end"
# Loop device:
@@ -62,7 +62,7 @@ LABEL="next"
KERNEL!="loop[0-9]*", GOTO="next"
ACTION=="add", ENV{LVM_LOOP_PV_ACTIVATED}=="1", GOTO="lvm_scan"
ACTION=="change", ENV{LVM_LOOP_PV_ACTIVATED}!="1", TEST=="loop/backing_file", ENV{LVM_LOOP_PV_ACTIVATED}="1", GOTO="lvm_scan"
-ENV{SYSTEMD_READY}="0"
+ENV{LVM_LOOP_PV_ACTIVATED}!="1", ENV{SYSTEMD_READY}="0"
GOTO="lvm_end"
# If the PV is not a special device listed above, scan only after device addition (ADD event)
10 years, 3 months
master - format1: Mark obsolete and do not use with lvmetad.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3813cd7a3c3e76...
Commit: 3813cd7a3c3e763c346405664fba97edf7110d13
Parent: 5a450eab6a9fef7793066864ff58857d827b903f
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jan 14 03:27:45 2014 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jan 14 03:27:45 2014 +0000
format1: Mark obsolete and do not use with lvmetad.
DO NOT USE LVMETAD IF YOU HAVE ANY LVM1-FORMATTED PVS.
You may continue to use it without lvmetad, but do please schedule
an upgrade to the lvm2 format (with 'vgconvert').
Sending the original LVM1 formatted metadata to lvmetad is breaking
assumptions made by the code, so I am marking the format as obsolete for
now and no longer sending it to lvmetad.
This means that if you are using lvmetad, lvm1 volumes will usually
appear invisible - though not always: it depends on exactly what
sequence of commands you run!
The current situation is not satisfactory.
We'll either fix lvmetad and reenable this or we'll fix the code to
issue appropriate warning messages when lvm1 PVs are encountered
to avoid accidents.
(The latest unfixed problem is that lvmetad assumes metadata sequence
numbers exist and always increase - but the lvm1 format does not define
or store any sequence number, confusing both the daemon and client
when default values get passed to-and-fro.)
---
WHATS_NEW | 1 +
lib/format1/format1.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 12845ab..834cf0f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Mark lvm1 format metadata as FMT_OBSOLETE. Do not use it with lvmetad.
Invalidate cached VG struct after a PV in it gets orphaned. (2.02.87)
Mark pool format metadata as FMT_OBSOLETE.
Use major:minor in lvm2-pvscan@.service for proper global_filter application.
diff --git a/lib/format1/format1.c b/lib/format1/format1.c
index 509167a..16746e3 100644
--- a/lib/format1/format1.c
+++ b/lib/format1/format1.c
@@ -603,7 +603,7 @@ struct format_type *init_format(struct cmd_context *cmd)
fmt->alias = NULL;
fmt->orphan_vg_name = FMT_LVM1_ORPHAN_VG_NAME;
fmt->features = FMT_RESTRICTED_LVIDS | FMT_ORPHAN_ALLOCATABLE |
- FMT_RESTRICTED_READAHEAD;
+ FMT_RESTRICTED_READAHEAD | FMT_OBSOLETE;
fmt->private = NULL;
dm_list_init(&fmt->mda_ops);
10 years, 3 months
master - pvs: fix segfaults with orphans
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5a450eab6a9fef...
Commit: 5a450eab6a9fef7793066864ff58857d827b903f
Parent: 4c2b4c37e72b74553125664364efcda0e0758bf7
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jan 14 03:17:27 2014 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jan 14 03:17:27 2014 +0000
pvs: fix segfaults with orphans
Several fields used to display 0 if undefined. Recent changes
to the way the fields are reported threw away some tests for
valid pointers, leading to segfaults with 'pvs -o all'.
Reinstate the original behaviour.
---
lib/cache/lvmcache.c | 3 +++
lib/metadata/pv.c | 3 ++-
lib/report/report.c | 8 +++-----
tools/reporter.c | 16 +++++++++-------
4 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 6719e99..ec8699b 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1958,6 +1958,9 @@ int lvmcache_uncertain_ownership(struct lvmcache_info *info) {
uint64_t lvmcache_smallest_mda_size(struct lvmcache_info *info)
{
+ if (!info)
+ return UINT64_C(0);
+
return find_min_mda_size(&info->mdas);
}
diff --git a/lib/metadata/pv.c b/lib/metadata/pv.c
index 349048e..6f5fca4 100644
--- a/lib/metadata/pv.c
+++ b/lib/metadata/pv.c
@@ -245,7 +245,8 @@ uint64_t lvmcache_info_mda_free(struct lvmcache_info *info)
{
uint64_t freespace = UINT64_MAX;
- lvmcache_foreach_mda(info, _pv_mda_free, &freespace);
+ if (info)
+ lvmcache_foreach_mda(info, _pv_mda_free, &freespace);
if (freespace == UINT64_MAX)
freespace = UINT64_C(0);
diff --git a/lib/report/report.c b/lib/report/report.c
index 3626769..bd4b725 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -693,13 +693,11 @@ static int _devsize_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
{
+ const struct device *dev = *(const struct device * const *) data;
uint64_t size;
- if (!data)
- return _field_set_value(field, "", NULL);
-
- if (!dev_get_size(*(const struct device **) data, &size))
- return_0;
+ if (!dev || !dev->dev || !dev_get_size(dev, &size))
+ size = _zero64;
return _size64_disp(rh, mem, field, &size, private);
}
diff --git a/tools/reporter.c b/tools/reporter.c
index a36fcb3..602f173 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -141,8 +141,8 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
struct volume_group *old_vg = vg;
char uuid[64] __attribute__((aligned(8)));
struct label *label;
- struct label _dummy_label = { .dev = 0 };
- struct device _dummy_device = { .dev = 0 };
+ struct label dummy_label = { .dev = 0 };
+ struct device dummy_device = { .dev = 0 };
if (is_pv(pv) && !is_orphan(pv) && !vg) {
vg_name = pv_vg_name(pv);
@@ -183,14 +183,16 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
/* FIXME workaround for pv_label going through cache; remove once struct
* physical_volume gains a proper "label" pointer */
if (!(label = pv_label(pv))) {
- _dummy_label.labeller = pv->fmt->labeller;
+ if (pv->fmt)
+ dummy_label.labeller = pv->fmt->labeller;
+
if (pv->dev)
- _dummy_label.dev = pv->dev;
+ dummy_label.dev = pv->dev;
else {
- _dummy_label.dev = &_dummy_device;
- memcpy(_dummy_device.pvid, &pv->id, ID_LEN);
+ dummy_label.dev = &dummy_device;
+ memcpy(dummy_device.pvid, &pv->id, ID_LEN);
}
- label = &_dummy_label;
+ label = &dummy_label;
}
if (!report_object(handle, vg, NULL, pv, NULL, NULL, label)) {
10 years, 3 months
master - lvmcache: Invalidate cached VG if PV is orphaned.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4c2b4c37e72b74...
Commit: 4c2b4c37e72b74553125664364efcda0e0758bf7
Parent: 9c445f3c2c1553ff1e9f97c2302344736e7f35e8
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jan 14 02:57:03 2014 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jan 14 02:57:03 2014 +0000
lvmcache: Invalidate cached VG if PV is orphaned.
If a PV in an existing VG becomes orphaned (with 'pvcreate -ff', for
example) the VG struct cached against its vginfo must be invalidated.
This is because the struct device it references no longer contains
the PV label so becomes incorrect.
This triggers the error:
Internal error: PV $dev unexpectedly not in cache.
when the PV from the cached VG metadata is subsequently looked up
in the cache.
Bug introduced in 2.02.87 by commit 7ad0d47c3c93053c07c45161dbdbc0798ac7e2f6
("Cache and share generated VG structs").
Before:
lvm> pvs
PV VG Fmt Attr PSize PFree
/dev/loop3 vg12 lvm2 a-- 28.00m 28.00m
/dev/loop4 vg12 lvm2 a-- 28.00m 28.00m
lvm> pvcreate -ff /dev/loop3
Really INITIALIZE physical volume "/dev/loop3" of volume group "vg12" [y/n]? y
WARNING: Forcing physical volume creation on /dev/loop3 of volume group "vg12"
Physical volume "/dev/loop3" successfully created
lvm> pvs
Internal error: PV /dev/loop3 unexpectedly not in cache.
PV VG Fmt Attr PSize PFree
/dev/loop3 vg12 lvm2 a-- 28.00m 28.00m
/dev/loop3 lvm2 a-- 32.00m 32.00m
/dev/loop4 vg12 lvm2 a-- 28.00m 28.00m
After:
lvm> pvs
PV VG Fmt Attr PSize PFree
/dev/loop3 vg12 lvm2 a-- 28.00m 28.00m
/dev/loop4 vg12 lvm2 a-- 28.00m 28.00m
lvm> pvcreate -ff /dev/loop3
Really INITIALIZE physical volume "/dev/loop3" of volume group "vg12" [y/n]? y
WARNING: Forcing physical volume creation on /dev/loop3 of volume group "vg12"
Physical volume "/dev/loop3" successfully created
lvm> pvs
PV VG Fmt Attr PSize PFree
/dev/loop3 lvm2 a-- 32.00m 32.00m
/dev/loop4 vg12 lvm2 a-- 28.00m 28.00m
unknown device vg12 lvm2 a-m 28.00m 28.00m
---
WHATS_NEW | 2 ++
lib/cache/lvmcache.c | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1dac25e..12845ab 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.105 -
=====================================
+ Invalidate cached VG struct after a PV in it gets orphaned. (2.02.87)
+ Mark pool format metadata as FMT_OBSOLETE.
Use major:minor in lvm2-pvscan@.service for proper global_filter application.
Syntax and spelling fixes in some man pages.
Dependency scan counts with snapshots and external origins.
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 770a1b3..6719e99 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -64,6 +64,7 @@ struct lvmcache_vginfo {
unsigned holders;
unsigned vg_use_count; /* Counter of vg reusage */
unsigned precommitted; /* Is vgmetadata live or precommitted? */
+ unsigned cached_vg_invalidated; /* Signal to regenerate cached_vg */
};
static struct dm_hash_table *_pvid_hash = NULL;
@@ -763,9 +764,11 @@ struct volume_group *lvmcache_get_vg(struct cmd_context *cmd, const char *vgname
return NULL;
/* Use already-cached VG struct when available */
- if ((vg = vginfo->cached_vg))
+ if ((vg = vginfo->cached_vg) && !vginfo->cached_vg_invalidated)
goto out;
+ release_vg(vginfo->cached_vg);
+
fic.type = FMT_INSTANCE_MDAS | FMT_INSTANCE_AUX_MDAS;
fic.context.vg_ref.vg_name = vginfo->vgname;
fic.context.vg_ref.vg_id = vgid;
@@ -785,6 +788,7 @@ struct volume_group *lvmcache_get_vg(struct cmd_context *cmd, const char *vgname
vginfo->cached_vg = vg;
vginfo->holders = 1;
vginfo->vg_use_count = 0;
+ vginfo->cached_vg_invalidated = 0;
vg->vginfo = vginfo;
if (!dm_pool_lock(vg->vgmem, detect_internal_vg_cache_corruption()))
@@ -1407,6 +1411,12 @@ int lvmcache_update_vgname_and_id(struct lvmcache_info *info,
!is_orphan_vg(info->vginfo->vgname) && critical_section())
return 1;
+ /* If making a PV into an orphan, any cached VG metadata may become
+ * invalid, incorrectly still referencing device structs.
+ * (Example: pvcreate -ff) */
+ if (is_orphan_vg(vgname) && info->vginfo && !is_orphan_vg(info->vginfo->vgname))
+ info->vginfo->cached_vg_invalidated = 1;
+
/* If moving PV from orphan to real VG, always mark it valid */
if (!is_orphan_vg(vgname))
info->status &= ~CACHE_INVALID;
10 years, 3 months
master - reporter: Set labeller on dummy labels (fixes missing fmt field).
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9c445f3c2c1553...
Commit: 9c445f3c2c1553ff1e9f97c2302344736e7f35e8
Parent: d61c9eb52f05de5da706b79b9596143fab628b8e
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Mon Jan 13 11:45:38 2014 +0100
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Mon Jan 13 11:45:38 2014 +0100
reporter: Set labeller on dummy labels (fixes missing fmt field).
---
tools/reporter.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/reporter.c b/tools/reporter.c
index bf181e7..a36fcb3 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -183,6 +183,7 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
/* FIXME workaround for pv_label going through cache; remove once struct
* physical_volume gains a proper "label" pointer */
if (!(label = pv_label(pv))) {
+ _dummy_label.labeller = pv->fmt->labeller;
if (pv->dev)
_dummy_label.dev = pv->dev;
else {
10 years, 3 months
master - report: Do not try to get dev_size of a NULL device.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d61c9eb52f05de...
Commit: d61c9eb52f05de5da706b79b9596143fab628b8e
Parent: 5f7286f15d34d89b6710af3946985b4479e2a472
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Mon Jan 13 11:45:18 2014 +0100
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Mon Jan 13 11:45:18 2014 +0100
report: Do not try to get dev_size of a NULL device.
---
lib/report/report.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/report/report.c b/lib/report/report.c
index 2d39cb0..3626769 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -695,6 +695,9 @@ static int _devsize_disp(struct dm_report *rh, struct dm_pool *mem,
{
uint64_t size;
+ if (!data)
+ return _field_set_value(field, "", NULL);
+
if (!dev_get_size(*(const struct device **) data, &size))
return_0;
10 years, 3 months
master - toollib: Fix a pool leak in _process_all_devs.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5f7286f15d34d8...
Commit: 5f7286f15d34d89b6710af3946985b4479e2a472
Parent: e892ac73980db349deeb3ff6863bd8e3b5727654
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Mon Jan 13 11:26:43 2014 +0100
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Mon Jan 13 11:26:43 2014 +0100
toollib: Fix a pool leak in _process_all_devs.
---
tools/toollib.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index bf226b9..61c14f1 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -777,6 +777,8 @@ static int _process_all_devs(struct cmd_context *cmd, void *handle,
}
dev_iter_destroy(iter);
+ dm_list_iterate_items(pvl, pvslist)
+ free_pv_fid(pvl->pv);
return ret_max;
}
10 years, 3 months
master - test: Increase the overall timeout to 3 hours.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e892ac73980db3...
Commit: e892ac73980db349deeb3ff6863bd8e3b5727654
Parent: d52c4154c5e9d300cbee96231f0b95fa416453bf
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Mon Dec 16 17:35:33 2013 +0100
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Wed Jan 8 17:11:32 2014 +0100
test: Increase the overall timeout to 3 hours.
---
test/lib/harness.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/lib/harness.c b/test/lib/harness.c
index 9613543..ded86f0 100644
--- a/test/lib/harness.c
+++ b/test/lib/harness.c
@@ -550,9 +550,9 @@ int main(int argc, char **argv) {
/* run the tests */
for (i = 1; !die && i < argc; ++i) {
run(i, argv[i]);
- if ( time(NULL) - harness_start > 3600 ) {
- printf("an hour passed, giving up...\n");
- break;
+ if ( time(NULL) - harness_start > 3 * 3600 ) {
+ printf("3 hours passed, giving up...\n");
+ die = 1;
}
}
10 years, 3 months