diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2011-10-27 18:45:01 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2011-10-27 18:45:01 +0000 |
commit | 8a34134ac2f68e847f60e9ae8737b976ab0496c5 (patch) | |
tree | f453fb32cb998bd0905938d6a53f49328bee05bf /sbin | |
parent | 464ff7d2230338ba467744e21a1f05c48d00a33a (diff) | |
download | src-8a34134ac2f68e847f60e9ae8737b976ab0496c5.tar.gz src-8a34134ac2f68e847f60e9ae8737b976ab0496c5.zip |
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
Notes
Notes:
svn path=/head/; revision=226851
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 21e888a84997..4cdbf0faa407 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); |