Cache Manager

Love Hörnquist-Åstrand e96_lho at elixir.e.kth.se
Sun Mar 22 16:32:41 CET 1998


wwshen at eecs.umich.edu writes:

assert(uname == *BSD);

> > The procedure is something like this: (simplified)
> > 
> >  - The application program does a syscall, (on a file from arla)
>                                               ^^^^^^^^^^^^^^^^^^^^
>  					      What does this mean?

He means on a file i /afs space (that arla handles).

> >  - The syscall is interpreted by the kernel,
> 
>      So this is not implemented by you, right?

No, the syscall in this case is sys_read() and that is
a generic syscall that work for most filesystem, sockets, etc

When you do the sys_read on an file descriptor you can find
out the vnode that is associated with this fd. This vnode the
VFS-layer can do what ever it wants to do with, and in sys_read
case using the macro VOP_READ seams a good idea.

> >  - The kernel find out on which filesystem the file is, (our filesystem is xfs)
>  
>      So this in not implemented by you, but you need to provide
> some information to the kernel so that it can switch to the
> appropriate filsystem, right? Where is this file and functions?

When a vnode is created is vnode operations is taken from the
parent vnode. This should be part of the vfs-layer.

> >  - The kernel calls a VFS-operation om that filesystem, (xfs)
> >     (in most cases xfs already has the file in the local cache, but
> >      let's say it doesn't)
> 
>       I think VFS is Virtual File System, which is used to reference
> the file entries but independent on the low implementation. But I
> dont know what is the difference between the VFS operation and vnode
> operation. 

I guess art really meant vnode operation.

> I think at the mount point there is a mount structre connecting
> a list of vnode related to this mount point.

Yes it does, guess its most use for housekeeping. The vnode structure
itself contain all infomation that the vfslayer need.

> Is that the function
> xfs_mount doing? Again, how can kernel call the function in xfs_vfsops.c
> and xfs_vnodeops.c. 

The vfs operations are those that live in the xfs_vfsops structure
in xfs_vnodops.c, the vnode ops are those functions that live
in the xfs_vnodeop_entires structures in xfs_vnodeops.c

These to structures are given the the kernel when the xfs module
is modload:ed into the kernel. 

Hope that this makes any sense and I'm not confusing you more.

Love






More information about the Arla-drinkers mailing list