Home | History | Annotate | Download | only in quotaon
History log of /src/usr.sbin/quotaon/quotaon.c
RevisionDateAuthorComments
 1.31  26-Apr-2022  hannken As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.
 1.30  07-Apr-2012  christos branches: 1.30.24; 1.30.34;
use getfsspecname()
 1.29  30-Jan-2012  dholland Add quota_quotaon() and quota_quotaoff(). Use them in quotaon(8).
 1.28  25-Jan-2012  dholland attribute noreturn -> __dead
 1.27  30-Sep-2011  jym branches: 1.27.2;
Fix an implementation inconsistency with the prop_*_send_syscall() and
prop_*_recv_syscall() functions from proplib(3). They now share the
same logic as the one from prop_*_send_ioctl() functions:
- returns an int
- 0 indicates "no error", otherwise returns the error number (and
set errno)

Many consumers of the prop_*_{ioctl, syscall} expect errno to be set
on error and use err() to display the error message. As such, ensures that
errno gets set before returning from these functions.

prop_*_send_syscall() functions returned a boolean, and now return an int.
Fix all call sites to use the new paradigm (only quota2 is affected in src).

As the prop_*_{send,recv}_syscall() API appeared in -current and is only
used by the recent quota2 code, I am not bumping the lib. The API change
only affects the prop_*_send_syscall() function (recv_syscall()s were
already used correctly), so ensure you are not mixing "old" -current
quota binaries with a new proplib(3) (or the other way around). This
change will be announced via a HEADS-UP and UPDATING.

Does not affect the kernel part of proplib.

Document the correct API in prop_array(3) and prop_dictionary(3).

Thanks to Francois Tigeot for noticing the API inconsistency and
reporting it on tech-kern@.

ok bouyer@.
 1.26  24-Mar-2011  bouyer Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
 1.25  06-Mar-2011  christos use common utils
 1.24  06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.23  18-Apr-2009  lukem branches: 1.23.2;
Fix -Wcast-qual issues
 1.22  21-Jul-2008  lukem branches: 1.22.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.21  21-Apr-2004  christos branches: 1.21.26;
Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.20  05-Jan-2004  jmmv Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.19  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.18  17-Feb-2003  perseant Add code to UBCify LFS. This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon. To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
writes for the pagedaemon, but which also takes over some of the
functions of lfs_check(). This thread is started the first time an
LFS is mounted.

* Add a "flags" parameter to GOP_SIZE. Current values are
GOP_SIZE_READ, meaning that the call should return the size of the
in-core version of the file, and GOP_SIZE_WRITE, meaning that it
should return the on-disk size. One of GOP_SIZE_READ or
GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
resources to get by and use malloc(...M_NOWAIT), using the reserves if
necessary. Use the pool subsystem for structures small enough that
this is feasible. This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
structure; getting closer to LFS as an LKM. "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
checkpoint; any segments that pass two checkpoints both dirty and
empty can be summarily cleaned. Do this. Right now lfs_segclean
still works, but this should be turned into an effectless
compatibility syscall.
 1.17  20-Jul-2002  grant sweep of errx/warnx, remove unnecessary trailing \n
 1.16  19-Feb-2001  cgd convert to use getprogname()
 1.15  07-Jul-2000  itojun errx?/warnx? audit. do not pass variable alone, use %s. idea from openbsd
 1.14  04-Jul-2000  matt More #include <stdlib.h> string, etc. cleanup
 1.13  27-Jul-1998  mycroft branches: 1.13.10;
const poisoning.
 1.12  03-Feb-1998  perry change includes to fix compiler warning
 1.11  22-Oct-1997  fair Initialize "cp" to make gcc/sparc error go away:
quotaon.c:222: warning: `cp' might be used uninitialized in this function
 1.10  17-Oct-1997  lukem branches: 1.10.2;
WARNSify
 1.9  21-Jun-1997  lukem Display quota type in quotaoff verbose messages, and in warnings.
From Joao Carlos Mendes Luis <jonny@gaia.coppe.ufrj.br> in [bin/2099]
 1.8  28-Sep-1996  christos Misc cleanups.
 1.7  30-Mar-1996  mark Use an integer instead of a char to store the getopt() return value in
order to match the prototype.
Compare the getopt() return value with -1 instead of EOF.
 1.6  28-Nov-1995  jtc merge in changes from 1.1 release branch
 1.5  23-Dec-1994  cgd branches: 1.5.2;
add headers for prototypes.
 1.4  13-Jun-1994  mycroft Merge local changes.
 1.3  13-Jun-1994  cgd update for new fs includes
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 1.1  09-Apr-1993  cgd branches: 1.1.1;
added accton, edquota, flcopy, gettable, htable, iostat, quotaon,
repquota, trpt, and trsp, per (currently alpha) patch 125.
 1.1.1.1  13-Jun-1994  mycroft Update from 4.4-Lite.
 1.5.2.1  01-Nov-1995  jtc Complete change from ufs -> ffs; (From Tatoku Ogaito; PR #1679)
 1.10.2.1  23-Oct-1997  mellon Pull rev 1.11 up from main trunk
 1.13.10.1  27-Jul-2000  itojun pullup (approved by releng-1-5)
printf-like format pedant. do not pass string variable alone. use "%s".
from openbsd.

/cvsroot/basesrc/usr.sbin/netgroup_mkdb/netgroup_mkdb.c 1.9 -> 1.10
/cvsroot/basesrc/usr.sbin/pwd_mkdb/pwd_mkdb.c 1.17 -> 1.18
/cvsroot/basesrc/usr.sbin/quotaon/quotaon.c 1.14 -> 1.15
/cvsroot/basesrc/usr.sbin/rdate/rdate.c 1.10 -> 1.11
/cvsroot/basesrc/usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c 1.5 -> 1.6
/cvsroot/basesrc/usr.sbin/traceroute6/traceroute6.c 1.12 -> 1.13
/cvsroot/basesrc/usr.sbin/wsconscfg/wsconscfg.c 1.6 -> 1.7
/cvsroot/basesrc/usr.sbin/ypserv/revnetgroup/revnetgroup.c 1.7 -> 1.8
/cvsroot/basesrc/usr.sbin/ypserv/ypserv/ypserv.c 1.10 -> 1.11
 1.21.26.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.22.6.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.23.2.1  09-Feb-2011  bouyer Make it compile with new quotactl
 1.27.2.1  17-Apr-2012  yamt sync with head
 1.30.34.1  27-Apr-2022  martin Pull up following revision(s) (requested by hannken in ticket #1440):

usr.sbin/quotaon/quotaon.c: revision 1.31
lib/libquota/quota_oldfiles.c: revision 1.10
sys/ufs/ufs/ufs_quota1.c: revision 1.25

Fix default quota file names, both user and group quota used the
same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in
diagnostic assertion and possibly corrupted quota data.

Keep flag "UFS_QUOTA" set until the last quota is closed.
Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1"
and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset.

As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.
 1.30.24.1  27-Apr-2022  martin Pull up following revision(s) (requested by hannken in ticket #1739):

usr.sbin/quotaon/quotaon.c: revision 1.31
lib/libquota/quota_oldfiles.c: revision 1.10
sys/ufs/ufs/ufs_quota1.c: revision 1.25

Fix default quota file names, both user and group quota used the
same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in
diagnostic assertion and possibly corrupted quota data.

Keep flag "UFS_QUOTA" set until the last quota is closed.
Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1"
and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset.

As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.

RSS XML Feed