NetBSD Problem Report #49307

From riz@xs2.lan  Wed Oct 22 21:41:13 2014
Return-Path: <riz@xs2.lan>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 74C13A665A
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 22 Oct 2014 21:41:13 +0000 (UTC)
Message-Id: <20141022214108.D1DA621EA6E@xs2.lan>
Date: Wed, 22 Oct 2014 14:41:08 -0700 (PDT)
From: riz@tastylime.net
Reply-To: riz@tastylime.net
To: gnats-bugs@NetBSD.org
Subject: df -t "no" file system exclusion problems
X-Send-Pr-Version: 3.95

>Number:         49307
>Category:       bin
>Synopsis:       df -t does not work properly with multiple "no" file system exclusions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 22 21:45:00 +0000 2014
>Last-Modified:  Thu Oct 23 03:05:00 +0000 2014
>Originator:     riz@tastylime.net
>Release:        NetBSD 7.0_BETA
>Organization:
>Environment:
System: NetBSD xs2.lan 7.0_BETA NetBSD 7.0_BETA (GENERIC) #0: Sun Sep 28 15:31:00 PDT 2014 riz@xs2.lan:/build/amd64/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	Using multiple "no"-style file system exclusions doesn't work.  Per the man
page, I would expect:

df -t nonull,noprocfs

to exclude all nullfs and all procfs file systems, but it only excludes the first in the list.

>How-To-Repeat:
xs2:riz  ~> df -h -t nonull,noprocfs
Filesystem                                  Size       Used      Avail %Cap Mounted on
/dev/raid0a                                  38G        32G       3.9G  89% /
tmpfs                                        69G       7.2M        69G   0% /tmp
kernfs                                      1.0K       1.0K         0B 100% /kern
ptyfs                                       1.0K       1.0K         0B 100% /dev/pts
procfs                                      4.0K       4.0K         0B 100% /proc
/dev/mapper/mirror-pbulk--data               29G       5.5G        22G  19% /bulk-data
/dev/mapper/mirror-pbulk--packages           48G        18G        28G  39% /packages
/dev/mapper/mirror-cvsroot                   36G        16G        18G  46% /cvsroot
/dev/mapper/mirror-build                     29G        11G        16G  40% /build
vidnas:/mnt/tank/netbsd/pkg/distfiles       489G        51G       437G  10% /distfiles
tmpfs                                        18G       4.0K        18G   0% /var/shm
/dev/dk0                                     36G        18G        16G  53% /bulk-scratch
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r1/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r2/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r3/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r4/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r5/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r6/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r7/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r8/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r9/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r10/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r11/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/r12/proc
procfs                                      4.0K       4.0K         0B 100% /bulk-scratch/master/proc
/dev/dk1                                     27G       5.8G        20G  22% /src
xs2:riz  ~> df -h -t noprocfs,nonull
Filesystem                                  Size       Used      Avail %Cap Mounted on
/dev/raid0a                                  38G        32G       3.9G  89% /
tmpfs                                        69G       7.2M        69G   0% /tmp
kernfs                                      1.0K       1.0K         0B 100% /kern
ptyfs                                       1.0K       1.0K         0B 100% /dev/pts
/dev/mapper/mirror-pbulk--data               29G       5.5G        22G  19% /bulk-data
/dev/mapper/mirror-pbulk--packages           48G        18G        28G  39% /packages
/dev/mapper/mirror-cvsroot                   36G        16G        18G  46% /cvsroot
/dev/mapper/mirror-build                     29G        11G        16G  40% /build
vidnas:/mnt/tank/netbsd/pkg/distfiles       489G        51G       437G  10% /distfiles
tmpfs                                        18G       4.0K        18G   0% /var/shm
/dev/dk0                                     36G        18G        16G  53% /bulk-scratch
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r1/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r1/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r1/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r1/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r2/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r2/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r2/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r2/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r3/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r3/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r3/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r3/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r4/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r4/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r4/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r4/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r5/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r5/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r5/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r5/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r6/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r6/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r6/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r6/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r7/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r7/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r7/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r7/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r8/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r8/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r8/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r8/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r9/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r9/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r9/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r9/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r10/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r10/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r10/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r10/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r11/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r11/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r11/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r11/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/r12/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/r12/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/r12/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/r12/bulk-data/distfiles
/dev/pts                                    1.0K       1.0K         0B 100% /bulk-scratch/master/dev/pts
/bulk-data                                   29G       5.5G        22G  19% /bulk-scratch/master/bulk-data
/packages/x86_64                             48G        18G        28G  39% /bulk-scratch/master/bulk-data/packages
/distfiles                                  489G        51G       437G  10% /bulk-scratch/master/bulk-data/distfiles
/dev/dk1                                     27G       5.8G        20G  22% /src
/home/riz/rwsrc                              38G        32G       3.9G  89% /home/riz/src
xs2:riz  ~>
>Fix:
	None given.

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/49307: df -t "no" file system exclusion problems
Date: Wed, 22 Oct 2014 19:09:36 -0400

 On Oct 22,  9:45pm, riz@tastylime.net (riz@tastylime.net) wrote:
 -- Subject: bin/49307: df -t "no" file system exclusion problems

 | xs2:riz  ~> df -h -t nonull,noprocfs

 df -h -t nonull,profs

 The no is only valid at the beginning and negates all of them, as documented:

     The list of filesystem types can be prefixed with ``no'' to
     specify the filesystem types for which action should not be taken.

 christos

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/49307: df -t "no" file system exclusion problems
Date: Thu, 23 Oct 2014 03:02:38 +0000

 On Wed, Oct 22, 2014 at 11:10:01PM +0000, Christos Zoulas wrote:
  >  df -h -t nonull,profs
  >  
  >  The no is only valid at the beginning and negates all of them, as documented:
  >  
  >      The list of filesystem types can be prefixed with ``no'' to
  >      specify the filesystem types for which action should not be taken.

 Shouldn't it at least warn if it sees another no, then?

 (I suppose this would break if someone came up with something called
 notfs or nopefs... but it probably does already, and it ought to be
 checking the list of known fs types and warning about nonexistent
 ones.)

 % df -h -t fns
 % 

 -- 
 David A. Holland
 dholland@netbsd.org

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.