bug-coreutils
[Top][All Lists]
Advanced

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

bug#15986: df in current coreutils shows the device for loop mounts, not


From: Bernhard Voelker
Subject: bug#15986: df in current coreutils shows the device for loop mounts, not the file
Date: Thu, 28 Nov 2013 18:06:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

tag 15986 notabug
thanks

On 11/28/2013 03:34 PM, Philipp Thomas wrote:
> Df in older coreutils showed the file of a loop mount whereas currently it
> shows you the loop device. This is IMHO bogus as what good is that info?
>
> Is this a deliberate change or a side effect of other changes? I searched
> ChangeLog but didn't find anything relating to it (at least in my eyes).

Hi Philipp,

on systems where /etc/mtab is a regular file, 'mount' writes the name of
the backing file into /etc/mtab.
Nowadays, as /etc/mtab is a symlink to /proc/self/mounts, this information
is not available to 'df' anymore.

According to util-linux sources [1], such information is available in
  /sys/block/loopN/loop/backing_file (kernel >= 2.6.37 is required).
Therefore, 'mount' makes this extra lookup in that file to display the
name of the backing file.

I don't think it's a good idea to add such functionality to 'df',
as this is rather OS-dependent. Furthermore, OS-specific tools - in this
case e.g. 'mount' from util-linux for the Linux platform - already display
the name of the backing file.

As it's therefore not a bug in 'df', I'm hereby marking this bug as done,
but this should not prevent you or anybody else to continue discussion.

[1]
http://git.kernel.org/cgit/utils/util-linux/util-linux.git/tree/lib/loopdev.c#n518

Have a nice day,
Berny





reply via email to

[Prev in Thread] Current Thread [Next in Thread]