diff options
author | pjd <pjd@FreeBSD.org> | 2011-10-27 18:45:01 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-10-27 18:45:01 +0000 |
commit | c2e715af70b7bfbdbf345b266294162f4f27be40 (patch) | |
tree | f453fb32cb998bd0905938d6a53f49328bee05bf /sbin | |
parent | a6c5138e838c72eab719291f4761da0d60653908 (diff) | |
download | FreeBSD-src-c2e715af70b7bfbdbf345b266294162f4f27be40.zip FreeBSD-src-c2e715af70b7bfbdbf345b266294162f4f27be40.tar.gz |
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
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/primary.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c index 21e888a..4cdbf0f 100644 --- a/sbin/hastd/primary.c +++ b/sbin/hastd/primary.c @@ -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); |