bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH v2] mountlist: additional dummy FS names for Linux


From: Jim Meyering
Subject: Re: [PATCH v2] mountlist: additional dummy FS names for Linux
Date: Fri, 14 Dec 2012 05:17:35 +0100

Eric Wong wrote:

> Jim Meyering <address@hidden> wrote:
>> Eric Wong wrote:
>> > * lib/mountlist.c (ME_DUMMY_0):
>> >   additional dummy FS names for Linux systems.
>> >   - "devpts" PTY slave filesystem
>> >   - "fusectl" control filesystem for FUSE
>> >   - "mqueue" enumerates POSIX message queues
>> >   - "rpc_pipefs" kernel <-> userspace bridge for NFS
>> >   - "sysfs" is for exporting kernel objects
>> >   - "devfs" device filesystem for Linux 2.4 and FreeBSD
>> >   There are likely more dummy FSes I am not aware of.
>>
>> Thanks.  I'll look at this Sat or Sunday.
>> What's the motivation?  Have df hide those entries?
>
> It just seems right to mark those as dummy since they
> aren't used for normal file storage.
>
> It allows cmogstored[1] to skip some entries and avoid extra
> stat() and a tiny amount of memory allocation.  No big deal
> with or without it.
>
> [1] http://bogomips.org/cmogstored/README

Thanks.  I've tweaked the log and added a matching ChangeLog entry.
Testing via df on my F18 laptop, diff -u <(src/df-prev) <(src/df)
shows no difference.  What do people think of this entry from
that F18 system?

    devtmpfs         1538304        0   1538304   0% /dev

If we're omitting "devfs", then should "devtmpfs" also be omitted?


>From a715f6c8d7752364c9c1fc5c02109e4dac9c60db Mon Sep 17 00:00:00 2001
From: Eric Wong <address@hidden>
Date: Fri, 7 Dec 2012 23:14:34 +0000
Subject: [PATCH] mountlist: recognize more "dummy" file systems

* lib/mountlist.c (ME_DUMMY_0):
  Add these dummy FS names to the list:
  - "devpts" PTY slave filesystem
  - "fusectl" control filesystem for FUSE
  - "mqueue" enumerates POSIX message queues
  - "rpc_pipefs" kernel <-> userspace bridge for NFS
  - "sysfs" is for exporting kernel objects
  - "devfs" device filesystem for Linux 2.4 and FreeBSD
---
 ChangeLog       | 12 ++++++++++++
 lib/mountlist.c |  8 ++++++++
 2 files changed, 20 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a49fc07..6637b0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-12-07  Eric Wong  <address@hidden>
+
+       mountlist: recognize more "dummy" file systems
+       * lib/mountlist.c (ME_DUMMY_0):
+       Add these dummy FS names to the list:
+       - "devpts" PTY slave filesystem
+       - "fusectl" control filesystem for FUSE
+       - "mqueue" enumerates POSIX message queues
+       - "rpc_pipefs" kernel <-> userspace bridge for NFS
+       - "sysfs" is for exporting kernel objects
+       - "devfs" device filesystem for Linux 2.4 and FreeBSD
+
 2012-12-10  Eli Zaretskii  <address@hidden>

        canonicalize, canonicalize-lgpl: Microsoft Windows prefix fixes
diff --git a/lib/mountlist.c b/lib/mountlist.c
index d0fe1b2..359aa10 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -153,6 +153,14 @@
   (strcmp (Fs_type, "autofs") == 0              \
    || strcmp (Fs_type, "proc") == 0             \
    || strcmp (Fs_type, "subfs") == 0            \
+   /* for Linux 2.6/3.x */                      \
+   || strcmp (Fs_type, "devpts") == 0           \
+   || strcmp (Fs_type, "fusectl") == 0          \
+   || strcmp (Fs_type, "mqueue") == 0           \
+   || strcmp (Fs_type, "rpc_pipefs") == 0       \
+   || strcmp (Fs_type, "sysfs") == 0            \
+   /* FreeBSD, Linux 2.4 */                     \
+   || strcmp (Fs_type, "devfs") == 0            \
    /* for NetBSD 3.0 */                         \
    || strcmp (Fs_type, "kernfs") == 0           \
    /* for Irix 6.5 */                           \
--
1.8.0.1.352.gfb4c622



reply via email to

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