> On Sat, 2006-01-07 at 11:22 +0530, prasad Musale wrote: > > Hello Friends, > > I am doing work on stackable file system RAIF, which > implements the > > RAID functionality at file system level. I got confused > about where to > > put my stackable functions. E.g. for reading a file sys_read > calls the > > vfs_read(), which in turn calls the lower level fs read() > function(In > > most of the fs it's generic_file_read()). > Generic_file_read() uses > > page cache & get page from disk .Now if I want to add my > > functionality(Stripping or mirroring), where should I add > it? > > In generic_file_read() or before generic_file_read(that > means > > capturing the pointer from vfs, adding our function & then > calling > > generic_file_read.)? > > Does anyone knows more about stackable fs. I know the basic > design but > > do not know it at coding level. > > Thanks. It doesn't seem like you are familiar with stackable file systems. To put it very simply, in this environment you will have multiple versions of each file system object (for most objects) instead of one. Let's say you have RAIF mirrored with four branches, where each branch is an ext2 file system. For each file, you will actually have five inodes - one RAIF inode, and four ext2 inodes. The VFS will call functions from the RAIF inode's operation vector. This function should then call operations from the lower-level inode operation vectors. So for example, the RAIF read function should call one of the lower level inodes to do the read if it is mirrored, but should read from all lower level inodes if it is striped. It seems like you are not familiar with the key concepts here - you should definitely read the following papers: http://www.fsl.cs.sunysb.edu/docs/raif-ccgrid05/raif.html http://www.fsl.cs.sunysb.edu/docs/linux-stacking/index.html http://www.fsl.cs.sunysb.edu/docs/wrapfs/index.html Good luck with the project! Avishay Traeger http://www.fsl.cs.sunysb.edu/~avishay/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/