coreutils
[Top][All Lists]
Advanced

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

Re: Hide rootfs filesystem in df


From: Bernhard Voelker
Subject: Re: Hide rootfs filesystem in df
Date: Thu, 29 Nov 2012 08:50:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 09/26/2012 04:24 PM, Jim Meyering wrote:
> Voelker, Bernhard wrote:
> 
>> Robert Milasan wrote:
>>
>>> That has been fixed, at least in 12.1 and 12.2 (even if it's not fixed
>>> there is not rootfs entry in /proc/self/mountinfo):
>>
>> I know.
>> The problem is that mount from util-linux has it's own
>> wrapper for the mount entries which is using mountinfo
>> while coreutils' df is just calling get_fs_usage() from
>> gnulib which in turn is reading /etc/mtab - which is
>> a symlink to /proc/self/mounts in this case.
>> And that file has both entries.
>>
>> So the question is:
>> * is it a kernel thing to not expose rootfs to
>>   /proc/self/mounts?
>> * should gnulib's get_fs_usage() switch to reading
>>   mountinfo?
>> * is it a gnulib thing to not filter the rootfs
>>   entry?
>> * is it up to coreutils to filter out the rootfs
>>   entry?
>> * should coreutils' df switch to reading mountinfo?
>>
>> There are several possibilities here.
>>
>> Jim?
> 
> Hi Bernie,
> I'm away from home for a day or so more,
> so have less time than usual.  I'll be back on Friday.

Hi Jim,

as Robert wrote, it's the easiest way to fix it.
The only situation it can fail is during early boot when
no other file system is mounted yet, but I doubt anyone
will try to use df in that case.
So I'm 60:40 for adding it.
WDYT?

Have a nice day,
Berny



reply via email to

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