Re: fishy ->put_inode usage in ntfs
From: Anton Altaparmakov <hidden>
Date: 2005-02-10 14:40:47
On Thu, 2005-02-10 at 11:47 +0100, Christoph Hellwig wrote:
On Thu, Oct 14, 2004 at 02:26:45PM +0100, Anton Altaparmakov wrote:quoted
quoted
I don't like filesystem doings things like this in ->put_inode at all, and indeed the plan is to get rid of ->put_inode completely. Why do you need to hold an additional reference anyway? What's so special about the relation of these two inodes?The bmp_ino is a virtual inode. It doesn't exist on disk as an inode. It is an NTFS attribute of the base inode. It cannot exist without the base inode there. You could neither read from nor write to this inode without its base inode being there and you couldn't even clear_inode() this inode without the base inode being there. The reference is essential I am afraid. If ->put_inode is removed then I will have to switch to using ntfs_attr_iget() each time or I will have to attach the inode in some other much hackier way that doesn't use the i_count and uses my ntfs private counter instead.Coming back to this issue. Why do you need to refcount bmp_ino at all?
I am not sure what you mean. The VFS layer does reference counting on inodes. I have no choice in the matter.
Can someone ever grab a reference separate from it's master inode?
Again, not sure what you mean. Could you elaborate?
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/