From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2994361AbcBSW0P (ORCPT ); Fri, 19 Feb 2016 17:26:15 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:49832 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992844AbcBSW0N (ORCPT ); Fri, 19 Feb 2016 17:26:13 -0500 Date: Fri, 19 Feb 2016 22:26:09 +0000 From: Al Viro To: Tejun Heo Cc: Jan Kara , Tahsin Erdogan , Jens Axboe , cgroups@vger.kernel.org, "Theodore Ts'o" , Nauman Rafique , linux-kernel@vger.kernel.org, Jan Kara Subject: Re: [PATCH block/for-4.5-fixes] writeback: keep superblock pinned during cgroup writeback association switches Message-ID: <20160219222609.GC17997@ZenIV.linux.org.uk> References: <20160217210744.GA6479@mtj.duckdns.org> <20160217223009.GN14140@quack.suse.cz> <20160217230231.GC6479@mtj.duckdns.org> <20160218095538.GA4338@quack.suse.cz> <20160218130033.GE6479@mtj.duckdns.org> <20160219201805.GZ17997@ZenIV.linux.org.uk> <20160219205147.GN13177@mtj.duckdns.org> <20160219215811.GA17997@ZenIV.linux.org.uk> <20160219221512.GO13177@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160219221512.GO13177@mtj.duckdns.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2016 at 05:15:12PM -0500, Tejun Heo wrote: > > IOW, while fs shutdown may be async, making it *always* async would be a bad > > bug. And bumping ->s_active does just that. > > > > I'd go for trylock inside that work + making generic_shutdown_super() > > kill all such works. I assume that it *can* be abandoned in situation > > when we know that sync_filesystem() is about to be called and that > > said sync_filesystem() won't, in turn, schedule any such works, of course... > > I'll make generic_shutdown_super() to kill all such work items. I > don't think the work item itself would need further locking tho. Can > you please elaborate why you thought adding trylock to the work would > be necessary? Umm... Not much, except that it would make the life cycle rules a bit more regular. Is that code OK with e.g. running in parallel with remounting filesystem r/o?