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