Home | History | Annotate | Download | only in ffs
History log of /src/tests/fs/ffs/h_quota2_tests.c
RevisionDateAuthorComments
 1.6  08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.5  13-Jan-2017  christos branches: 1.5.26;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.4  30-Sep-2012  bouyer branches: 1.4.12;
Add test cases for the bug fixed in sys/ufs/ufs/ufs_quota2.c 1.35:
when a on-disk block/inode allocation triggers allocating a new
quota entry, the new quota entry is not in the quota2 header block,
and the allocation will later be denied, the changes to the quota block would
not be flushed to disk, leading to list corruption (detected by fsck).
 1.3  11-Jun-2011  christos branches: 1.3.2; 1.3.4; 1.3.6; 1.3.8;
Turn warns on for all tests and fix all the bugs.
 1.2  06-Mar-2011  bouyer branches: 1.2.2;
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.1  02-Feb-2011  bouyer branches: 1.1.2;
file h_quota2_tests.c was initially added on branch bouyer-quota2.
 1.1.2.5  13-Feb-2011  bouyer Add a test checking that an unlinked file cleaned by the log replay keeps
quotas up to date.
 1.1.2.4  12-Feb-2011  bouyer Add some quota+snapshot tests.
 1.1.2.3  07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.2  03-Feb-2011  bouyer Change semantic of limits to allow up to the limit inclued (instead of
up to one less than the limit: I feel that if my limit is 1000 inodes
I should be able to create 1000 files, not 999).
Keep the previous semantic for quota1 dquot, the conversion functions
will add or remove 1 when converting limits from/to the new format.

Adjust test for this change.
 1.1.2.1  02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.2.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.8.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.6.1  01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.3.4.1  01-Oct-2012  riz Pull up following revision(s) (requested by bouyer in ticket #580):
tests/fs/ffs/h_quota2_tests.c: revision 1.4
tests/fs/ffs/t_miscquota.sh: revision 1.7
sys/ufs/ufs/ufs_quota2.c: revision 1.35
Fix quota2 list corruption issue when defaultquotas are 0 (deny any file
and block allocation).
When quota2_check() is called with an uid not yet in the list,
getinoquota2() will call quota2_q2ealloc() to allocate a new entry for this
uid. quota2_q2ealloc() will remove an entry from the free list and
put it at the head of the corresponding hash list, and flush the block
containing the header if it's not the one also containing the allocated entry.
quota2_q2ealloc() then return the alocated entry and corresponding block
to caller (getinoquota2() here), which returns it to quota2_check().
quota2_check() then checks if the allocation can succeed, and returns and
error if not and calls brelse() on the buffer (because from his POW no
change was made to the entry), effectively discarding changes
to the entry that may have been made by quota2_q2ealloc().
Fix by always bwrite()ing the entry in quota2_q2ealloc(), and re-reading
the entry in caller.
Add test cases for the bug fixed in sys/ufs/ufs/ufs_quota2.c 1.35:
when a on-disk block/inode allocation triggers allocating a new
quota entry, the new quota entry is not in the quota2 header block,
and the allocation will later be denied, the changes to the quota block would
not be flushed to disk, leading to list corruption (detected by fsck).
 1.3.2.1  30-Oct-2012  yamt sync with head
 1.4.12.1  20-Mar-2017  pgoyette Sync with HEAD
 1.5.26.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed