From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NbgJu-00005k-FL for mharc-grub-devel@gnu.org; Sun, 31 Jan 2010 15:22:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbgJt-00004q-H4 for grub-devel@gnu.org; Sun, 31 Jan 2010 15:22:57 -0500 Received: from [199.232.76.173] (port=53654 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbgJt-0008W9-4v for grub-devel@gnu.org; Sun, 31 Jan 2010 15:22:57 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbgJs-0002xM-2X for grub-devel@gnu.org; Sun, 31 Jan 2010 15:22:56 -0500 Received: from mx20.gnu.org ([199.232.41.8]:6361) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NbgJq-0002tU-Rt for grub-devel@gnu.org; Sun, 31 Jan 2010 15:22:55 -0500 Received: from mail-yw0-f185.google.com ([209.85.211.185]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NbgJp-0005lD-UZ for grub-devel@gnu.org; Sun, 31 Jan 2010 15:22:54 -0500 Received: by ywh15 with SMTP id 15so967693ywh.5 for ; Sun, 31 Jan 2010 12:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=25YmbLbpoYm+rZxUNtuCcl/QVTx/K3kGHHAf3fcccLU=; b=c26l/c1BwYRXJg7EQ7GIA/ZxdqBCGOXQFR0ux8PrlhjEEARKk5nf/cT2E+4XqCfMfQ nf4GcS7d6oT7bJuH6z04tKJPGPyF2Yke1dgo7Bp14Hv+UcyaWIBr+CFI07jV8WHdvI3q R2dB9FHaoXa6U2ysbxJb8IpW4WNCm5dqvzAYw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=v0PE28r/gNP3k0TvmN3RBDS5gi12Ud1eJMRKS0WvuScQyBKnKLIxcgGp9K6kV1OjaW pWHjldXzl4y2CMeDeoYfJhMHl5MIhLZhrIlwCY5ZXm6aFYRj4P2la9zvy2QhM2R/4xd5 7ZJwCYBLyXV5lbnU3wXRAVGmuGn75Qs3mT+cE= Received: by 10.101.181.32 with SMTP id i32mr4134097anp.7.1264969372541; Sun, 31 Jan 2010 12:22:52 -0800 (PST) Received: from ?192.168.0.75? (cpe-24-174-183-197.satx.res.rr.com [24.174.183.197]) by mx.google.com with ESMTPS id 5sm1481284ywd.42.2010.01.31.12.22.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 31 Jan 2010 12:22:52 -0800 (PST) Message-ID: <4B65E69A.4010106@gmail.com> Date: Sun, 31 Jan 2010 14:22:50 -0600 From: Bruce Dubbs User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080722 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GNU GRUB References: <4B65E178.4050002@gmail.com> In-Reply-To: <4B65E178.4050002@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: [PATCH] Fix a special case when accessing partition on linux X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 20:22:57 -0000 Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Because of cache coherency problem grub accesses partitions on linux by > hdaX device and not by hda with correct offset. The problem is that > because of 4K cache blocks disk.c may read sectors before the partition > and hence making hostdisk.c try to read from negative offset. I'm sad > that we need such workarounds for free systems. I would think it beneficial for long term code maintenance to put the above comments into the code itself. // Because of a cache coherency problem grub accesses partitions // on linux by an hdaX device and not by hda with the correct offset. // The problem is that because of 4K cache blocks, disk.c may // read sectors before the partition and hence make // hostdisk.c try to read from a negative offset. -- Bruce