Received: from eggs.gnu.org ([2001:4830:134:3::10]:56746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRaSK-0002Eb-Fq for qemu-devel@nongnu.org; Thu, 03 Oct 2013 00:24:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRaSB-0007pT-Sg for qemu-devel@nongnu.org; Thu, 03 Oct 2013 00:24:04 -0400 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_WmJew13hCQMmXw51bLbJng)" From: Yaodong Yang Date: Thu, 03 Oct 2013 04:23:45 +0000 (GMT) Message-id: Subject: [Qemu-devel] An issue in block-migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-discuss@nongnu.org, qemu-devel@nongnu.org Cc: Yaodong Yang --Boundary_(ID_WmJew13hCQMmXw51bLbJng) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: quoted-printable Hi all,=0A=0AIn block-migration.c file, line 435,=A0if (bdrv_get_dirty(bmd= s->bs, sector)) {=0A=0AIt looks like this "if statement" is used to check = whether a chunk is dirty or not. If it is dirty, system will migrate a who= le chunk, 1MB data, to the destination. Otherwise, the cur_dirty will incr= ease by 1MB/512B sectors.=0A=0AHowever, in my understanding, this function= , bdrv_get_dirty(bmds->bs, sector), only check this sector (512B) is dirty= or not, rather than a whole chunk (1MB). Could someone tell me the reason= ?=0A=0AThanks!=0AYaodong= --Boundary_(ID_WmJew13hCQMmXw51bLbJng) Content-type: multipart/related; boundary="Boundary_(ID_j4Ul/VwK7JEaJUmLBUEoJw)"; type="text/html" --Boundary_(ID_j4Ul/VwK7JEaJUmLBUEoJw) Content-type: text/html; CHARSET=US-ASCII Content-transfer-encoding: 7BIT
Hi all,

In block-migration.c file, line 435, if (bdrv_get_dirty(bmds->bs, sector)) {

It looks like this "if statement" is used to check whether a chunk is dirty or not. If it is dirty, system will migrate a whole chunk, 1MB data, to the destination. Otherwise, the cur_dirty will increase by 1MB/512B sectors.

However, in my understanding, this function, bdrv_get_dirty(bmds->bs, sector), only check this sector (512B) is dirty or not, rather than a whole chunk (1MB). Could someone tell me the reason?

Thanks!
Yaodong
--Boundary_(ID_j4Ul/VwK7JEaJUmLBUEoJw)-- --Boundary_(ID_WmJew13hCQMmXw51bLbJng)--