On Mon, 2011-01-03 at 22:16 +0100, Michael Prokop wrote: > * Ben Hutchings <email@example.com> [Mon Jan 03, 2011 at 09:03:37PM +0000]: > > On Mon, 2011-01-03 at 16:37 -0400, Joey Hess wrote: > > > I hope this can be dealt with, it seems to be the only remaining > > > issue in getting Debian to support btrfs root filesystems. > > > > This is easily reproducible, I installed from a recent daily build > > > netinst, put /boot on ext3 and / on btrfs and same problem on boot. > > > > The problem is that btrfs depends on libcrc32c, which demand loads > > > any of several crc32c implementations, depending on hardware. Those > > > modules are not declared as dependencies, so initramfs-tools does not > > > include them. > > > > So, another way to see the same problem: > > > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv crc32c.ko ~ > > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko > > > insmod: error inserting '../lib/libcrc32c.ko': -1 Unknown symbol in module > > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv ~/crc32c.ko . > > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko > > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto> > > > > So, at least a workaround would be for the initramfs to have crc32c added to > > > it whenever libcrc32c is. Attached patch just adds it to the base modules > > > list; since btrfs is already there that seems like an ok quick fix. > > > This is stupid. Without a declared module dependency, a MODULES=dep > > configuration will remain broken. I think this needs to be fixed in the > > kernel instead. > > > > Note that it would probably be better to try first loading hardware optimised > > > versions like crc32c-intel, and only load crc32c if they fail to load. > > > I believe that happens automatically, as the hardware-optimised modules > > provide an alias of 'crc32c'. > > > > (BTW, this bug probably also breaks netbooting with certian ethernet cards > > > whose drivers also use libcrc32c.) > > > Right. > > Thanks for showing up, would be nice to see this fixed. > > I just want to make sure you're aware of my bugreport #602254 > (which Joey seemed to have noticed already according to its > BTS history). > > Ben, do you think this could be fixed at the kernel side? Eventually, yes, but unfortunately it turns out that we can't fix it immediately. 'depmod' only looks at symbol dependencies; there is no way for modules to declare explicit dependencies through module information. We can bodge it by exporting a specific symbol from crc32c and referring to that from libcrc32c, but since the optimised version doesn't satisfy that dependency it will not be loaded. So I'm afraid this will have to be worked around in initramfs-tools for now: whenever you add libcrc32c, add crc32c as well (no matter how libcrc32c was selected). Ben. -- Ben Hutchings Once a job is fouled upbv, anything done to improve it makes it worse.
Description: This is a digitally signed message part