From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lnjty-0008GB-8R for qemu-devel@nongnu.org; Sat, 28 Mar 2009 21:33:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lnjtt-0008E1-Cg for qemu-devel@nongnu.org; Sat, 28 Mar 2009 21:33:29 -0400 Received: from [199.232.76.173] (port=34384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lnjtt-0008Dx-8P for qemu-devel@nongnu.org; Sat, 28 Mar 2009 21:33:25 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:52479) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lnjts-00046F-3I for qemu-devel@nongnu.org; Sat, 28 Mar 2009 21:33:25 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n2T1TY1b017031 for ; Sat, 28 Mar 2009 21:29:34 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n2T1XNVC183850 for ; Sat, 28 Mar 2009 21:33:23 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n2T1XNqd007039 for ; Sat, 28 Mar 2009 21:33:23 -0400 Received: from squirrel.codemonkey.ws (sig-9-65-208-188.mts.ibm.com [9.65.208.188]) by d01av03.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n2T1XMfe007027 for ; Sat, 28 Mar 2009 21:33:22 -0400 Message-ID: <49CECFE2.8050200@us.ibm.com> Date: Sat, 28 Mar 2009 20:33:22 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] remove dead code in bdrv_check_request References: <20090314130003.GA24344@lst.de> <20090314133540.GA25440@lst.de> <49CE4E97.7080705@us.ibm.com> <20090328183109.GA25497@lst.de> In-Reply-To: <20090328183109.GA25497@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Christoph Hellwig wrote: > Remove code dealing with negative sector numbers for byte access in > bdrv_check_request as sector numbers can't ever be negative. > > Previously we supported negative sector counts for byte access, but > never sector numbers. > > > Signed-off-by: Christoph Hellwig > Applied. Thanks for resending this. Regards, Anthony Liguori > Index: qemu/block.c > =================================================================== > --- qemu.orig/block.c 2009-03-14 14:34:49.000000000 +0100 > +++ qemu/block.c 2009-03-14 14:35:12.000000000 +0100 > @@ -546,15 +546,7 @@ static int bdrv_check_byte_request(Block > static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num, > int nb_sectors) > { > - int64_t offset; > - > - /* Deal with byte accesses */ > - if (sector_num < 0) > - offset = -sector_num; > - else > - offset = sector_num * 512; > - > - return bdrv_check_byte_request(bs, offset, nb_sectors * 512); > + return bdrv_check_byte_request(bs, sector_num * 512, nb_sectors * 512); > } > > /* return < 0 if error. See bdrv_write() for the return codes */ > > > >