Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > muc.lists.netbsd.tech.userlevel > #11929

Re: Multiple null mounts with same parameters

From Greg Troxel <gdt@lexort.com>
Newsgroups muc.lists.netbsd.tech.userlevel
Subject Re: Multiple null mounts with same parameters
Date 2026-10-03 18:41 -0400
Organization Newsgate at muc.de e.V.
Message-ID <rmiy0ce76fp.fsf@s1.lexort.com> (permalink)
References <cbeab596-2098-c058-3d77-b5035a6b1801@NetBSD.org>

Show all headers | View raw


Charlotte Koch <charlotte@NetBSD.org> 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?

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de

Back to muc.lists.netbsd.tech.userlevel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Multiple null mounts with same parameters Charlotte Koch <charlotte@NetBSD.org> - 2026-10-03 19:23 +0000
  Re: Multiple null mounts with same parameters Greg Troxel <gdt@lexort.com> - 2026-10-03 18:41 -0400
    Re: Multiple null mounts with same parameters Mouse <mouse@Rodents-Montreal.ORG> - 2026-10-03 19:52 -0400
    Re: Multiple null mounts with same parameters Robert Elz <kre@munnari.OZ.AU> - 2026-10-04 07:07 +0700
  Re: Multiple null mounts with same parameters Charlotte Koch <charlotte@NetBSD.org> - 2026-10-04 06:37 +0000

csiph-web