Re: [PATCH 01/11] xfs: we don't need no steekin ->evict_inode

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

 



On Wed, Apr 13, 2016 at 09:41:10AM -0700, Christoph Hellwig wrote:
> Al has been very unhappy about our destroy_inode abuse, and I'd
> reluctant to make it worse.

I don't have any problems with it at all. The VFS doesn't care
how we manage inode allocation or destruction, so I don't see
any problem with what we do outside the visibility of the VFS inode
life cycle.

> Why do we need to play games with i_mode when freeing?

Because the inode cache lookup XFS code uses i_mode == 0 to detect a
freed inode. i.e.  in xfs_iget_cache_miss/xfs_iget_cache_hit this is
used to allow XFS_IGET_CREATE to return a freed inodes still in the
cache during inode allocation. This is the only case where we are
allowed to find a freed inode in the cache lookup, so we have to be
able to detect it somehow.

Similarly, I'm pretty sure there are assumptions all through the XFS
code (both kernel and userspace) that i_mode = 0 means the inode is
free/unallocated. xfs_repair, for example, makes this assumption,
and so we have to zero the mode when freeing the inode...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux