Open files at filesystem level
I'm just starting in kenel programming, and have been working on modifying the ext2 file system. This might sound strange, but what i need to access the data of a file by its inode, without using the filename.
is that possible?
i can't use filp_open cos that needs the whole path to work.
Re: Open files at filesystem level
Yes, ultimately, the file system driver's open() system call works only with an inode.
Originally Posted by ChrisBurrell
This is the function you write in your fs driver and whose pointer goes into the file_operations structure of the driver. It is called by the VFS. Kernel/VFS translates the file name (including the path) to an inode before calling the driver specific functions.
and possibly, http://lxr.linux.no/source/include/linux/fs.h#L577