Hi List,
I am trying to learn the filesystem development and doing some study.
I have been working on a sample filesystem module and built a normal super_operations struct. It was working on older kernel of 2.6 series till 2.6.25 and above. I realized that there were changes made in this structure and following fields were removed.
1. read_inode
2. put_inode
I read on google but there wasnt anything specific mentioned what we need to use instead. They also removed iget and suggested to use iget_lock.
Can anyone please let me know what I need to do in order to compile module?
Here is my current structure and errors.
Structure:
static const struct super_operations myfs_sops = {
.alloc_inode = myfs_alloc_inode,
.destroy_inode = myfs_destroy_inode,
.read_inode = myfs_read_inode,
.put_inode = myfs_put_inode,
.write_inode = myfs_write_inode,
.delete_inode = myfs_delete_inode,
.put_super = myfs_put_super,
.write_super = myfs_write_super,
.statfs = myfs_statfs,
.clear_inode = myfs_clear_inode,
};
errors:
error: unknown field ‘read_inode’ specified in initializer
error: unknown field ‘put_inode’ specified in initializer
error: implicit declaration of function ‘iget’
Your help would be highly appreciated. Also can you please let me know how should I approach the filesystem development. I am currently reading Steve D. Pate's filesystem book, but I am not very sure if it fits for current kernel. However the book is clearing lots of concept.
Please let me know how to develop a sample filesystem.