From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Drake Subject: Re: Remount root RO after the root dentry drops from the namespace Date: Wed, 18 Nov 2009 15:18:34 +0000 Message-ID: <1258557514.23957.10.camel@localhost.localdomain> References: <1258542722.2761.40.camel@localhost.localdomain> <1258547912.2761.46.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Received: from mail-fx0-f221.google.com ([209.85.220.221]:61249 "EHLO mail-fx0-f221.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757532AbZKRPSb (ORCPT ); Wed, 18 Nov 2009 10:18:31 -0500 Received: by fxm21 with SMTP id 21so1291249fxm.21 for ; Wed, 18 Nov 2009 07:18:36 -0800 (PST) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2009-11-18 at 13:58 +0100, Miklos Szeredi wrote: > I see some confusion here, there's no "path/to/realroot", the bind > mount didn't actually do anything to the namespace, it just made > "/versions/run/1" (which will later become "/") a mountpoint. Ah yes, I misunderstood. This bind-mounting trick actually allows for a simplification to the whole procedure I listed earlier. Everything is working now. We previously added support to util-linux-ng's switch_root utility to execute that procedure for the case when the target root is not a mount point. I'll submit a patch to revert that and instead note this trick in the manpage. Thanks for your help! Daniel