Proc inodes

The kernel provides a data structure called proc_inode to support an inode-oriented view of the proc filesystem entries. This structure is defined as follows:

union proc_op {

int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); int (*proc_read)(struct task_struct *task, char *page);

struct proc_inode {

struct pid *pid; int fd;

union proc_op op;

struct proc_dir_entry *pde;

struct inode vfs_inode;

The purpose of the structure is to link the proc-specific data with the inode data of the VFS layer. pde contains a pointer to the proc_dir_entry instance associated with each entry; the meaning of the instance was discussed in the previous section. At the end of the structure there is an instance of inode.

Continue reading here: This is the actual data not a pointer to an instance of the structure

Was this article helpful?

0 0