mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How VFS interacts with a file driver
@ 2001-05-14  5:29 Blesson Paul
  2001-05-14 13:55 ` Daniel Phillips
  0 siblings, 1 reply; 3+ messages in thread
From: Blesson Paul @ 2001-05-14  5:29 UTC (permalink / raw)
  To: linux-kernel

Hi
               I am trying to implement a distributed file system. For that I
write a file driver. I want to know the following things

1 . If I am writing a new file system, is it necessary to modify the existing
structs including inode struct. 
2 . If it is not needed, will a simple registration of the file system is
needed to mount the file system
                More over I am new to this area. I am doing as my graduate
project. I need someones help to crack the working of VFS
Thanks in advance
                          Blesson Paul

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How VFS interacts with a file driver
  2001-05-14  5:29 How VFS interacts with a file driver Blesson Paul
@ 2001-05-14 13:55 ` Daniel Phillips
  2001-05-14 20:12   ` Albert D. Cahalan
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Phillips @ 2001-05-14 13:55 UTC (permalink / raw)
  To: Blesson Paul, linux-kernel

On Monday 14 May 2001 07:29, Blesson Paul wrote:
> Hi
>                I am trying to implement a distributed file system.
> For that I write a file driver. I want to know the following things
>
> 1 . If I am writing a new file system, is it necessary to modify the
> existing structs including inode struct.
> 2 . If it is not needed, will a simple registration of the file
> system is needed to mount the file system
>                 More over I am new to this area. I am doing as my
> graduate project. I need someones help to crack the working of VFS
> Thanks in advance

1. In .config, change CONFIG_EXT2_FS to 'm'
2. change "ext2" to "newfs" at DECLARE_FSTYPE_DEV in super.c
3. make modules SUBDIRS=fs/ext2
4. insmod fs/ext2/ext2.o

Poof!  New filesystem.  (cat /proc/filesystems) Don't forget to change 
ext2 in .config back to "y" before you build your next kernel.  You'll 
need to study the kernel *hard* before you can expect to have half a 
chance of having your filesystem work properly.  Go here:

  http://lksr.org

and here:

  http://kernelnewbies.org

--
Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How VFS interacts with a file driver
  2001-05-14 13:55 ` Daniel Phillips
@ 2001-05-14 20:12   ` Albert D. Cahalan
  0 siblings, 0 replies; 3+ messages in thread
From: Albert D. Cahalan @ 2001-05-14 20:12 UTC (permalink / raw)
  To: Daniel Phillips; +Cc: Blesson Paul, linux-kernel

Daniel Phillips writes:
> On Monday 14 May 2001 07:29, Blesson Paul wrote:

>>                I am trying to implement a distributed file system.

Me too!  :-)

>> For that I write a file driver. I want to know the following things
>>
>> 1 . If I am writing a new file system, is it necessary to modify the
>> existing structs including inode struct.

Nope. There is a generic pointer you can use. You just need to
figure out when to free it, assuming you don't want to leak
lots of memory. Student projects can leak -- lucky you!

>> 2 . If it is not needed, will a simple registration of the file
>> system is needed to mount the file system
>>                 More over I am new to this area. I am doing as my
>> graduate project. I need someones help to crack the working of VFS
>> Thanks in advance
>
> 1. In .config, change CONFIG_EXT2_FS to 'm'
> 2. change "ext2" to "newfs" at DECLARE_FSTYPE_DEV in super.c
> 3. make modules SUBDIRS=fs/ext2
> 4. insmod fs/ext2/ext2.o
> 
> Poof!  New filesystem.  (cat /proc/filesystems) Don't forget to change 
> ext2 in .config back to "y" before you build your next kernel.  You'll 
> need to study the kernel *hard* before you can expect to have half a 
> chance of having your filesystem work properly.

Gotta love d_delete the function and d_delete the function pointer
in a struct. Discovery was cause for inventing new curses.

Along the way I stumble accross a "retval" that is only set once
and a "if(de &&" of "if(!de ||" (I forget) that is redundant.
Maybe in the proc or tmpfs code, just in case someone cares enough.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-14 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-14  5:29 How VFS interacts with a file driver Blesson Paul
2001-05-14 13:55 ` Daniel Phillips
2001-05-14 20:12   ` Albert D. Cahalan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®