Hi,
I am using a code for a block device driver from following site:
http://www.kernel-labs.org/?q=blockdriver&PHPSESSID=0b5c36c40ec71ec1587f...
This code works fine. But when I try to remove that module using
rmmod, it says "Error: module bdev is in use".
Even if I insert the module and immediately try to remove it without
using it, I get the same error. Once add_disk() is called kernel tries
to read the partition table from that device, which is normal. I need
to reboot the machine every time whenever I have to try modified
module. I am not getting who is referring to that module.
Thanks.
rmmod -f doesnt work ?
rmmod -f doesnt work ?
No, rmmod -f doesn't
No, rmmod -f doesn't work.
-
~prash.bhole
dmesg
what is in dmesg and the logfiles? does some program (gnome, kde) or daemon detect the added device and automatically try to mount it? have you looked for references with fuser or lsof (both have to run as root to show all references)?
After loading this module,
After loading this module, dmesg log has only printk messages from this module, nothing other than that. fuser and lsof doesn't show any references to this module. Did anybody try the same code? May be you'll face the same problem.
-
~prash.bhole
It works for my
The driver is working for my:
# insmod mini_block.ko
# rmmod mini_block
# dmesg | grep minidb
minibd: register success
minibd0: unknown partition table
minibd: download with succes!
# uname -r
2.6.25.6-55.fc9.i686
Thanks. There was some
Thanks. There was some problem in my kernel. It worked on my friend's machine. :)
-
~prash.bhole
ya in my case also its
ya in my case also its saying module can not be removed but i have my own block device driver module.each time i have to reboot the machine..what shld i do to reflact the changes i m making in module and how do i remove this module whch i inserted using :
insmod ./mod.ko
thanks