Deleted Added
full compact
primary.c (222467) primary.c (223181)
1/*-
2 * Copyright (c) 2009 The FreeBSD Foundation
3 * Copyright (c) 2010-2011 Pawel Jakub Dawidek <pawel@dawidek.net>
4 * All rights reserved.
5 *
6 * This software was developed by Pawel Jakub Dawidek under sponsorship from
7 * the FreeBSD Foundation.
8 *

--- 15 unchanged lines hidden (view full) ---

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009 The FreeBSD Foundation
3 * Copyright (c) 2010-2011 Pawel Jakub Dawidek <pawel@dawidek.net>
4 * All rights reserved.
5 *
6 * This software was developed by Pawel Jakub Dawidek under sponsorship from
7 * the FreeBSD Foundation.
8 *

--- 15 unchanged lines hidden (view full) ---

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 222467 2011-05-29 21:20:47Z trociny $");
32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 223181 2011-06-17 07:07:26Z trociny $");
33
34#include <sys/types.h>
35#include <sys/time.h>
36#include <sys/bio.h>
37#include <sys/disk.h>
38#include <sys/refcount.h>
39#include <sys/stat.h>
40

--- 680 unchanged lines hidden (view full) ---

721 free(map);
722 /*
723 * Now that we merged bitmaps from both nodes, flush it to the
724 * disk before we start to synchronize.
725 */
726 (void)hast_activemap_flush(res);
727 }
728 nv_free(nvin);
33
34#include <sys/types.h>
35#include <sys/time.h>
36#include <sys/bio.h>
37#include <sys/disk.h>
38#include <sys/refcount.h>
39#include <sys/stat.h>
40

--- 680 unchanged lines hidden (view full) ---

721 free(map);
722 /*
723 * Now that we merged bitmaps from both nodes, flush it to the
724 * disk before we start to synchronize.
725 */
726 (void)hast_activemap_flush(res);
727 }
728 nv_free(nvin);
729#ifdef notyet
729 /* Setup directions. */
730 if (proto_send(out, NULL, 0) == -1)
731 pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
732 if (proto_recv(in, NULL, 0) == -1)
733 pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
730 /* Setup directions. */
731 if (proto_send(out, NULL, 0) == -1)
732 pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
733 if (proto_recv(in, NULL, 0) == -1)
734 pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
735#endif
734 pjdlog_info("Connected to %s.", res->hr_remoteaddr);
735 if (inp != NULL && outp != NULL) {
736 *inp = in;
737 *outp = out;
738 } else {
739 res->hr_remotein = in;
740 res->hr_remoteout = out;
741 }

--- 1473 unchanged lines hidden ---
736 pjdlog_info("Connected to %s.", res->hr_remoteaddr);
737 if (inp != NULL && outp != NULL) {
738 *inp = in;
739 *outp = out;
740 } else {
741 res->hr_remotein = in;
742 res->hr_remoteout = out;
743 }

--- 1473 unchanged lines hidden ---