lkml.org 
[lkml]   [2003]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RO --bind mount implementation ...
On Wed, Aug 06, 2003 at 12:51:49AM +0200, Herbert Pötzl wrote:
> On Tue, Aug 05, 2003 at 05:59:24PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
> > On Tue, Aug 05, 2003 at 12:16:15AM +0200, Herbert Pötzl wrote:
> >
> > > anyway, I discussed this with some friends, and
> > > they pointed out that this would be useful ...
> > > so here is the first try ...
> >
> > Umm... You know, the most obvious system call that should care about
> > read-only is open(pathname, O_RDWR) ;-) IOW, taking care of directory
> > 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

more descriptive would have been:
- I guess this is handled in open_namei() by

error = -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-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/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.063 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site