[lkml]   [2000]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: init_special_inode in 2.3.35

On Tue, 11 Jan 2000, David Grothe wrote:

> Alexander Viro wrote:
> > _All_ ->u is off-limits for any device code. It
> > belongs to hosting filesystem and to nobody else.
> If a driver needs to have a private structure that associates with each "real"
> file (inode instance) then what is the recommended technique? Private hash
> table on major/minor? What is the officially recommended technique here.
> I obviously misunderstood that the generic_ip was like a private structure
> pointer in a number of other kernel control structures, such as net_device.

Hold on. Inode is not a good thing here - if (_big_ if) you need per-file
data - refer to it from struct file (that is, if you really need it on
per-opener basis; _very_ rare situation). If you need it on per-device -
keep it in the driver. Inode gives either too coarse or too fine
granularity here - there may be a lot of independent openers of inode and
there may be many inodes pointing to your device. In effect, device inode
acts as a sort of symlink - just that it points into other namespace.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:55    [W:0.034 / U:3.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site