[patches] saner replacement for ->clear_inode/->delete_inode/->drop_inode

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

 



Patchset below attempts to clean up the mess around iput() and icache eviction.
I'm posting it here for review and it's also available in vfs git (#evict-inode).

Changes:
	* ->clear_inode() and ->delete_inode() are replaced with a single
new method (->evict_inode()) that is called whenever inode is kicked out,
whether it's done by final iput(), or by memory pressure or by umount.
Unlike ->clear_inode(), called has *not* done anything to pagecache or to
associated metadata buffers; it's up to ->evict_inode() to deal with those.
Note that ->delete_inode() already had been done that...
	* ->drop_inode() does *NOT* kick inode out itself now; it simply
tells caller if fs wants that inode to be kicked out of icache.  I.e.
generic_delete_inode() is simply "return 1" now and generic_drop_inode() is
"return !inode->i_nlink || hlist_unhashed(&inode->i_hash)".  All actual
work is done by iput_final() after it's called ->drop_inode().
	* clear_inode() is gone; use end_writeback(inode) instead.  Just as
->delete_inode() had to call clear_inode() exactly once, ->evict_inode()
has to call end_writeback() exactly once.  Unlike clear_inode(), end_writeback()
doesn't do anything to inode-associated metadata; evict it yourself if you have
it (i.e. if you use mark_buffer_dirty_inode()).
	* generic_detach_inode() is gone; it's been only needed because
of hugetlbfs and that only because the normal codepath would've hit
truncate_inode_pages() before calling into fs.  Not an issue with new
scheme, so it's not needed anymore.

All in-tree filesystems converted.  Also included: hostfs fixes (near the
areas affected by the main patch sequence) and logfs metadata inode logics
sanitizing (ditto).

It seems to work here (i.e. survives some local beating) and I'd like to see
comments before pushing it into -next.  Have fun...

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux