From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXQXp-0006hI-BV for qemu-devel@nongnu.org; Tue, 18 Jul 2017 07:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXQXk-0002KX-F8 for qemu-devel@nongnu.org; Tue, 18 Jul 2017 07:20:01 -0400 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:34705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXQXk-0002JU-90 for qemu-devel@nongnu.org; Tue, 18 Jul 2017 07:19:56 -0400 Received: by mail-wr0-x230.google.com with SMTP id 12so24516449wrb.1 for ; Tue, 18 Jul 2017 04:19:56 -0700 (PDT) References: <20170718061005.29518-1-f4bug@amsat.org> <20170718061005.29518-7-f4bug@amsat.org> <87bmoiysko.fsf@secure.mitica> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <87bmoiysko.fsf@secure.mitica> Date: Tue, 18 Jul 2017 12:19:53 +0100 Message-ID: <87a8428012.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 06/29] migration/block: use QEMU_IS_ALIGNED macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Fam Zheng , qemu-block@nongnu.org, qemu-trivial@nongnu.org, "Dr. David Alan Gilbert" , qemu-devel@nongnu.org, Stefan Hajnoczi Juan Quintela writes: > Philippe Mathieu-Daudé wrote: >> Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> migration/block.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/migration/block.c b/migration/block.c >> index 9171f60028..498c72ad59 100644 >> --- a/migration/block.c >> +++ b/migration/block.c >> @@ -933,7 +933,7 @@ static int block_load(QEMUFile *f, void *opaque, int version_id) >> ret = bdrv_get_info(blk_bs(blk), &bdi); >> if (ret == 0 && bdi.cluster_size > 0 && >> bdi.cluster_size <= BLOCK_SIZE && >> - BLOCK_SIZE % bdi.cluster_size == 0) { >> + QEMU_IS_ALIGNED(BLOCK_SIZE, bdi.cluster_size)) { >> cluster_size = bdi.cluster_size; >> } else { >> cluster_size = BLOCK_SIZE; > > Reviewed-by: Juan Quintela > > Should I take this patch, or does it go through the block layer? Your > call. Given it is part of a set would it not make more sense going through -trivial with the rest of them? -- Alex Bennée