From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjxBY-0008W4-6A for qemu-devel@nongnu.org; Tue, 23 Feb 2010 11:00:32 -0500 Received: from [199.232.76.173] (port=33850 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjxBX-0008Vh-Ac for qemu-devel@nongnu.org; Tue, 23 Feb 2010 11:00:31 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NjxBW-0003dg-47 for qemu-devel@nongnu.org; Tue, 23 Feb 2010 11:00:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27768) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NjxBV-0003dO-No for qemu-devel@nongnu.org; Tue, 23 Feb 2010 11:00:29 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1NG0R6u022603 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Feb 2010 11:00:27 -0500 From: Juan Quintela In-Reply-To: <1266939654-26510-2-git-send-email-kwolf@redhat.com> (Kevin Wolf's message of "Tue, 23 Feb 2010 16:40:52 +0100") References: <1266939654-26510-1-git-send-email-kwolf@redhat.com> <1266939654-26510-2-git-send-email-kwolf@redhat.com> Date: Tue, 23 Feb 2010 17:00:23 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH v2 1/3] qcow2: Factor next_refcount_table_size out List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org Kevin Wolf wrote: > When the refcount table grows, it doesn't only grow by one entry but reserves > some space for future refcount blocks. The algorithm to calculate the number of > entries stays the same with the fixes, so factor it out before replacing the > rest. > > As Juan suggested take the opportunity to simplify the code a bit. > > Signed-off-by: Kevin Wolf Acked-by: Juan Quintela