From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44002 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHw17-0002vR-Ds for qemu-devel@nongnu.org; Fri, 28 May 2010 05:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHw16-0002XM-7w for qemu-devel@nongnu.org; Fri, 28 May 2010 05:38:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3868) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHw16-0002XF-1k for qemu-devel@nongnu.org; Fri, 28 May 2010 05:38:12 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4S9cAGK015349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 May 2010 05:38:11 -0400 Message-ID: <4BFF8F00.5010707@redhat.com> Date: Fri, 28 May 2010 11:38:08 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <1274968015-23599-1-git-send-email-Jes.Sorensen@redhat.com> <4BFE8148.90806@redhat.com> <4BFE91DD.5090409@redhat.com> <4BFE9343.1070500@redhat.com> <4BFF7FBA.7080201@redhat.com> In-Reply-To: <4BFF7FBA.7080201@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] block.h: Make BDRV_SECTOR_SIZE 64 bit safe List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-devel@nongnu.org On 05/28/10 10:32, Paolo Bonzini wrote: > On 05/27/2010 05:44 PM, Jes Sorensen wrote: >> > Candidate for stable too? >> It should be safe to apply, but I didn't find any current users where >> the mask was applied in a way where it was causing problems. Not sure if >> you want the noise, or apply it as better safe than sorry? > > The only use in fact is this: > > addr = qemu_get_be64(f); > flags = addr & ~BDRV_SECTOR_MASK; > > which is safe since the ~~ cancels to give back 511 again. So > nevermind, just asking. If there are no bugs related to it it seems > just as safe not to apply it. That is correct, which is why I don't think it is necessary for the stable release. However I want to see the fix in upstream as the macro is likely to get used for other things in the future and it's a hidden bug waiting to happen. Cheers, Jes