Deleted Added
full compact
primary.c (220266) primary.c (220271)
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 220266 2011-04-02 07:01:09Z pjd $");
32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 220271 2011-04-02 09:25:13Z pjd $");
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

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

696 free(map);
697 /*
698 * Now that we merged bitmaps from both nodes, flush it to the
699 * disk before we start to synchronize.
700 */
701 (void)hast_activemap_flush(res);
702 }
703 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

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

696 free(map);
697 /*
698 * Now that we merged bitmaps from both nodes, flush it to the
699 * disk before we start to synchronize.
700 */
701 (void)hast_activemap_flush(res);
702 }
703 nv_free(nvin);
704 /* Setup directions. */
705 if (proto_send(out, NULL, 0) == -1)
706 pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
707 if (proto_recv(in, NULL, 0) == -1)
708 pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
704 pjdlog_info("Connected to %s.", res->hr_remoteaddr);
705 if (inp != NULL && outp != NULL) {
706 *inp = in;
707 *outp = out;
708 } else {
709 res->hr_remotein = in;
710 res->hr_remoteout = out;
711 }

--- 1432 unchanged lines hidden ---
709 pjdlog_info("Connected to %s.", res->hr_remoteaddr);
710 if (inp != NULL && outp != NULL) {
711 *inp = in;
712 *outp = out;
713 } else {
714 res->hr_remotein = in;
715 res->hr_remoteout = out;
716 }

--- 1432 unchanged lines hidden ---