Re: deriving a new filesystem type from ext2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 21, 2003 at 11:15:19AM -0800, Bryan Henderson wrote:
> 
> 
> 
> 
> >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
> >
> >...
> >
> >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.

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 <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux