[RFC, PATCH, RESEND] fs: push rcu_barrier() from deactivate_locked_super() to filesystems
torvalds at linux-foundation.org
Fri Jun 8 17:46:47 MDT 2012
On Fri, Jun 8, 2012 at 4:37 PM, Andrew Morton <akpm at linux-foundation.org> wrote:
> So how about open-coding the rcu_barrier() in btrfs and gfs2 for the
> non-inode caches (which is the appropriate place), and hand the inode
> cache over to the vfs for treatment (which is the appropriate place).
The thing is, none of the inode caches are really up to the VFS. They
are per-filesystem caches, that just *embed* an inode as part of the
bigger ext4_inode or whatever. But apart from the fact that the
embedded inode requires them to then use the proper "call_rcu()" stuff
to do the delayed free, they really are pretty much filesystem data
structures. The VFS layer can neither free them or allocate them,
since the VFS layer doesn't even know how big the structures are, or
where the inodes are embedded, or how to initialize them (or even when
to allocate them).
Of course, if you just mean having a VFS wrapper that does
static void vfs_inode_kmem_cache_destroy(struct kmem_cache *cachep)
then we could do that. Not much better than what Kirill's patch did,
but at least we could have that comment in just one single place.
More information about the samba-technical