[BACK]Return to quotas_common.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / sbin / newfs

File: [cvs.NetBSD.org] / src / tests / sbin / newfs / quotas_common.sh (download)

Revision 1.2, Sun Mar 6 17:08:41 2011 UTC (11 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.1: +43 -0 lines

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.

# $NetBSD: quotas_common.sh,v 1.2 2011/03/06 17:08:41 bouyer Exp $ 

	local endian=$1; shift
	local vers=$1; shift
	local type=$1; shift
	local op;
	if [ ${type} = "both" ]; then
		op="-q user -q group"
		op="-q ${type}"
	atf_check -o ignore -e ignore newfs ${op} \
		-B ${endian} -O ${vers} -s 4000 -F ${IMG}

# from tests/ipf/h_common.sh via tests/sbin/resize_ffs
	local name="${1}"; shift
	local check_function="${1}"; shift
	local descr="${1}"; shift
	atf_test_case "${name}"

	eval "${name}_head() { \
		atf_set "descr" "Checks ${descr} quotas inodes"
	eval "${name}_body() { \
		${check_function} " "${@}" "; \
	tests="${tests} ${name}"

	for i in ${tests}; do
		atf_add_test_case $i