freebsd-nq/sbin/growfs
Scott Long e7c4605481 3 important fixes for growfs:
1) ginode() is passed a cylinder group number and inode number.  The inode
number is relative to the cg.  Use this relative number rather than the
absolute inode number when searching the cg inode bitmap to see if the inode
is allocated.  Using the absolute number quickly runs the check off the end
of the array and causes invalid inodes to be referenced.

2) ginode() checks the absolute indoe number to make sure that it is greater
than ROOTINO.  However, the caller loops through all of the possible inode
numbers and directly passes in values that are < ROOTINO.  Instead of halting
the program with an error, just return NULL.

3) When allocating new cylinder groups, growfs was initializing all of the
inodes in the group regardless of this only being required for UFS1.  Not
doing this for UFS2 provides a significant performance increase.

These fixes allow growing a filesystem beyond a trivial amount and have
been tested to grow an 8GB filesystem to 1.9TB.  Much more testing would
be appreciated.

Obtained from: Sandvine, Inc.
2004-10-09 02:53:47 +00:00
..
debug.c Make growfs WARNS=6 clean. 2004-04-03 17:40:19 +00:00
debug.h Parenthesised string literals are invalid in initialisers for character arrays. 2004-07-06 17:48:34 +00:00
growfs.8 Fix bogus "ffsinfo -c 0" example with "ffsinfo -g 0 -l 4". 2004-01-23 17:35:09 +00:00
growfs.c 3 important fixes for growfs: 2004-10-09 02:53:47 +00:00
Makefile Catch up with recent gcc changes and introduce a DIP_SET macro 2004-07-29 11:28:24 +00:00