Bug#799131: coreutils: df sometimes skips real entry and reports a bind mount instead

2015-09-16 Thread Nye Liu
Package: coreutils
Version: 8.23-4
Severity: minor

Dear Maintainer,

When using bind mounts, df may have to choose only one of many equivalent
mounts:

$ mount
/dev/sdb1 on /export/real type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /home/ type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /home/ type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /home/ type ext4 (rw,relatime,data=ordered)

$ df -l
/dev/sdb1  1921677460 1094613156 729425740  61% /home/

but it really should report
$ df -l
/dev/sdb1  1921677460 1094613156 729425740  61% /export/real

That said, I am unsure how it should know which one is the "real mount"

See also

http://www.linuxquestions.org/questions/slackware-14/coreutils-8-21-'df'-bind-mount-bug-4175453522/

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages coreutils depends on:
ii  libacl1  2.2.52-1
ii  libattr1 1:2.4.47-2
ii  libc62.19-18
ii  libselinux1  2.3-2

coreutils recommends no packages.

coreutils suggests no packages.

-- debconf-show failed


MRV Communications is a global supplier of packet and optical solutions that 
power the world’s largest networks. Our products combine innovative hardware 
with intelligent software to make networks smarter, faster and more efficient.



Bug#799131: coreutils: df sometimes skips real entry and reports a bind mount instead

2015-09-16 Thread Pádraig Brady
On 15/09/15 23:21, Nye Liu wrote:
> Package: coreutils
> Version: 8.23-4
> Severity: minor
> 
> Dear Maintainer,
> 
> When using bind mounts, df may have to choose only one of many equivalent
> mounts:
> 
> $ mount
> /dev/sdb1 on /export/real type ext4 (rw,relatime,data=ordered)
> /dev/sdb1 on /home/ type ext4 (rw,relatime,data=ordered)
> /dev/sdb1 on /home/ type ext4 (rw,relatime,data=ordered)
> /dev/sdb1 on /home/ type ext4 (rw,relatime,data=ordered)
> 
> $ df -l
> /dev/sdb1  1921677460 1094613156 729425740  61% /home/
> 
> but it really should report
> $ df -l
> /dev/sdb1  1921677460 1094613156 729425740  61% /export/real
> 
> That said, I am unsure how it should know which one is the "real mount"
> 
> See also
> 
> http://www.linuxquestions.org/questions/slackware-14/coreutils-8-21-'df'-bind-mount-bug-4175453522/
> 
> -- System Information:
> Debian Release: stretch/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 4.1.0-2-amd64 (SMP w/8 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
> Init: sysvinit (via /sbin/init)
> 
> Versions of packages coreutils depends on:
> ii  libacl1  2.2.52-1
> ii  libattr1 1:2.4.47-2
> ii  libc62.19-18
> ii  libselinux1  2.3-2
> 
> coreutils recommends no packages.
> 
> coreutils suggests no packages.
> 
> -- debconf-show failed
> 
> 
> MRV Communications is a global supplier of packet and optical solutions that 
> power the world’s largest networks. Our products combine innovative hardware 
> with intelligent software to make networks smarter, faster and more efficient.
> 
> 

We're about to merge logic upstream that incorporates the "root" or 4th
column from /proc/$$/mountinfo.  df will use that to display the mount
closest to the root of the device.

thanks,
Pádraig