[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190417155520.GI20156@twin.jikos.cz>
Date: Wed, 17 Apr 2019 17:55:20 +0200
From: David Sterba <dsterba@...e.cz>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...e.com>
Powered by blists - more mailing lists