lkml.org 
[lkml]   [2019]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHSET] sorting out RCU-delayed stuff in ->destroy_inode()
On Tue, Apr 16, 2019 at 06:49:00PM +0100, Al Viro wrote:
> We have a lot of boilerplate in ->destroy_inode()
> instances, and several filesystems got the things wrong
> in that area. The patchset below attempts to deal with that.
>
> New method (void ->free_inode(inode)) is introduced,
> and RCU-delayed parts of ->destroy_inode() are moved there.
> The change is backwards-compatible - unmodified filesystem
> will behave as it used to. Rules:
> ->destroy_inode ->free_inode
> f g f(), rcu-delayed g()
> f NULL f()
> NULL g rcu-delayed g()
> NULL NULL rcu-delayed free_inode_nonrcu()
> IOW, NULL/NULL acts as NULL/free_inode_nonrcu.
>
> For a lot of filesystems ->destroy_inode() used to consist
> only of call_rcu(foo_i_callback, &inode->i_rcu). Those simply get
> rid of ->destroy_inode() and have the callback (with saner prototype)
> become their ->free_inode().

The simplified API looks good to me. For btrfs and affs bits:

Acked-by: David Sterba <dsterba@suse.com>

\
 
 \ /
  Last update: 2019-04-17 17:55    [W:0.198 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site