struct file {

struct list_head fu_list;

struct path f_path; #define f_dentry f_path.dentry

#define f_vfsmnt f_path.mnt const struct file_operations

atomic_t unsigned int mode_t loff_t struct fown_struct unsigned int struct file ra state f_count;




unsigned long struct address_space

The elements have the following meanings:

□ f_uid and f_gid specify the UID and the GID of the user.

□ f_owner contains information on the process working with the file (and therefore determines the PID to which sigio signals are sent to implement asynchronous input and output).

□ The readahead characteristics are held in f_ra. These values specify if and how file data are to be read in anticipation before they are actually requested (readahead improves system performance).

□ The mode passed when a file is opened (generally read, write, or read and write access) is held in the f_mode field.

□ f_flags specifies additional flags that can be passed on the open system call.

□ The current position of the file pointer (which is important for sequential read operations or when reading a specific file section) is held in the f_pos variable as a byte offset from the beginning of the file.

□ f_path encapsulates two pieces of information:

□ An association between filename and inode

□ Information about the mounted filesystem in which the file resides

The path data structure is defined as follows:

Continue reading here: Info

Was this article helpful?

0 0