From owner-cvs-src@FreeBSD.ORG Sat Jan 20 11:58:32 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 93FB116A402; Sat, 20 Jan 2007 11:58:32 +0000 (UTC) (envelope-from mpp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 844E513C478; Sat, 20 Jan 2007 11:58:32 +0000 (UTC) (envelope-from mpp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0KBwWZu088862; Sat, 20 Jan 2007 11:58:32 GMT (envelope-from mpp@repoman.freebsd.org) Received: (from mpp@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0KBwWFn088861; Sat, 20 Jan 2007 11:58:32 GMT (envelope-from mpp) Message-Id: <200701201158.l0KBwWFn088861@repoman.freebsd.org> From: Mike Pritchard Date: Sat, 20 Jan 2007 11:58:32 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/ufs/ffs ffs_alloc.c ffs_snapshot.c src/sys/ufs/ufs quota.h ufs_quota.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2007 11:58:32 -0000 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