From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KN38r-0000zD-FA for mharc-grub-devel@gnu.org; Sun, 27 Jul 2008 06:06:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KN38o-0000yj-8V for grub-devel@gnu.org; Sun, 27 Jul 2008 06:06:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KN38m-0000yX-Gg for grub-devel@gnu.org; Sun, 27 Jul 2008 06:06:13 -0400 Received: from [199.232.76.173] (port=41838 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KN38m-0000yU-BO for grub-devel@gnu.org; Sun, 27 Jul 2008 06:06:12 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:63763) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KN38l-00064C-KT for grub-devel@gnu.org; Sun, 27 Jul 2008 06:06:12 -0400 Received: by ti-out-0910.google.com with SMTP id u5so1825849tia.10 for ; Sun, 27 Jul 2008 03:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=DAXHI7oXa2EfFHG16lrw1NCnSH9KdvsSHSX77IKrrus=; b=D/cBEzyzKSPAnXCvCFyDgPYHaf3xx7TNqZethl+13QbxxBpgaU2r7N4br0Ek3S0Pzf 8zXn5fdpgfYSsRzQ1ASL7H52qlz97TgY6lxnijNqPu8TXbFncujQ1TfZt17RNEFG6HRl Mdk77hOFtgy8zUuDrmaRrke1WcUq/YNAIWl5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=eGiF9cV9oxmtUhwvBHywo9PQHMfwHjdIMr0sAliM9VDt7H5miniYdg7spVZr4qBPd7 uX3I38wafJeVkneX0nARZ2bhNdBzi0UlgRl4odZcV9LyV2RxtybB3ooPLHsfKDMreBu1 yrMg+rePFXrz6ormbXL4R3YlYq3iIGLYMeVDk= Received: by 10.110.46.14 with SMTP id t14mr4252874tit.28.1217153169092; Sun, 27 Jul 2008 03:06:09 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Sun, 27 Jul 2008 03:06:09 -0700 (PDT) Message-ID: Date: Sun, 27 Jul 2008 18:06:09 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <1217144855.16601.51.camel@ct> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_30808_100082.1217153169078" References: <8d4ac6e00807261856p516c884eldb3ca1c1cda3b37b@mail.gmail.com> <1217144855.16601.51.camel@ct> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: "Out of Partition" error on XFS still occuring 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: Sun, 27 Jul 2008 10:06:14 -0000 ------=_Part_30808_100082.1217153169078 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, Jul 27, 2008 at 3:47 PM, Pavel Roskin wrote: > On Sat, 2008-07-26 at 20:56 -0500, Dan Callahan wrote: >> Hi, I seem to be able to recreate the xfs "out of partition" error >> using Debian's most recent grub-pc release, 1.96+20080724-2. >> >> This bug is being tracked at >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D436943 , and was >> first reported one year ago. A patch from Niels B=F6hm last month was >> thought to resolve it, but I'm still seeing the issue. >> >> A dd copy of the offending filesystem is available at >> http://neoflux.net/tmp/xfs-boot.tar.gz (8.9 MB compressed, 243 MB >> uncompressed, link should remain active through August.) >> >> Mounted as a loopback device in grub-emu, ls (device) detects that it >> is xfs, but ls (device)/ and ls (device)/grub fail with the out of >> partition error. > > Valgrind on x86_64 indicates something interesting: > > $ valgrind grub-fstest /home/proski/tmp/xfs/xfs-boot.img ls / > =3D=3D23594=3D=3D Memcheck, a memory error detector. > =3D=3D23594=3D=3D Copyright (C) 2002-2007, and GNU GPL'd, by Julian Sewar= d et al. > =3D=3D23594=3D=3D Using LibVEX rev 1804, a library for dynamic binary tra= nslation. > =3D=3D23594=3D=3D Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LL= P. > =3D=3D23594=3D=3D Using valgrind-3.3.0, a dynamic binary instrumentation = framework. > =3D=3D23594=3D=3D Copyright (C) 2000-2007, and GNU GPL'd, by Julian Sewar= d et al. > =3D=3D23594=3D=3D For more details, rerun with: -v > =3D=3D23594=3D=3D > em.map-2.6.25-2-amd64/ =3D=3D23594=3D=3D Conditional jump or move depe= nds on uninitialised value(s) > =3D=3D23594=3D=3D at 0x415FB9: call_hook.2389 (xfs.c:378) > =3D=3D23594=3D=3D by 0x4167DB: grub_xfs_iterate_dir (xfs.c:469) > =3D=3D23594=3D=3D by 0x41697C: grub_xfs_dir (xfs.c:659) > =3D=3D23594=3D=3D by 0x4083EC: grub_cmd_ls (ls.c:176) > =3D=3D23594=3D=3D by 0x4011C7: execute_command (grub-fstest.c:120) > =3D=3D23594=3D=3D by 0x401452: fstest (grub-fstest.c:305) > =3D=3D23594=3D=3D by 0x4016DF: main (grub-fstest.c:513) > > "em.map-2.6.25-2-amd64/" is apparently the ls output. Yet Linux can > mount the volume, and it shows reasonable names. Hi, This problem is caused by the previous patch, it expands the size of grub_xfs_dir_header: struct grub_xfs_dir_header { grub_uint8_t count; grub_uint8_t i8count; union { grub_uint32_t i4; grub_uint64_t i8; } parent __attribute__ ((packed)); } __attribute__ ((packed)); The size is always 10 bytes, but in fact, when small inode is used, it should be 6 bytes. Then, in struct grub_xfs_inode, grub_xfs_dir_header cause subsequence fields to move. This patch revert the change, it should be ok now. --=20 Bean ------=_Part_30808_100082.1217153169078 Content-Type: text/x-diff; name=xfs.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fj5h4vtq0 Content-Disposition: attachment; filename=xfs.diff ZGlmZiAtLWdpdCBhL2ZzL3hmcy5jIGIvZnMveGZzLmMKaW5kZXggN2RhM2U0MC4uN2I5ZDc3OCAx MDA2NDQKLS0tIGEvZnMveGZzLmMKKysrIGIvZnMveGZzLmMKQEAgLTU2LDEyICs1Niw4IEBAIHN0 cnVjdCBncnViX3hmc19zYmxvY2sKIHN0cnVjdCBncnViX3hmc19kaXJfaGVhZGVyCiB7CiAgIGdy dWJfdWludDhfdCBjb3VudDsKLSAgZ3J1Yl91aW50OF90IGk4Y291bnQ7Ci0gIHVuaW9uCi0gIHsK LSAgICBncnViX3VpbnQzMl90IGk0OwotICAgIGdydWJfdWludDY0X3QgaTg7Ci0gIH0gcGFyZW50 IF9fYXR0cmlidXRlX18gKChwYWNrZWQpKTsKKyAgZ3J1Yl91aW50OF90IHNtYWxsbm87CisgIGdy dWJfdWludDMyX3QgcGFyZW50OwogfSBfX2F0dHJpYnV0ZV9fICgocGFja2VkKSk7CiAKIHN0cnVj dCBncnViX3hmc19kaXJfZW50cnkKQEAgLTQyMyw3ICs0MTksNyBAQCBncnViX3hmc19pdGVyYXRl X2RpciAoZ3J1Yl9mc2hlbHBfbm9kZV90IGRpciwKICAgICBjYXNlIFhGU19JTk9ERV9GT1JNQVRf SU5POgogICAgICAgewogCXN0cnVjdCBncnViX3hmc19kaXJfZW50cnkgKmRlID0gJmRpcm8tPmlu b2RlLmRhdGEuZGlyLmRpcmVudHJ5WzBdOwotCWludCBzbWFsbGlubyA9ICFkaXJvLT5pbm9kZS5k YXRhLmRpci5kaXJoZWFkLmk4Y291bnQ7CisJaW50IHNtYWxsaW5vID0gIWRpcm8tPmlub2RlLmRh dGEuZGlyLmRpcmhlYWQuc21hbGxubzsKIAlpbnQgaTsKIAlncnViX3VpbnQ2NF90IHBhcmVudDsK IApAQCAtNDMxLDEyICs0MjcsMTIgQEAgZ3J1Yl94ZnNfaXRlcmF0ZV9kaXIgKGdydWJfZnNoZWxw X25vZGVfdCBkaXIsCiAJICAgcGFyZW50IGlub2RlIG51bWJlciBpcyBzbWFsbCB0b28uICAqLwog CWlmIChzbWFsbGlubykKIAkgIHsKLQkgICAgcGFyZW50ID0gZ3J1Yl9iZV90b19jcHUzMiAoZGly by0+aW5vZGUuZGF0YS5kaXIuZGlyaGVhZC5wYXJlbnQuaTQpOworCSAgICBwYXJlbnQgPSBncnVi X2JlX3RvX2NwdTMyIChkaXJvLT5pbm9kZS5kYXRhLmRpci5kaXJoZWFkLnBhcmVudCk7CiAJICAg IHBhcmVudCA9IGdydWJfY3B1X3RvX2JlNjQgKHBhcmVudCk7CiAJICB9CiAJZWxzZQogCSAgewot CSAgICBwYXJlbnQgPSBkaXJvLT5pbm9kZS5kYXRhLmRpci5kaXJoZWFkLnBhcmVudC5pODsKKwkg ICAgcGFyZW50ID0gKihncnViX3VpbnQ2NF90ICopICZkaXJvLT5pbm9kZS5kYXRhLmRpci5kaXJo ZWFkLnBhcmVudDsKIAkgICAgLyogVGhlIGhlYWRlciBpcyBhIGJpdCBiaWdnZXIgdGhhbiB1c3Vh bC4gICovCiAJICAgIGRlID0gKHN0cnVjdCBncnViX3hmc19kaXJfZW50cnkgKikgKChjaGFyICop IGRlICsgNCk7CiAJICB9Cg== ------=_Part_30808_100082.1217153169078--