Re: [RFC][Long][Horror story] Mount flags

From: Mitchell Blank Jr (mitch@sfgoth.com)
Date: Sun Jul 30 2000 - 18:44:16 EST


Andries Brouwer wrote:
> > Moreover, we can't do anything about the 0xc0ed kludge
>
> Why not? If the first bit of flags is 1, check that the
> first 16 bits are 0xc0ed. If not, decode the following
> 15 bits.

Actually, if you want to get really gross, you don't even need to sacrafice
a bit, since the MS_{RENAME,AFTER,BEFORE,OVER} only needs log2(5) bits.
So you just make the top 3 bits:

        000 - plain mount
        001 - MS_RENAME
        010 - MS_AFTER
        011 - MS_BEFORE
        100 - MS_OVER
        101 - undefined
        110 - old-stle C0ED mount
        111 - undefined

Of course, since I've made a duggestion that gross, Al's probably going to
hunt me down, so I'm going to go hide now :-) Seriously, though, a new
mount syscall is probably the best idea at this point.

One other question though - Al mentioned that MS_ODD_RENAME should really
go into ->s_type->fs_flags... so why not move it?

  % grep MS_ODD_RENAME `find . -type f`
  ./namei.c: if (!(old_dir->i_sb->s_flags & MS_ODD_RENAME)) {
  ./nfs/inode.c: sb->s_flags |= MS_ODD_RENAME; /* This should go away */

-Mitch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:32 EST