From: Herbert =?iso-8859-1?Q?P=F6tzl?= Subject: Re: RO --bind mount implementation ... Date: Wed, 6 Aug 2003 00:51:49 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030805225149.GC2594@www.13thfloor.at> References: <20030804221615.GA18521@www.13thfloor.at> <20030805165924.GF12757@parcelfarce.linux.theplanet.co.uk> Reply-To: herbert@13thfloor.at Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from www.13thfloor.at ([212.16.59.250]:54171 "EHLO www.13thfloor.at") by vger.kernel.org with ESMTP id S272953AbTHEWvk (ORCPT ); Tue, 5 Aug 2003 18:51:40 -0400 To: viro@parcelfarce.linux.theplanet.co.uk Content-Disposition: inline In-Reply-To: <20030805165924.GF12757@parcelfarce.linux.theplanet.co.uk> List-Id: linux-fsdevel.vger.kernel.org On Tue, Aug 05, 2003 at 05:59:24PM +0100, viro@parcelfarce.linux.thepla= net.co.uk wrote: > On Tue, Aug 05, 2003 at 12:16:15AM +0200, Herbert P=F6tzl wrote: > =20 > > anyway, I discussed this with some friends, and > > they pointed out that this would be useful ... > > so here is the first try ... >=20 > Umm... You know, the most obvious system call that should care about > read-only is open(pathname, O_RDWR) ;-) IOW, taking care of director= y > modifications is not enough - you need to deal with > * opening file for write > * truncation (both from *truncate() and from open() with O_TRUNC) > * metadata changes (timestamps, ownership, permissions) well, the open case, IMHO is handled by the lookup_create() modifications, truncate is something I obviously missed (I missed the intermezzo copies=20 too ;) and metadata changes were intentionally ignored (it's the first try, and I'm glad that you see it as=20 a step in the right direction?) > But yes, it's not that far from where we should eventualy get. will add the truncate() case soon, maybe it is also possible to move some parts of the may_create function to the mnt_may_create (any suggestions for a better name?), to avoid doing some checks twice ... any further suggestions? best, Herbert =20 > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdev= el" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html