tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Multiple null mounts with same parameters



Charlotte Koch <charlotte%NetBSD.org@localhost> writes:

>     # mount -t null /src /dest
>     # mount -t null /src /dest
>     # mount -t null /src /dest
>     ...
>
> You can umount /dest multiple times, too, and it just works. That's
> pretty neat; I suppose the "stackable layer" design of the file system
> doesn't prevent this sort of interaction from happening. But to me, it
> still feels wrong to permit a mount with the *same* source and the
> *same* destination multiple times.
>
> Does it make sense to prevent the user from creating a null mount whose
> parameters match an existing null mount?

I don't think it really does.  In general, you can mount things to any
dir, whether or not it is previously mounted.  If you disallow a full
match, why don't you disallow

  mount -t null /src1 /dest
  mount -t null /src2 /dest

If that's ok, what about

  mount -t null /src1 /dest
  mount -t null /src2 /dest
  mount -t null /src1 /dest


If someon has a scheme that mounts multiple things and unwinds the
stack, why should they get an error if two things match?


Home | Main Index | Thread Index | Old Index