From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WimlG-000871-F5 for qemu-devel@nongnu.org; Fri, 09 May 2014 11:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wiml7-0005ze-Ej for qemu-devel@nongnu.org; Fri, 09 May 2014 11:30:58 -0400 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:50728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wiml7-0005zU-6o for qemu-devel@nongnu.org; Fri, 09 May 2014 11:30:49 -0400 Received: by mail-wg0-f49.google.com with SMTP id m15so4151679wgh.20 for ; Fri, 09 May 2014 08:30:48 -0700 (PDT) Date: Fri, 9 May 2014 17:30:45 +0200 From: Stefan Hajnoczi Message-ID: <20140509153045.GD26017@stefanha-thinkpad.redhat.com> References: <1399628898-3241-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1399628898-3241-1-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/5] Clean up around bdrv_getlength() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Fri, May 09, 2014 at 11:48:13AM +0200, Markus Armbruster wrote: > Issues addressed in this series: > > * BlockDriver method bdrv_getlength() generally returns -errno, but > some implementations return -1 instead. Fix them [PATCH 1]. > > * Frequent conversions between sectors and bytes complicate the code > needlessly. Clean up some [PATCH 2+3]. > > * bdrv_getlength() always returns a multiple of BDRV_SECTOR_SIZE, but > some places appear to be confused about that, and align the result > up or down. Don't [PATCH 4]. > > * bdrv_get_geometry() hides errors. Don't use it in places where > errors should be detected [PATCH 5]. > > Issues not addressed: > > * There are quite a few literals left in the code where > BDRV_SECTOR_SIZE, BDRV_SECTOR_BITS or BDRV_SECTOR_MASK should be > used instead. > > * Error handling is missing in places, but it's not always obvious > whether errors can actually happen, and if yes, how to handle them. > > Markus Armbruster (5): > raw-posix: Fix raw_getlength() to always return -errno on error > block: New bdrv_nb_sectors() > block: Use bdrv_nb_sectors() when sectors, not bytes are wanted There's a regression in this patch. Dropped from the block queue because qemu-iotests ./check -qcow2 030 seems to go into an infinite loop or at least takes a long time. Stefan