slavaim / redirfs

A Linux file system filter based on redirfs
33 stars 27 forks source link

How to rmmod redirfs.ko #9

Open wangchuanfang opened 6 years ago

wangchuanfang commented 6 years ago

HI, I want ro rmmod redirfs.ko, and add the code: " static void __exit rfs_exit(void) { rfs_sysfs_delete();
rfs_file_cache_destory(); rfs_inode_cache_destroy(); rfs_dentry_cache_destory(); if (rfs_info_none) rfs_info_put(rfs_info_none); } module_exit(rfs_exit); "

/rfsctl/rfsctl -f roflt -i /home/test /rfsctl/rfsctl -f roflt -R /home/test /rfsctl/rfsctl -f roflt -u rmmod roflt.ko rmmod redirfs.ko The system has been restarted, How can i rmmod redirfs.ko

slavaim commented 6 years ago

Hi

I am currently a little busy. I will research on this issue in my spare time. Generally it is not an easy task to unload a file system filter (independent of OS - Windows, Linux etc). As an interim measure you can disable module unloading for your project thus requiring a reload to update.

wangchuanfang commented 6 years ago

HI, I know how to unload a file system filter , but I also hope to unload the redirfs.ko. I hope you take the time to help solve this problem.Thank you very much

wangchuanfang commented 6 years ago

HI, I know how to unload a file system filter , but I also hope to unload the redirfs.ko. I hope you take the time to help solve this problem.Thank you very much.

wangchuanfang commented 6 years ago

[root@localhost bak]# ./rfsctl -f roflt -c [root@localhost bak]# ./rfsctl -f roflt -u error: Device or resource busy [root@localhost bak]# cat /sys/fs/redirfs/filters/roflt/paths [root@localhost bak]# cat /sys/fs/redirfs/filters/roflt/tasks [root@localhost bak]# ls hligd librfsctl.so redirfs.ko rfsctl roflt.ko [root@localhost bak]# ./rfsctl -f roflt -u error: Device or resource busy

The roflt.ko can not unload, but I also hope to unload the redirfs.ko and roflt.ko.

tohosys commented 5 years ago

Dear wangchuanfang, I got the same problem. Did you have a solution? Thanks.

wangchuanfang commented 5 years ago

Sorry, I can't find a solution either

tohosys commented 5 years ago

@wangchuanfang check my solution, please...