You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might misunderstand something, so, sorry in advance if this is the case here.
I think there is a bug in the code that checks if modprobe should be skipped, by looking at the symbols built into the kernel. For the dm-cache-smq module this code tries to find the smq_exit symbol, and if this symbol is found in the kernel, it skips the modprobe.
I just checked my /proc/kallsyms file and there is no symbol named smq_exit in my kernel. I am 100% certain that smq is compiled into the kernel, and related symbols like smq_init are indeed present.
My knowledge of the kernel build process is limited, but since the smq_exit function has no usages if the driver is built directly into the kernel, and is marked as static, the compiler probably removes it during optimization.
If I understood this correctly, I would suggest to change the _features array in the _target_present function in lib/cache_segtype/cache.c to check for another symbol from smq, maybe smq_init.
The text was updated successfully, but these errors were encountered:
Which should be possibly solving the issue with built-in module better as parsing kallsyms takes quite some times. So please check upstream head whether this solves the problem for your systems.
I think this issue can be closed then, as it is no longer applicable to the latest version.
I have one (small) remark however:
The new code relies on the presence of the /lib/modules directory, while the previous code only relied on kernel virtual file systems. This could render existing initramfs images un-bootable.
I stumbled across the missing symbol when I worked a minimal initramfs, and got error messages about a missing modprobe executable. That was why I started digging in the lvm source code to find out why it would even try to call modprobe, even though I had built all required modules into the kernel.
Thinking a bit more about this, I am now slightly confused, because I would expect module_present() to find the /sys/module/dm_cache folder before even reaching the part that calls modprobe...
The reason, why there is no 'dm_cache' module entry is - that this module doesn't have any parameter - so it will not have anything there for 'compiled-in' version - which then leads to these unrortunate hacks.
And yes - I've considered the case of missing these files in ramdisk - but that should be seen as pure bug on 'ramdisk' building software - as other tools like modprobe simply do rely on this file.
Also whoever is 'minimazing' ramdisk in such an obscure way to drop failrly minimalistic files - is likely not in the position of using cache anyway - so overal the performance gains from parsing just this file over parsing 9M strings... was clear win here...
I might misunderstand something, so, sorry in advance if this is the case here.
I think there is a bug in the code that checks if modprobe should be skipped, by looking at the symbols built into the kernel. For the
dm-cache-smq
module this code tries to find thesmq_exit
symbol, and if this symbol is found in the kernel, it skips the modprobe.I just checked my
/proc/kallsyms
file and there is no symbol namedsmq_exit
in my kernel. I am 100% certain that smq is compiled into the kernel, and related symbols likesmq_init
are indeed present.My knowledge of the kernel build process is limited, but since the
smq_exit
function has no usages if the driver is built directly into the kernel, and is marked asstatic
, the compiler probably removes it during optimization.If I understood this correctly, I would suggest to change the
_features
array in the_target_present
function in lib/cache_segtype/cache.c to check for another symbol from smq, maybesmq_init
.The text was updated successfully, but these errors were encountered: