Re: [PATCH 3/3] have pipefs ensure i_ino uniqueness by calling iunique and hashing the inode

Jeff Layton
2007-01-30T15:05:21Z

Eric Dumazet wrote:
>
> For dentry name, we certainly could use "[address of inode]" instead
> of "[inode number]" to get unicity, but do we care ?
>
> For st_ino values on pipefs and sockets, I doubt any user application would
> care. I never had to fstat() a socket fd. Of course it's a file descriptor,
> but all we really want to do with this kind of file descriptor is to call
> socket API.
>
> And for some heavy loaded internet servers , the additional cost of
> insert/delete a node in a machine shared tree could be a problem.
>

Granted, I've never had to stat a pipe fd either, so maybe in the big scheme
of things, it's not that important. Still, I think we can probably do this
without a great deal of added complexity or performance impact.

If changing the stuff between the brackets in the dentry name to something
besides inode number is OK, then we can defer the assignment of the inode
number until it's actually needed. For pipefs calls, this means we can only
assign an inode number when a stat call is actually done. So anyone who needs
that info can get it, and anyone who doesn't care about it shouldn't be
greatly impacted by it.

I'll be following up this email with a couple of patches for comment...

-- Jeff