From owner-cvs-src-old@FreeBSD.ORG Tue Nov 2 22:49:42 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF77F1065694 for ; Tue, 2 Nov 2010 22:49:42 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 815048FC18 for ; Tue, 2 Nov 2010 22:49:42 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oA2Mngxd024820 for ; Tue, 2 Nov 2010 22:49:42 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oA2MngkC024819 for cvs-src-old@freebsd.org; Tue, 2 Nov 2010 22:49:42 GMT (envelope-from pjd@repoman.freebsd.org) Message-Id: <201011022249.oA2MngkC024819@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to pjd@repoman.freebsd.org using -f From: Pawel Jakub Dawidek Date: Tue, 2 Nov 2010 22:49:20 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sbin/hastd hastd.c hooks.c nv.c nv.h parse.y primary.c secondary.c synch.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2010 22:49:42 -0000 pjd 2010-11-02 22:49:20 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sbin/hastd hastd.c hooks.c nv.c nv.h parse.y primary.c secondary.c synch.h Log: SVN rev 214697 on 2010-11-02 22:49:20Z by pjd MFC r214119,r214273,r214274,r214275,r214276,r214282,r214283,r214284,r214692: r214119: Use closefrom(2) instead of close(2) in a loop. r214273: Load geom_gate.ko module after parsing arguments. r214274: Plug memory leaks. Found with: valgrind r214275: Plug memory leak. r214276: Simplify code a bit. r214282: Move all NV defines into nv.c, they are not used externally thus there is no need to make then visible from outside. r214283: Implement nv_exists() function that returns true if argument of the given name exists. r214284: Before this change on first connect between primary and secondary we initialize all the data. This is huge waste of time and resources if there were no writes yet, as there is no real data to synchronize. Optimize this by sending "virgin" argument to secondary, which gives it a hint that synchronization is not needed. In the common case (where noth nodes are configured at the same time) instead of synchronizing everything, we don't synchronize at all. r214692: Send packets to remote node only via the send thread to avoid possible races - in this case a keepalive packet was send from wrong thread which lead to connection dropping, because of corrupted packet. Fix it by sending keepalive packets directly from the send thread. As a bonus we now send keepalive packets only when connection is idle. Submitted by: Mikolaj Golub Revision Changes Path 1.2.2.8 +2 -2 src/sbin/hastd/hastd.c 1.1.2.5 +8 -21 src/sbin/hastd/hooks.c 1.1.2.4 +54 -1 src/sbin/hastd/nv.c 1.1.2.3 +1 -27 src/sbin/hastd/nv.h 1.1.2.5 +24 -0 src/sbin/hastd/parse.y 1.3.2.8 +98 -43 src/sbin/hastd/primary.c 1.1.2.6 +14 -5 src/sbin/hastd/secondary.c 1.1.2.4 +2 -0 src/sbin/hastd/synch.h