Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Nr78v-0007lQ-Tj for mharc-grub-devel@gnu.org; Mon, 15 Mar 2010 06:03:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nr78u-0007lC-6q for grub-devel@gnu.org; Mon, 15 Mar 2010 06:03:24 -0400 Received: from [140.186.70.92] (port=46441 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nr78r-0007kz-Cn for grub-devel@gnu.org; Mon, 15 Mar 2010 06:03:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nr78o-0008D0-SQ for grub-devel@gnu.org; Mon, 15 Mar 2010 06:03:20 -0400 Received: from mail2.asahi-net.or.jp ([202.224.39.198]:11494) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nr78o-0008CS-Bx for grub-devel@gnu.org; Mon, 15 Mar 2010 06:03:18 -0400 Received: from rabbit.sekiba.org (x238029.ppp.asahi-net.or.jp [122.249.238.29]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id 1EA189D4AD for ; Mon, 15 Mar 2010 19:03:13 +0900 (JST) Date: Mon, 15 Mar 2010 19:03:13 +0900 Message-ID: <87k4tdc36m.wl%jir@sekiba.com> From: Jiro SEKIBA To: The development of GNU GRUB In-Reply-To: <4B9CD76E.8020102@gmail.com> References: <87aaug8iw0.wl%jir@sekiba.com> <4B979915.8020203@gmail.com> <8763545kvt.wl%jir@sekiba.com> <4B9CD76E.8020102@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: Re: How can I use grub_getcrc32 in fs module 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: Mon, 15 Mar 2010 10:03:24 -0000 Hi, At Sun, 14 Mar 2010 13:32:46 +0100, Vladimir '=F6-coder/phcoder' Serbinenko wrote: >=20 > [1 ] > [1.1 ] > Jiro SEKIBA wrote: > >> Filesystem modules are often size-constrained. So we skip the > >> consistency checks unless they are inherent part of filesystem operati= on. > >> If filesystem is corrupted there isn't much we can do other than hope > >> that boot-related files aren't affected. GRUB itself never writes to fs > >> metadata so it won't lead to any additional corruption > >> =20 > > > > Ah, I see. Ok, then we may skip checking super block crc. > > =20 > Skipping only part of crc checks doesn't bring anything. > > > However, becuase of nature of nilfs2, a log file system, > > I need to roll forward the logs to find the latest log > > in case that super block does not point appropriate latest log > > on unclean unmounting. > > > > In the forwarding process, log is verified by crc. > > > > =20 > In this case ok. Can you make tests and compare the size with either > using lib/crc.c or CRC32 from crypto framework? This is something that > would justify keeping lib/crc.c despite my previous plans on its removal > if the difference is significant. OK, I'll try to compare. > >>> I added lib/crc.c in SOURCES in common.rmk for the fs module. > >>> It looks OK to compile the target fs module. > >>> However I got following link error for grub-setup and grub-probe. > >>> > >>> grub_setup-fs_nilfs2.o: In function `grub_nilfs2_valid_sb': > >>> nilfs2.c:(.text+0xe29): undefined reference to `grub_getcrc32' > >>> nilfs2.c:(.text+0xe47): undefined reference to `grub_getcrc32' > >>> nilfs2.c:(.text+0xe7e): undefined reference to `grub_getcrc32' > >>> collect2: ld returned 1 exit status > >>> > >>> I was trying to specify lib/crc.c in grub_setup_SOURCES, but got same= result. > >>> > >>> =20 > >>> =20 > >> Stupid question: have you rerun ./autogen.sh ? > >> =20 > > > > Yes, I did. I should have mentioned. > > What I did is > > > > sh autogen.sh > > make clean;./configure;make > > > > =20 > May I have a look at this part of the patch? Sure, that I did the following in common.rmk. And I see that added line is in a common.mk after rerun autogen.sh. -------8<-------8<-------8<-------8<-------8<------- =3D=3D=3D modified file 'conf/common.rmk' --- conf/common.rmk 2010-03-10 14:05:15 +0000 +++ conf/common.rmk 2010-03-10 19:57:34 +0000 @@ -132,6 +132,7 @@ DISTCLEANFILES +=3D grub_probe_init.c =20 # For grub-setup. +grub_setup_SOURCES =3D lib/crc.c grub_setup_init.lst: geninit.sh $(filter-out grub_setup_init.c,$(grub_setu= p_SOURCES)) rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@ DISTCLEANFILES +=3D grub_setup_init.lst -------8<-------8<-------8<-------8<-------8<------- thanks, regards, >=20 > --=20 > Regards > Vladimir '=F6-coder/phcoder' Serbinenko >=20 >=20 > [1.2 OpenPGP digital signature ] >=20 > [2 ] > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --=20 Jiro SEKIBA