From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6mfu-00006n-8o for qemu-devel@nongnu.org; Tue, 15 Nov 2016 17:57:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6mft-0000Oo-H3 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 17:57:58 -0500 From: Max Reitz Date: Tue, 15 Nov 2016 23:57:44 +0100 Message-Id: <20161115225746.3590-1-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH for-2.9 0/2] hbitmap: Add hbitmap_is_serializable() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , Fam Zheng , John Snow This series is a follow-up for "hbitmap: Fix shifts of constants by granularity". So far, adding the assertion in hbitmap_serialization_granularity() (as done by said previous patch) is enough and we know that it will always hold true since bitmaps are only serialized as part of a test for now. However, in the future we need some other way than a failed assertion to tell the user that they cannot serialize a certain bitmap. This series adds a function that can be called to tell whether a bitmap can be (de-)serialized. Max Reitz (2): hbitmap: Add hbitmap_is_serializable() test-hbitmap: Add hbitmap_is_serializable() calls include/qemu/hbitmap.h | 13 +++++++++++++ tests/test-hbitmap.c | 11 +++++++++++ util/hbitmap.c | 22 +++++++++++++++++++--- 3 files changed, 43 insertions(+), 3 deletions(-) -- 2.10.2