Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 11:58:32 +0000 (UTC)
From:      Mike Pritchard <mpp@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ufs/ffs ffs_alloc.c ffs_snapshot.c src/sys/ufs/ufs quota.h ufs_quota.c
Message-ID:  <200701201158.l0KBwWFn088861@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
mpp         2007-01-20 11:58:32 UTC

  FreeBSD src repository

  Modified files:
    sys/ufs/ffs          ffs_alloc.c ffs_snapshot.c 
    sys/ufs/ufs          quota.h ufs_quota.c 
  Log:
  Quota system cleanup.
  
  1) Do not do quota accounting for the actual quota data files
     or for file system snapshot files ("system" files).  This
     prevents a deadlock descibed in PR kern/30958 if the kernel
     ever has to grow the quota file.  Snapshot files were already
     exempt from the quota checks, but this change generalized the check.
  2) Fix a cast that caused extremely large uids/gids to incorrectly
     write the quota information to the data file at a truncated
     value for a uint_t32 id value.  The incorrect cast caused quota
     files in this case to be around 4GB in size, with the correct cast
     they can now be 131GB in size.  Also related to PR kern/30958.
  3) Check for what appear to be negative UIDs/GIDs and not account
     for them.  This prevents the quota files from becoming 131GB in
     size and causing quotacheck to run forever at bootup.  This could
     also cause the kernel to try and expand the quota file, which might
     deadlock due to the issue in #1.  kern/30958 and kern/38156
     (and some much older closed PR's).
  4) With the deadlock problems gone, the kernel can now expand the
     size of the quota database files if it needs to.
  5) Pass in the i-node count change value to chkiq and chkiqchg as an
     int, like it used to be before the common routine was split up
     into 2 different routines to increase / decrease the i-node in-use
     count.  Prevents an underflow on the i-node count.  Related
     to PR kern/89247.
  6) Prevent the block usage from growing slowly if a file system is
     full and the write was denied due to that fact.  PR kern/89247.
  
  Some of these changes require an updated quotacheck to prevent
  the creation of huge (131GB) quota data files (item #3).
  
  #1/#4 probably fixes a lot of the random hangs when quotas are enabled,
  possibly some of the jail hangs.
  
  Revision  Changes    Path
  1.143     +1 -1      src/sys/ufs/ffs/ffs_alloc.c
  1.132     +1 -13     src/sys/ufs/ffs/ffs_snapshot.c
  1.29      +1 -1      src/sys/ufs/ufs/quota.h
  1.86      +38 -15    src/sys/ufs/ufs/ufs_quota.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701201158.l0KBwWFn088861>