Re: [PATCH 0/6] Maintain the relative size of fs.file-max and fs.nr_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 24, 2024 at 05:48:13PM +0800, Jinliang Zheng wrote:
> > 
> > Short version: there are 3 different notions -
> > 	1) file as a collection of data kept by filesystem. Such things as
> > contents, ownership, permissions, timestamps belong there.
> > 	2) IO channel used to access one of (1).  open(2) creates such;
> > things like current position in file, whether it's read-only or read-write
> > open, etc. belong there.  It does not belong to a process - after fork(),
> > ...
>
> I'm sorry that I don't know much about the implementation of UNIX, but
> specific to the implementation of Linux, struct file is more like a
> combination of what you said 1) and 2).

This is incorrect.  In Linux (and historical implementations of Unix)
struct file is precisely (2).  The struct file has a pointer to a
struct dentry, which in turn has a pointer to a struct inode.  So a
struct file *refers* to (1), but it is *not* (1).

       	    	     	     	       	     - Ted




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux