[Top][All Lists]

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

Re: Hide rootfs filesystem in df

From: Karel Zak
Subject: Re: Hide rootfs filesystem in df
Date: Wed, 17 Oct 2012 12:23:15 +0200
User-agent: Mutt/1.5.21 (2011-07-01)

On Mon, Sep 24, 2012 at 03:01:36PM +0000, 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):
> 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?

The reason why libmount reads the mountinfo file is that the file
provides more information (like FS root, mount Id, ...) necessary for
libmount. From my point of view the /proc/mounts should be enough for
programs like df(1) as you don't need any additional information.

I have doubts that rootfs entry is good reason to maintain another


 Karel Zak  <address@hidden>

reply via email to

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