summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2013-10-26 08:35:54 +0000
committertrociny <trociny@FreeBSD.org>2013-10-26 08:35:54 +0000
commita482904d30b8e2d155b83f21f311686e81f8452d (patch)
tree0b8228f3c79f9dfc06a11024207784cae23938fb /sbin/hastd
parent130419d137ba70fe8963ba3479f74ceae3cc8b78 (diff)
downloadFreeBSD-src-a482904d30b8e2d155b83f21f311686e81f8452d.zip
FreeBSD-src-a482904d30b8e2d155b83f21f311686e81f8452d.tar.gz
Merging local and remote bitmaps must be protected by hr_amp lock.
This is believed to fix hastd crashes, which might occur during synchronization, triggered by the failed assertion: Assertion failed: (amp->am_memtab[ext] > 0), function activemap_write_complete, file activemap.c, line 351. MFC after: 1 week
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/primary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 09ae17b..bd484e3 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -781,6 +781,7 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
free(map);
goto close;
}
+ mtx_lock(&res->hr_amp_lock);
/*
* Merge local and remote bitmaps.
*/
@@ -790,7 +791,6 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
* Now that we merged bitmaps from both nodes, flush it to the
* disk before we start to synchronize.
*/
- mtx_lock(&res->hr_amp_lock);
(void)hast_activemap_flush(res);
}
nv_free(nvin);
OpenPOWER on IntegriCloud