From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTWWd-0007OV-Cu for qemu-devel@nongnu.org; Tue, 08 Oct 2013 08:36:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTWWX-0001Jy-4i for qemu-devel@nongnu.org; Tue, 08 Oct 2013 08:36:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTWWW-0001Ju-TI for qemu-devel@nongnu.org; Tue, 08 Oct 2013 08:36:25 -0400 Message-ID: <5253FC3D.9050704@redhat.com> Date: Tue, 08 Oct 2013 14:36:13 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1381125551-24354-1-git-send-email-pl@kamp.de> <52527015.4090103@redhat.com> <5253F514.2050101@kamp.de> In-Reply-To: <5253F514.2050101@kamp.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv5] block/get_block_status: avoid redundant callouts on raw devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, anthony@codemonkey.ws, stefanha@redhat.com, qemu-devel@nongnu.org, ronniesahlberg@gmail.com Il 08/10/2013 14:05, Peter Lieven ha scritto: >> Strictly speaking, this should probably do something like this: >> >> assert(ret & BDRV_BLOCK_OFFSET_VALID); >> return bdrv_get_block_status(bs->file, ret >> BDRV_SECTOR_BITS, >> nb_sectors, pnum); > shouldn't the last line be: > > return bdrv_get_block_status(bs->file, ret >> BDRV_SECTOR_BITS, > *pnum, pnum); > > > This would of course require *pnum = nb_sectors in raw_co_get_block_status > ? Yes for both questions. Paolo