From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adhWN-0002hE-4U for qemu-devel@nongnu.org; Wed, 09 Mar 2016 12:03:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adhWM-00069Z-BS for qemu-devel@nongnu.org; Wed, 09 Mar 2016 12:03:39 -0500 Date: Wed, 9 Mar 2016 18:03:29 +0100 From: Olaf Hering Message-ID: <20160309170329.GA15924@aepfle.de> References: <20160309121139.GA21975@aepfle.de> <56E0173C.70407@redhat.com> <20160309144514.GA29027@aepfle.de> <20160309145837.GI5205@noname.redhat.com> <20160309165026.GA14059@aepfle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160309165026.GA14059@aepfle.de> Subject: Re: [Qemu-devel] bogus bdrv_check_request in bdrv_co_discard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi On Wed, Mar 09, Olaf Hering wrote: > Why does the code use signed ints anyway for sectors and offset?! I have to check mainline (next week), at least this fixes mkfs for me: +++ xen-4.4.3-testing/tools/qemu-xen-dir-remote/block/raw-posix.c @@ -792,8 +792,8 @@ static BlockDriverAIOCB *paio_submit(Blo acb->aio_iov = qiov->iov; acb->aio_niov = qiov->niov; } - acb->aio_nbytes = nb_sectors * 512; - acb->aio_offset = sector_num * 512; + acb->aio_nbytes = nb_sectors * 512U; + acb->aio_offset = sector_num * 512U; trace_paio_submit(acb, opaque, sector_num, nb_sectors, type); pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); Olaf