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
This commit is contained in:
Pawel Jakub Dawidek 2011-10-27 18:45:01 +00:00
parent 464ff7d223
commit 8a34134ac2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226851

View File

@ -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);