Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LiXA4-00022T-QK for mharc-grub-devel@gnu.org; Sat, 14 Mar 2009 12:56:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiXA3-000211-DY for grub-devel@gnu.org; Sat, 14 Mar 2009 12:56:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiX9y-0001vU-Q6 for grub-devel@gnu.org; Sat, 14 Mar 2009 12:56:34 -0400 Received: from [199.232.76.173] (port=48836 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiX9y-0001vF-La for grub-devel@gnu.org; Sat, 14 Mar 2009 12:56:30 -0400 Received: from ti-out-0910.google.com ([209.85.142.191]:7493) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LiX9y-0000oB-5S for grub-devel@gnu.org; Sat, 14 Mar 2009 12:56:30 -0400 Received: by ti-out-0910.google.com with SMTP id j3so526911tid.10 for ; Sat, 14 Mar 2009 09:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=LVTtNHe95tE+ZEF6cXzOgb41Lz8hcYtQA4NKpjLyV+4=; b=Q6GtKa1C0v/wJEjryxgvDS93mvuT5BEFWY+Gtsx53VpbJAhD3ZmYlSUVFflqCcy0WD FR8tqqBRfXqz0WxNUKXGrXkeZVv/MjwDwnSq0lrfHVm5aT6tawKM8xl0N3lb5sv+nuKe /cpK1F2xyWoxMnDhWZJAtPwznLh6hjIrZlFq0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=l+q7l1LAUcloZyNja2TNtqNPlel/7P8ivMlHsGRTRGpYTEPoXmvHXGhkidztlFyow4 ikbM7QBKtPOsbqNB3l79i+3M507jiovg/b5Vz1PDiR/yxzB8SXo3BpqDTGllsJYXzkt2 nd9GPMUGkBZqvokGOxm9DPM8t8Y1glHsxDMdc= MIME-Version: 1.0 Received: by 10.110.57.5 with SMTP id f5mr4151251tia.49.1237049786647; Sat, 14 Mar 2009 09:56:26 -0700 (PDT) In-Reply-To: <20090314163757.GA13991@thorin> References: <20090314163757.GA13991@thorin> Date: Sun, 15 Mar 2009 00:56:26 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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 16:56:35 -0000 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. =A0If 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. 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. --=20 Bean