GNU bug report logs -
#15986
df in current coreutils shows the device for loop mounts, not the file
Previous Next
Reported by: Philipp Thomas <pth <at> suse.de>
Date: Thu, 28 Nov 2013 14:35:03 UTC
Severity: normal
Done: Bernhard Voelker <mail <at> bernhard-voelker.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#15986: df in current coreutils shows the device for loop mounts, not the file
which was filed against the coreutils package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 15986 <at> debbugs.gnu.org.
--
15986: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15986
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
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).
Philipp
This bug report was last modified 11 years and 170 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.