From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUWCT-0001Rh-IE for qemu-devel@nongnu.org; Tue, 23 Apr 2013 01:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUWCS-0001qQ-Ls for qemu-devel@nongnu.org; Tue, 23 Apr 2013 01:55:33 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:35533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUWCS-0001q6-Fc for qemu-devel@nongnu.org; Tue, 23 Apr 2013 01:55:32 -0400 Received: by mail-pd0-f173.google.com with SMTP id v10so205612pde.4 for ; Mon, 22 Apr 2013 22:55:29 -0700 (PDT) Message-ID: <5176224B.9090405@gmail.com> Date: Tue, 23 Apr 2013 13:55:23 +0800 From: Liu Yuan MIME-Version: 1.0 References: <1366613950-10918-1-git-send-email-namei.unix@gmail.com> <1366613950-10918-3-git-send-email-namei.unix@gmail.com> <20130422120007.GB21317@stefanha-thinkpad.redhat.com> <517528D2.1040409@gmail.com> <20130422150348.GC28049@stefanha-thinkpad.redhat.com> <517554DB.6060204@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/2] sheepdog: implement .bdrv_co_is_allocated() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , MORITA Kazutaka , sheepdog@lists.wpkg.org, qemu-devel , Stefan Hajnoczi On 04/23/2013 04:46 AM, Stefan Hajnoczi wrote: > The first sector is included in nb_sectors. Mathematically the range > is defined as [sector_num, sector_num + nb_sectors). Notice the > half-open interval, sector_num + nb_sectors is excluded. The last > included sector is sector_num + nb_sectors - 1. > > You can look at qcow2's implementation, especially > count_contiguous_clusters() to double-check. Okay, thanks for you explanation. I'll update it in v4. Yuan