From root@dataloss.nl  Wed Jun  5 05:28:44 2002
Return-Path: <root@dataloss.nl>
Received: from useful.dataloss.nl (useful.dataloss.nl [193.109.122.194])
	by hub.freebsd.org (Postfix) with SMTP id EE67E37B495
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Jun 2002 05:28:23 -0700 (PDT)
Received: (qmail 96756 invoked by uid 0); 5 Jun 2002 12:28:16 -0000
Message-Id: <20020605122816.96755.qmail@useful.dataloss.nl>
Date: 5 Jun 2002 12:28:16 -0000
From: Peter van Dijk <peter@dataloss.nl>
Reply-To: Peter van Dijk <peter@dataloss.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: edquota breaks silently when quota-marked filesystems are not mounted
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38918
>Category:       bin
>Synopsis:       edquota breaks silently when quota-marked filesystems are not mounted
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 05 05:30:01 PDT 2002
>Closed-Date:    Thu Mar 01 09:35:38 GMT 2007
>Last-Modified:  Thu Mar 01 09:35:38 GMT 2007
>Originator:     Peter van Dijk
>Release:        FreeBSD 4.4-RELEASE-p11 i386
>Organization:
-
>Environment:
System: FreeBSD useful.dataloss.nl 4.4-RELEASE-p11 FreeBSD 4.4-RELEASE-p11 #0: Sun Apr 21 19:49:46 CEST 2002 root@useful.dataloss.nl:/home2/usr2/obj/home2/usr2/src/sys/USEFUL i386

useful# cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/da0s1b             none            swap    sw              0       0
/dev/da0s1a             /               ufs     rw              1       1
/dev/da0s1g             /home           ufs     rw,userquota            2      2
/dev/da0s1f             /usr            ufs     rw              2       2
/dev/da0s1e             /var            ufs     rw              2       2
/dev/ad2s1e            /home/private   ufs     rw,userquota,groupquota,noauto 0	0
/dev/ad1s1e             /home2          ufs     rw      0       0
proc                    /proc           procfs  rw              0       0 


>Description:

with /home/private not mounted, 'edquota user' gives me a file to edit
like:
Quotas for user add:
/home: blocks in use: 15084, limits (soft = 20000, hard = 30000)
        inodes in use: 706, limits (soft = 0, hard = 0)
/home/private: blocks in use: 15084, limits (soft = 20000, hard = 30000)
        inodes in use: 706, limits (soft = 0, hard = 0)


When I edit the values for /home and exit edquota, no error is reported,
but no quota is updated.

>How-To-Repeat:
Mount a filesystem, turn on quota on that system, and put a subdir of that
filesystem in fstab, without mounting anything on it. edquota something
on the mounted filesystem, and then check if edquota actually updated anything.

>Fix:
fix: make edquota check if a filesystem is mounted, or at least make sure
it reports error conditions.

workaround: comment any filesystems in fstab that are not actually mounted.
>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/38918: commit references a PR
Date: Sun,  4 Feb 2007 06:33:46 +0000 (UTC)

 mpp         2007-02-04 06:33:15 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.sbin/edquota     edquota.c 
     usr.bin/quota        quota.c 
     sbin/quotacheck      quotacheck.c 
     usr.sbin/quotaon     quotaon.c 
     usr.sbin/repquota    repquota.c 
   Log:
   If two files systems, /a and /b are marked as having quotas enabled
   in fstab and they are normally mounted as /a/b, if /b is not mounted,
   the various quota utilities will incorrectly operate with the quotas on
   /a (silently) when operations are attemted on /b.
   
   Sync up all the hasquota() routines between all the different
   quota utilities and change it to detect if the file system we are
   attempting to perform quota operations on is not currently mounted
   and warn the user accordingly.
   
   PR:     bin/38918
   
   Revision  Changes    Path
   1.32      +17 -6     src/sbin/quotacheck/quotacheck.c
   1.27      +21 -7     src/usr.bin/quota/quota.c
   1.26      +23 -8     src/usr.sbin/edquota/edquota.c
   1.12      +21 -8     src/usr.sbin/quotaon/quotaon.c
   1.20      +22 -8     src/usr.sbin/repquota/repquota.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Thu Mar 1 09:35:34 UTC 2007 
State-Changed-Why:  
A fix had recently been committed, thanks for the notification and 
thanks for using FreeBSD! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38918 
>Unformatted:
