thanks Dave :) I didn't know about rkfs.. is there some other place that gives a deep loop to vfs? and what about journaling? :) On Mon, Feb 9, 2009 at 11:05 PM, Dave Kleikamp <shaggy@xxxxxxxxxxxxxxxxxx> wrote: > On Mon, 2009-02-09 at 14:54 +0100, Alberich de megres wrote: >> Hello, >> >> I'm making my firsts steps with vfs and filesystem playground. >> >> I created a very simple fs, for wich i have a rude mkfs and its >> fill_super function on kernel side. fill_super finish ok, and loadas >> the super block for my filesystem, but when i make mount -t testfs >> /dev/sdb1 /mnt/tfs i got the following message: "mount: not a >> directory" > > fill_super() needs to at least allocate an inode and dentry for the root > inode and assign sb->s_root to point to the root dentry. > >> And here comes my question: what vfs is supposed to do since it loads >> sb and tries to list dir content? and what functions vfs needs at >> least to mount my fs? ( just load it, and display an empty dir with >> ls, not creating files etc... ) >> > > The root inode needs to have file operations (i_fop) that include a > readdir() method and probably one for llseek() (generic_file_llseek > should be sufficient). > > If you haven't already found it, you probably want to take a look at > http://www.geocities.com/ravikiran_uvs/articles/rkfs.html > > Shaggy > -- > David Kleikamp > IBM Linux Technology Center > > -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html