Alexander Viro writes:
> 
> 
> On Sat, 10 Jun 2000, Richard Gooch wrote:
> 
> >   Hi, all. I've just been looking at the FS_SINGLE implementation, and
> > have a few comments:
> > 
> > - although not documented, you need to do kern_mount() before trying
>       Yup.
> >   normal mounts of a FS_SINGLE; perhaps kern_mount()/kern_umount()
> >   should be called automatically in
> >   register_filesystem()/unregister_filesystem()?
> 
> I don't think so. They are different operations and I'm not too happy
> about mixing them together. Matter of taste, but...

Yeah, I know. Having it documented would satisfy me. Getting a kernel
BUG after adding FS_SINGLE was a shock: "what the %@$& ?!?".

> > - I note that procfs and pipefs call unregister_filesystem() before
> >   calling kern_umount(). This looks counter-intuitive, even if it's
> >   correct (is it?)
> 
> It is. Look: first you take it out of reach so that nobody would
> mount us while we are doing kern_umount(), then you kill the tree.

I suspected it was about race prevention. Again, if it was documented,
it would be fine. When I first saw the procfs/pipefs code, I was left
wondering if it was safe to unregister before unmounting.

> > - when mounting a FS which is FS_SINGLE, /proc/mounts reports the FS
> >   type rather than "bind", which also seems wrong.
> 
> Why? Bind is _not_ a filesystem type. From the kernel point of view
> old and new instances after binding are identical - there is no
> asymmetry.

I see your point. However, that suggests that the naming of
/proc/mounts is wrong. Perhaps we should have a /proc/namespace that
shows all these VFS bindings, and separately a list of real mounts.

I have the feeling we're mixing two different pieces of information
into /proc/mounts at the moment.

                                Regards,

                                        Richard....
Permanent: [EMAIL PROTECTED]
Current:   [EMAIL PROTECTED]

Reply via email to