grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I use grub_getcrc32 in fs module


From: Jiro SEKIBA
Subject: Re: How can I use grub_getcrc32 in fs module
Date: Mon, 15 Mar 2010 19:03:13 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/22.3 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)

Hi,

At Sun, 14 Mar 2010 13:32:46 +0100,
Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> 
> [1  <multipart/signed (7bit)>]
> [1.1  <text/plain; UTF-8 (quoted-printable)>]
> Jiro SEKIBA wrote:
> >> Filesystem modules are often size-constrained. So we skip the
> >> consistency checks unless they are inherent part of filesystem operation.
> >> 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
> >>     
> >
> > Ah, I see.  Ok, then we may skip checking super block crc.
> >   
> 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.
> >
> >   
> 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.
> >>>
> >>>   
> >>>       
> >> Stupid question: have you rerun ./autogen.sh ?
> >>     
> >
> > Yes, I did.  I should have mentioned.
> > What I did is
> >
> > sh autogen.sh
> > make clean;./configure;make
> >
> >   
> 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<-------
=== 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 += grub_probe_init.c
 
 # For grub-setup.
+grub_setup_SOURCES = lib/crc.c
 grub_setup_init.lst: geninit.sh $(filter-out 
grub_setup_init.c,$(grub_setup_SOURCES))
                      rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > 
$@
 DISTCLEANFILES += grub_setup_init.lst
-------8<-------8<-------8<-------8<-------8<-------

thanks,

regards,

> 
> -- 
> Regards
> Vladimir 'φ-coder/phcoder' Serbinenko
> 
> 
> [1.2 OpenPGP digital signature <application/pgp-signature (7bit)>]
> 
> [2  <text/plain; us-ascii (7bit)>]
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Jiro SEKIBA <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]