help, custom filesystem inode_operations->mkdir is not executing!

From: Dake, Steven C (steven.c.dake@intel.com)
Date: Fri Jul 28 2000 - 19:17:37 EST


folks,

This is targeted at all the filesystem/VFS experts out there...

I am developing a file system and have have a filesystem with inode, super,
file operations defined. The filesystem works for lookup/readdir
interfaces. As an example, I can execute ls, ls -l, cd operations from the
shell on the fs...

When tracing through the linux kernel, I have found that
inode_operations->lookup is called before mkdir is called for all
filesystems (to ensure the name identifier doesn't exist I guess?). Then
the mkdir interface is executed.

I created a lookup routine that has the following algorithm:
if file does not exist
        return 0
else if file exists
        create inode structure and read it from media
        d_add (entry, inode)
        return 0

The system should execute a lookup, then a mkdir operation if the file does
not exist. Unfortunately, my lookup routine is being called in a mkdir
system call, but the mkdir interface is not executed. I also know that
upper layer mkdir is not being called (I placed printks in functions above,
executes for ext2, but not for my custom fs).

I am assuming this is because I am missing something in my lookup operation,
although I am not really sure at this point...

Any ideas?

        Regards,
        -steve
__________________________________________________________________________
Steven Dake "If you thought
you played well tonight,
Adv. Development, I/O Products Division/INTC go home and practice." --
Charlie Parker

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:28 EST