From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LiXly-0004r3-L8 for mharc-grub-devel@gnu.org; Sat, 14 Mar 2009 13:35:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiXlw-0004qh-Hl for grub-devel@gnu.org; Sat, 14 Mar 2009 13:35:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiXlr-0004qM-Ku for grub-devel@gnu.org; Sat, 14 Mar 2009 13:35:43 -0400 Received: from [199.232.76.173] (port=48898 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiXlr-0004qJ-GJ for grub-devel@gnu.org; Sat, 14 Mar 2009 13:35:39 -0400 Received: from aybabtu.com ([69.60.117.155]:35685) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LiXlr-0005PN-4G for grub-devel@gnu.org; Sat, 14 Mar 2009 13:35:39 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1LiXdH-0003VQ-2c for grub-devel@gnu.org; Sat, 14 Mar 2009 18:26:48 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1LiXlb-0003kT-5Q for grub-devel@gnu.org; Sat, 14 Mar 2009 18:35:23 +0100 Date: Sat, 14 Mar 2009 18:35:23 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090314173523.GA14401@thorin> References: <20090314163757.GA13991@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Bug fix for ext2.c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2009 17:35:45 -0000 On Sun, Mar 15, 2009 at 12:56:26AM +0800, Bean wrote: > On Sun, Mar 15, 2009 at 12:37 AM, Robert Millan wrote: > > On Sun, Mar 15, 2009 at 12:16:23AM +0800, Bean wrote: > >> Hi, > >> > >> I've discovered a bug in ext2.c, inside grub_ext2_mount. The mount > >> function must return GRUB_ERR_BAD_FS if something goes wrong, because > >> grub_fs_probe would stop as soon as it sees a non-GRUB_ERR_BAD_FS > >> error, thus preventing other fs driver from detecting the correct fs > >> type. This patch fixes the problem. > > > > I think current behaviour is correct.  If a failure is triggered by > > grub_disk_read(), from grub_fs_probe perspective it means something is > > fucked up other than just "this is not the FS we're looking for", so it > > should be aware of the difference. > > > > Or is grub_ext2_read_inode() failure the one that's causing trouble for > > you? > > Hi, > > ext2 only reads the first two sectors in mount, which is normally ok , > but there are exceptions. For example, cpio filesystem could be less > one sector. I don't understand what you mean here. If grub_disk_read failed, this indicates something's broken down in the disk layer doesn't it? How is the number of sectors related to this? > Also, hostfs always return error in its read function, > which would cause ext2 to fail. The effect can be seen in grub-fstest. > hostfs is the first fs driver to register, and the last to query. When > accessing the (host) device, ext2 cause it to fail before hostfs has a > chance to see it. Why does hostfs fail? Is this intentional? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."