From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56032 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF1TB-0002ZM-29 for qemu-devel@nongnu.org; Thu, 20 May 2010 04:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF1T9-0006SY-7r for qemu-devel@nongnu.org; Thu, 20 May 2010 04:51:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1764) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF1T8-0006SJ-VN for qemu-devel@nongnu.org; Thu, 20 May 2010 04:51:07 -0400 Message-ID: <4BF4F7DE.7060308@redhat.com> Date: Thu, 20 May 2010 10:50:38 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <20100519185309.GA27591@lst.de> In-Reply-To: <20100519185309.GA27591@lst.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] block: fix sector comparism in multiwrite_req_compare List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Michael Tokarev , qemu-devel@nongnu.org Am 19.05.2010 20:53, schrieb Christoph Hellwig: > The difference between the start sectors of two requests can be larger > than the size of the "int" type, which can lead to a not correctly > sorted multiwrite array and thus spurious I/O errors and filesystem > corruption due to incorrect request merges. > > So instead of doing the cute sector arithmetics trick spell out the > exact comparisms. > > Spotted by Kevin Wolf based on a testcase from Michael Tokarev. > > Signed-off-by: Christoph Hellwig Thanks, applied to the block branch. Kevin