Reputation: 406
I'm developing a LKM for Linux kernel, and I want it to get some specific information that is file system related. In fact this information is the field i_crtime (creation time) of a inode structure of a ext4 file system.
My question is, How could I access this field from a lkm? Right now I know how to get the inode of a specific file:
kern_path(<path to file>, LOOKUP_FOLLOW, &path)
So after this I have the inode via:
path.dentry->d_inode
But this inode (d_inode) is the generic VFS inode structure, not the ext4_inode previously shown (nor ext4_inode_info neither).
Anybody knows how to do that? I'm trying to study the VFS code, the stat (coreutil) code, stracing it and I'm still stucked :-S
TIA.
Upvotes: 1
Views: 672