From: Herbert =?iso-8859-1?Q?P=F6tzl?= Subject: Re: RO --bind mount implementation ... Date: Wed, 6 Aug 2003 01:14:49 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030805231449.GD2594@www.13thfloor.at> References: <20030804221615.GA18521@www.13thfloor.at> <20030805165924.GF12757@parcelfarce.linux.theplanet.co.uk> <20030805225149.GC2594@www.13thfloor.at> 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]:65179 "EHLO www.13thfloor.at") by vger.kernel.org with ESMTP id S272971AbTHEXOk (ORCPT ); Tue, 5 Aug 2003 19:14:40 -0400 To: viro@parcelfarce.linux.theplanet.co.uk Content-Disposition: inline In-Reply-To: <20030805225149.GC2594@www.13thfloor.at> List-Id: linux-fsdevel.vger.kernel.org On Wed, Aug 06, 2003 at 12:51:49AM +0200, Herbert P=F6tzl wrote: > On Tue, Aug 05, 2003 at 05:59:24PM +0100, viro@parcelfarce.linux.thep= lanet.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 abo= ut > > read-only is open(pathname, O_RDWR) ;-) IOW, taking care of direct= ory > > 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) >=20 > well, the open case, IMHO is handled by the > lookup_create() modifications, truncate is something more descriptive would have been: - I guess this is handled in open_namei() by error =3D -EROFS; if ((flag & 2) && (IS_RDONLY(inode) || MNT_IS_RDONLY(nd->mnt))) goto exit; > best, > Herbert - 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