mount --bind /A /A multiplies mount entries

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux