From owner-freebsd-current@FreeBSD.ORG Tue May 17 20:53:59 2011 Return-Path: Delivered-To: current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F06106566C; Tue, 17 May 2011 20:53:59 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id 1CE198FC0A; Tue, 17 May 2011 20:53:59 +0000 (UTC) Received: from [4.59.13.245] (helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1QMRHC-0009gp-GA; Tue, 17 May 2011 13:53:58 -0700 Message-ID: <4DD2E065.5040006@FreeBSD.org> Date: Tue, 17 May 2011 13:53:57 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pawel Jakub Dawidek , "current@freebsd.org" References: <4DD2DA65.5060103@FreeBSD.org> In-Reply-To: <4DD2DA65.5060103@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: Subject: Making hastd working over WAN links (was: Randomization in hastd(8) synchronization thread) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2011 20:53:59 -0000 On 5/17/2011 1:28 PM, Maxim Sobolev wrote: > The next thing to make it usable is to make "async" mode working. I > think simple support for that mode can be easily implemented by not > sending write request to the remote note at all, but instead just doing > it locally and kicking the synchronization thread to do it's magic in > the background. I hope to follow up with the patch soon. Here is a proof of concept path, which simply fails any non-synchronization requests in the send thread when in the async mode. This is non-optimal, as it would cause additional latency in the write path when the send thread is busy with synchronization requests. But it works for me, making it possible to use my virtual machine while synchronizing the disk image. http://sobomax.sippysoft.com/primary.c.diff -Maxim