Author: pjd
Date: Thu Oct 27 18:45:01 2011
New Revision: 226851
URL: http://svn.freebsd.org/changeset/base/226851
Log:
Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.
MFC after: 3 days
Modified:
head/sbin/hastd/primary.c
Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c Thu Oct 27 17:44:51 2011 (r226850)
+++ head/sbin/hastd/primary.c Thu Oct 27 18:45:01 2011 (r226851)
@@ -1159,13 +1159,10 @@ ggate_recv_thread(void *arg)
break;
case BIO_WRITE:
res->hr_stat_write++;
- if (res->hr_resuid == 0) {
- /*
- * This is first write, initialize localcnt and
- * resuid.
- */
+ if (res->hr_resuid == 0 &&
+ res->hr_primary_localcnt == 0) {
+ /* This is first write. */
res->hr_primary_localcnt = 1;
- (void)init_resuid(res);
}
for (;;) {
mtx_lock(&range_lock);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"