Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755127AbYFRUVT (ORCPT ); Wed, 18 Jun 2008 16:21:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750984AbYFRUVJ (ORCPT ); Wed, 18 Jun 2008 16:21:09 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:51572 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838AbYFRUVI (ORCPT ); Wed, 18 Jun 2008 16:21:08 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Dave Hansen Cc: Benjamin Thery , Greg Kroah-Hartman , Andrew Morton , Tejun Heo , linux-kernel@vger.kernel.org, Al Viro , Linux Containers References: <20080618170729.808539948@theryb.frec.bull.fr> <20080618170730.256129077@theryb.frec.bull.fr> <1213811063.7922.39.camel@nimitz> Date: Wed, 18 Jun 2008 13:12:27 -0700 In-Reply-To: <1213811063.7922.39.camel@nimitz> (Dave Hansen's message of "Wed, 18 Jun 2008 10:44:23 -0700") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SA-Exim-Connect-IP: 24.130.11.59 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Dave Hansen X-Spam-Relay-Country: X-Spam-Report: * -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 T_TM2_M_HEADER_IN_MSG BODY: T_TM2_M_HEADER_IN_MSG * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 XM_SPF_Neutral SPF-Neutral Subject: Re: [PATCH 01/11] sysfs: Support for preventing unmounts. X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mgr1.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1820 Lines: 43 Dave Hansen writes: > On Wed, 2008-06-18 at 19:07 +0200, Benjamin Thery wrote: >> To support mounting multiple instances of sysfs occassionally I >> need to walk through all of the currently present sysfs super blocks. > > I know you may have addressed this before, but I forgot and it didn't > make it into the changelogs. > > Why are you doing this again? It seems like an awfully blunt > instrument. So the fundamentals. - The data in sysfs fundamentally changes behind the back of the VFS and we need to keep the VFS in sync. Essentially this is the distributed filesystem problem. - In particular for sysfs_rename and sysfs_move_dir we need to support finding the dcache entries and calling d_move. So that the dcache does not get into an inconsistent state. Timeouts and invalidates like NFS uses are to be avoided if at all possible. - Coming through the vfs we are guaranteed that the filesystem will not be unmounted while we have a reference on a dentry, and with multiple mounts we do not get that guarantee. Therefore to get that guarantee for all of the superblocks we need the blunt instrument. - Since mount/unmount are rare blocking them is no big deal. I believe any distributed filesystem that is together enough to tell us about renames (so we can update the dcache) instead of doing the NFS timeout will need the ability to block mount/unmount while it is executing d_move. Currently sysfs does not need to block mounts only because we perform an internal mount and then never unmount sysfs. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/