public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* mount --bind /A /A multiplies mount entries
@ 2013-11-04 11:09 Bernhard Voelker
  2013-11-04 13:58 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Voelker @ 2013-11-04 11:09 UTC (permalink / raw)
  To: util-linux@vger.kernel.org

Using the same mount point as SRC and DST with mount --bind
somehow multiplies the number of mount points:

  $ ./mount | grep sdb
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)

  $ ./mount --bind /home /home

  $ ./mount | grep sdb
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)

  $ ./mount --bind /home /home

  $ ./mount | grep sdb
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)

  $ ./mount --bind /home /home

  $ ./mount | grep sdb
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
  /dev/sdb on /home type ext4 (rw,relatime,data=ordered)

This is probably a kernel bug, but as bind mounts to self
are not that much of use, wouldn't it be worthwhile to
prohibit it at all in mount(8)?

System (mount from latest git):

  $ lsb_release -a
  LSB Version:    n/a
  Distributor ID: openSUSE project
  Description:    openSUSE 12.3 (x86_64)
  Release:        12.3
  Codename:       Dartmouth

  $ uname -r
  3.7.10-1.16-desktop

Have a nice day,
Berny

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-04 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-04 11:09 mount --bind /A /A multiplies mount entries Bernhard Voelker
2013-11-04 13:58 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox