Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4312141yba; Wed, 17 Apr 2019 08:55:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUhYpIYtB8J5F4FtWdE186A82ClYNWtWkiwIFI/E57Y/XpeDb8Kz8t/vehRaPGadhpxJNc X-Received: by 2002:a62:524e:: with SMTP id g75mr88568038pfb.106.1555516521167; Wed, 17 Apr 2019 08:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555516521; cv=none; d=google.com; s=arc-20160816; b=SJyxdGCexoVx+h7Fagnbsj8JC8iVgyBUvrmg0f02s6IkgM707ASeMdq//HoMQG3IQx BGTwBVHGCXsC0PHoVzXvKkB/Erk/G4lRzs5Re5MLS2v5wSvlSjuc6seaI7iRAS4PkbyI wZACWou051AgQf8zPGTJWhZOTP/fD2GWTIsgmRb4/TD879gDNHUyhUIklfEG1LM2W5Vy JV2Uwi+PEfnmmdx6DrGpLF92PvRRWz63J3c/QVHRKqNr7T97eYdc8qrMlUvsXV8CUPx+ FVi5rIU5NBT8+6KcUCXeTShld0Q0sc3c9Ck+9/rrFKdmEFMLu006eBBrZgRzJKo1yvdH Cf2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=ZkZKF/PhFpiYlGfqhLanjMlLl5WuBFbo6IExgWPgxaY=; b=m6Rax+9QF9HrF2+yW+rAg4/oLEY0bMnWVKz1wgZ29QJ4mvxT7TGNnRM0won6hDVXYR 2w6arEPdN+Ta9zkvnr8OWB6/47ao29hc/gBkgKWpplLwF5+cOgkNtxl3b9b0QL6Pf5pA UIEQP/H4nWCvqMlth55KQVi11P11BUugOl2SHoO53+H/hVUE8WRJPfIbrJo/pvcAeKj7 jziXtYDvkJeePgtp5fTiIT8skuVqPyfYrrvlGnOFfP6m9qUkmwUGSI5NdNUajtaxXhRb XdOMaU8ZGzRdeWrNj36FeId7M36CSSi2w3ABo9Q7hJyyMjg28iTKR1Iv76hA7NvzVdLV RTTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r39si52961516pld.10.2019.04.17.08.55.05; Wed, 17 Apr 2019 08:55:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732690AbfDQPyO (ORCPT + 99 others); Wed, 17 Apr 2019 11:54:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:42864 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729940AbfDQPyO (ORCPT ); Wed, 17 Apr 2019 11:54:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E8BA5ADAA; Wed, 17 Apr 2019 15:54:12 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 82B49DA871; Wed, 17 Apr 2019 17:55:20 +0200 (CEST) Date: Wed, 17 Apr 2019 17:55:20 +0200 From: David Sterba To: Al Viro Cc: Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCHSET] sorting out RCU-delayed stuff in ->destroy_inode() Message-ID: <20190417155520.GI20156@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Al Viro , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190416174900.GT2217@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190416174900.GT2217@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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