Article 6PCCT Understanding the usage of fdtable entries in files_struct

Understanding the usage of fdtable entries in files_struct

by
endofinvention
from LinuxQuestions.org on (#6PCCT)
Hi, I've been looking at the files_struct in https://github.com/torvalds/linux/bl...inux/fdtable.h and am struggling to understand the relationship between files_struct, fdtable and file.

files_struct contains the following elements (some fields removed):

Code:struct fdtable __rcu *fdt;
struct fdtable fdtab;
...
struct file __rcu * fd_array[NR_OPEN_DEFAULT];My understanding is that the first fdtable struct (*fdt) acts as an overflow for open file descriptors when NR_OPEN_DEFAULT is exceeded.

The last file struct (fd_array) is the array of the tasks open file descriptors.

What I am unable to work out is what the second fdtable struct (fdtab) is used for?

Any insight would be greatly appreciated!
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments