From: Christoph Hellwig Subject: Re: [RFC PATCH] Introduce filesystem type tracking Date: Tue, 20 May 2008 09:57:32 -0400 Message-ID: <20080520135732.GA30349@infradead.org> References: <1211196126-7442-1-git-send-email-tspink@gmail.com> <7b9198260805200606u6ebc2681o8af7a8eebc1cb96@mail.gmail.com> <20080520134306.GA28946@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Tom Spink , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton To: Al Viro Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:36414 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754159AbYETN5f (ORCPT ); Tue, 20 May 2008 09:57:35 -0400 Content-Disposition: inline In-Reply-To: <20080520134306.GA28946@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, May 20, 2008 at 02:43:06PM +0100, Al Viro wrote: > No, you have not and no, doing that anywhere near that layer is hopeless. > > a) Instances of filesystem can easily outlive all vfsmounts, > let alone their attachment to namespaces. > b) What should happen if init is done in the middle of exit? > c) Why do we need to bother, anyway? We had a discussion about filesystems starting threads without an active instance. I suggested tracking instances and add ->init / ->exit methods to struct file_system_type for these kinds of instances. But we should track superblock instances, not vfsmount instances of course. Tom, you probably don't even need a counter, emptyness of file_system_type.fs_supers should be indication enough. And yes we'd need locking to prevent init racing with exit.