Hi
Hi
If i'm not loading it as module , but it is fixed in kernel then which file calls the function register_filesystem , it will be enough no if i chnge the name of fs , in the make file to produce a .o file .
Supose my fs name is "ext2cryptfs" , will make change in make files to make a ext2cryptfs.o file and in super.c i gave proper name in register_filesystem call in function init now ,
here are two cases when it is loaded as module or fixed in kernel as permenent resident , then in later case where i need to chnage , from documents i got that i need to change vfs code but wher are those files
i'm unable to find for last one week ,
plz try to solve my trivial question
with regards
Rajaram
Quoted 16 lines · On Wed, 19 Feb 2003 Bryan Henderson wrote :
Quoted 6 lines
but when I tried to load it as a module, it gave versioning problems and the load failed
Versioning problems are common. It means you didn't use the same kernel headers to compile the module as were used to compile the base kernel into which you are trying to insert it.
It can be tricky to get your compile straightened out, and it has nothing to do with filesystems, so I don't want to go into it on the linux-fsdevel list (which I am copying just so others on that list can see that there was a response).
Quoted 9 lines
I can tell you this, though, which you can use when you get your module to
load: The ext2 filesystem driver registers itself as a driver for the "ext2" filesystem type by callingregister_filesystem(), which it does in the source filefs/ext2/super.c, in a function that gets called as the module loads. If you did not change that file in your copy, your module will try to register itself as a driver for "ext2" and will fail because there is already a driver for "ext2". You will need to make up a new filesystem type name.
R@j@r@m
deriving a new filesystem type from ext2
Quoted 8 lines
Supose my fs name is "ext2cryptfs" , will make change in make files to make a ext2cryptfs.o file and in
super.ci gave proper name inregister_filesystemcall in function init now ,
Quoted 8 lines
here are two cases when it is loaded as module or fixed in kernel as permenent resident , then in later case where i need to chnage , from documents i got that i need to change vfs code but wher are those files
...
plz try to solve my trivial question
I had a lot of trouble parsing this English, so forgive me if I'm not understanding your question. The term "vfs code" is ambiguous -- people use it to mean different things. But you say you changed super.c in your filesystem driver from what it was in the ext2 filesystem driver that you copied. That is all you need to do. There is no other code you have to change to make your new filesystem type work.
But if you are binding your filesystem driver into the base kernel rather than loading it dynamically, there is something you have to do to get the base kernel build to include your code and to get the base kernel initialization code to initialize your filesystem driver. I don't know exactly what that is, though. I've never done it.
--
Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/
Re: deriving a new filesystem type from ext2
Quoted 24 lines · Bryan Henderson
Quoted 8 lines
Supose my fs name is "ext2cryptfs" , will make change in make files to make a ext2cryptfs.o file and in
super.ci gave proper name inregister_filesystemcall in function init now ,Quoted 8 lines
here are two cases when it is loaded as module or fixed in kernel as permenent resident , then in later case where i need to chnage , from documents i got that i need to change vfs code but wher are those files
...
plz try to solve my trivial question
I had a lot of trouble parsing this English, so forgive me if I'm not understanding your question. The term "vfs code" is ambiguous -- people use it to mean different things. But you say you changed
super.cin your filesystem driver from what it was in the ext2 filesystem driver that you copied. That is all you need to do. There is no other code you have to change to make your new filesystem type work.
Quoted 5 lines
But if you are binding your filesystem driver into the base kernel rather than loading it dynamically, there is something you have to do to get the base kernel build to include your code and to get the base kernel initialization code to initialize your filesystem driver. I don't know exactly what that is, though. I've never done it.
I understand the term "vfs code" as the generic code in fs directory itself (not subdirectories). IIRC In 2.4.x you should only need to change it's header. include/linux/fs.h needs to include headers *_fs_i.h and *_fs_sb.h. If you created ext2crypt_fs.h, ext2crypt_fs_i.h and ext2crypt_fs_sb.h (you need to, because you must have renamed public symbols), make fs.h to know about the later two. In 2.5.x you need no changes to any C code whatsoever.
Then you need to tell makefile to build it. You need to add a tristate config option for your filesystem and add your directory and files to obj-$(<your-option>). (Just copy the things for CONFIG_EXT2_FS for your option.)
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <[email protected]>