From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8f0S-0002ZZ-5e for qemu-devel@nongnu.org; Thu, 02 Jun 2016 22:38:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8f0R-0006Z4-Au for qemu-devel@nongnu.org; Thu, 02 Jun 2016 22:38:40 -0400 Date: Fri, 3 Jun 2016 10:38:29 +0800 From: Fam Zheng Message-ID: <20160603023829.GF29298@ad.usersys.redhat.com> References: <1457412306-18940-1-git-send-email-famz@redhat.com> <1457412306-18940-9-git-send-email-famz@redhat.com> <56E2DD08.1080907@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56E2DD08.1080907@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 08/15] tests: Add test code for meta bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Vladimir Sementsov-Ogievskiy , jsnow@redhat.com, kwolf@redhat.com On Fri, 03/11 15:58, Max Reitz wrote: > > + /* Test "unset" -> "set" will update meta */ > > + hbitmap_set(data->hb, start, count); > > + hbitmap_check_meta(data, check_start, check_count); > > + > > + /* Test "set" -> "set" will not update meta */ > > + hbitmap_reset_all(data->meta); > > + hbitmap_set(data->hb, start, count); > > + hbitmap_check_meta(data, 0, 0); > > Well, but if you'd do an hbitmap_set(data->hb, start, count + 1), then > it would update meta, right? Yes. > > I forgot to mention in my reply to patch 7 that the check whether > anything in the range passed to hbitmap_set() has been changed in order > to determine whether all of that range should be set in the meta bitmap > seemed a bit excessive. I don't think this will hurt anyone, but still. It is. It has been on my list to optimize the unnecessary meta update away but I haven't done that yet. Fam > > (So this is not a NACK, just a question.) > > Max >