login
Header Space

 
 

unable to remove block device driver module

August 25, 2008 - 7:15am
Submitted by prash.bhole on August 25, 2008 - 7:15am.
Linux

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 ?

August 25, 2008 - 10:30am
Anonymous (not verified)

rmmod -f doesnt work ?

No, rmmod -f doesn't

August 25, 2008 - 12:31pm

No, rmmod -f doesn't work.
-
~prash.bhole

dmesg

August 25, 2008 - 4:25pm

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,

August 27, 2008 - 12:43pm

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

August 28, 2008 - 5:07pm

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

August 31, 2008 - 3:34am

Thanks. There was some problem in my kernel. It worked on my friend's machine. :)
-
~prash.bhole

ya in my case also its

September 19, 2008 - 7:24am
chanda (not verified)

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary