From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW2ru-0000Nm-AO for qemu-devel@nongnu.org; Tue, 15 Oct 2013 07:33:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VW2ro-0000fu-Aq for qemu-devel@nongnu.org; Tue, 15 Oct 2013 07:32:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW2ro-0000fi-2v for qemu-devel@nongnu.org; Tue, 15 Oct 2013 07:32:48 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9FBWlL0000889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Oct 2013 07:32:47 -0400 Message-ID: <525D27DB.4060005@redhat.com> Date: Tue, 15 Oct 2013 13:32:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1381769148-22400-1-git-send-email-ehabkost@redhat.com> <1381769148-22400-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1381769148-22400-4-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/5] vmstate: Simplify field-skipping load/save logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Markus Armbruster , qemu-devel@nongnu.org, Juan Quintela Il 14/10/2013 18:45, Eduardo Habkost ha scritto: > + if (field->field_exists && !field->field_exists(opaque, version_id)) { > + continue; > + } > + if (field->version_id > version_id) { > + continue; > + } What Markus observed... I think the change is fine because we currently never have field_exists and version_id set for the same field. However, I suggest to move the change to a separate patch, and swap the two ifs in this one. Paolo