From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alberich de megres Subject: Re: root dir Date: Tue, 10 Feb 2009 13:18:32 +0100 Message-ID: <12d708830902100418x1da9aee0w5d47b412131d85cf@mail.gmail.com> References: <12d708830902090554n397ad6aeye1d9d60660f4553f@mail.gmail.com> <1234217104.7851.4.camel@norville.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: Dave Kleikamp Return-path: Received: from mail-bw0-f161.google.com ([209.85.218.161]:50437 "EHLO mail-bw0-f161.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062AbZBJMSf (ORCPT ); Tue, 10 Feb 2009 07:18:35 -0500 Received: by bwz5 with SMTP id 5so2581134bwz.13 for ; Tue, 10 Feb 2009 04:18:33 -0800 (PST) In-Reply-To: <1234217104.7851.4.camel@norville.austin.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 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 > >