From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: 'Not a directory' Date: Tue, 28 May 2002 10:51:42 -0700 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20020528175142.GE11993@kroah.com> References: <20020527021840.GD856@tempest.styx.org.ar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: To: Marcos Dione Content-Disposition: inline In-Reply-To: <20020527021840.GD856@tempest.styx.org.ar> List-Id: linux-fsdevel.vger.kernel.org On Sun, May 26, 2002 at 11:18:40PM -0300, Marcos Dione wrote: > > I'm playing with a new fs developed by myself. I reached the stage > where I can mount the fs and even read the root's inode. but when I > try to cd into de mountpoint, chdir(2) complais that 'Not a directory'. > > doing a 'ls -l' I see that the mountpoint has the mode, dates and > size of the directory being mounted. the mode is 040755, so I don't > see the problem. also, using ramfs as reference, I note that the > directory is not inspected in any way, so I think that is not a > problem if I didn't developed the super, inode and file ops *yet*. > > also, I would *really* appreciate any link to any docs about > implementing filesystems for linux (e.g., what should all the *_ops > functions must do, return, etc., which should be reimplemented or > which could be ignored or even use the generic_* ones, and so on) For a ram based filesystem, there's an ok article in the May issue of Linux Journal on some of the things you need to do for 2.4: http://www.linuxjournal.com/article.php?sid=5633 Also take a look at the code for pcihpfs in the 2.4 kernel at drivers/hotplug/pci_hotplug_core.c and driverfs and usbfs in the 2.5 kernel for other examples of ram based filesystems that were based off of ramfs (actually pcihpfs was based off of driverfs which was based off of ramfs...) Hope this helps, greg k-h