Re: Extra per-inode data

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
Thu, 29 Jan 1998 08:28:12 +0100


> I'm now playing with some filesystem capable of >4G files and I
> need to store lot of data (approx. 1K) per inode, so I decided to
> use the inode->u.generic_ip field to point to my local data instead
> of putting it directly to the inode structure. But it seems that
> there is no way to free such data when the inode gets flushed out of
> the inode cache (it can be still reused after super_ops->put_inode
> gets called).

Welcome to the club. I think the official interface at the moment is
to clean-up in put_inode, and call clear_inode in the end of put_inode.
Please look at the NTFS code, it also supports files >4G and needs to
store approx 1K per inode :-)

The draw-back, of course, is that the inode will *not* be reused after
put_inode gets called, so I'd appreciate such a change as well.

Regards,
Martin