summaryrefslogtreecommitdiffstats
path: root/sbin/growfs
Commit message (Collapse)AuthorAgeFilesLines
* Style.trasz2012-04-121-10/+7
|
* Remove block reallocation used to make room for the cylinder grouptrasz2012-04-121-854/+165
| | | | | | | | | | | | | | | | | summary structure. From now on, when there is no room for it, we simply allocate new one in a newly added cylinder group. This patch removes a conditional in updcsloc(), reindents some code there, and removes unused routines. I decided to do it this way instead of disabling reallocation when the filesystem is live and leaving it as it is otherwise, because this allows for removal of lots of complicated and hard to test code. Also, conditionally disabling it would result in a different layout in filesystems resized online and offline, which would look somewhat weird. Reviewed by: mckusick No objections from: kib Sponsored by: The FreeBSD Foundation
* Remove disklabel handling code from growfs. This should be donetrasz2012-03-291-105/+9
| | | | | | | via geom_part(4), and it doesn't belong in growfs anyway. Reviewed by: kib, mckusick Sponsored by: The FreeBSD Foundation
* After r232548, clang complains about the apparent '=-' operator (adim2012-03-121-1/+1
| | | | | | | | | | left-over from ancient C times, and a frequent typo) in growfs.c: sbin/growfs/growfs.c:1550:8: error: use of unary operator that may be intended as compound assignment (-=) [-Werror] blkno =- 1; ^~ Use 'blkno = -1' instead, to silence the error.
* Make growfs(8) mostly style compliant. No functional changes,trasz2012-03-052-616/+457
| | | | verified with MD5.
* Allow growfs to be built with GCC 4.7 and -Werror.ed2012-01-171-1/+3
| | | | | The dp1 variable is only used when FSIRAND is defined. Just place the variable behind #ifdefs entirely.
* Add missing static keywords for global variables to tools in sbin/.ed2011-11-041-1/+1
| | | | | | These tools declare global variables without using the static keyword, even though their use is limited to a single C-file, or without placing an extern declaration of them in the proper header file.
* Revert the mechanical change from 'file system' to 'filesystem', committedtrasz2011-06-282-41/+41
| | | | in r223429. As bde@ pointed out, it was mostly backwards.
* Cosmetic fixes; mostly s/file system/filesystem/g and removing weird indenttrasz2011-06-222-46/+46
| | | | from messages.
* We now have multiple filesystems (UFS, ZFS, ...), so for tools that onlygavin2011-05-081-2/+2
| | | | | | | | operate on one type of filesystem, mention this. While here, capitalise the use of "UFS" in growfs.8 to match other uses of the term in other man pages. MFC after: 1 week
* Fix typos - remove duplicate "is".brucec2011-02-231-1/+1
| | | | | | PR: docs/154934 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* s/utime/modtime/g -- utime shadows utime(3).marcel2011-01-221-12/+12
| | | | Submitted by: Garrett Cooper
* Fix some more warnings found by clang.brucec2010-11-221-1/+1
|
* Unbreak the build on strong-aligned architectures (arm, ia64).marcel2010-09-201-1/+1
| | | | | | | Casting from (char *) to (struct ufs1_dinode *) changes the alignment requirement of the pointer and GCC does not know that the pointer is adequately aligned (due to malloc(3)), and warns about it. Cast to (void *) first to by-pass the check.
* Revise r197763 which fixes filesystem corruption when extendingbrian2010-09-191-14/+13
| | | | | | | | | | | | into un-zeroed storage. The original patch was questioned by Kirk as it forces the filesystem to do excessive work initialising inodes on first use, and was never MFC'd. This change mimics the newfs(8) approach of zeroing two blocks of inodes for each new cylinder group. Reviewed by: mckusick MFC after: 3 weeks
* When growing a UFS1 filesystem, we need to initialise all inodes in any newgavin2010-02-131-4/+2
| | | | | | | | | | | | | | | | | | | | | cylinder groups that are created. When the filesystem is first created, newfs always initialises the first two blocks of inodes, and then in the UFS1 case will also initialise the remaining inode blocks. The changes in growfs.c 1.23 broke the initialisation of all inodes, seemingly based on this implementation detail in newfs(8). The result was that instead of initialising all inodes, we would actually end up initialising all but the first two blocks of inodes. If the filesystem was grown into empty (all-zeros) space then the resulting filesystem was fine, however when grown onto non-zeroed space the filesystem produced would appear to have massive corruption on the first fsck after growing. A test case for this problem can be found in the PR audit trail. Fix this by once again initialising all inodes in the UFS1 case. PR: bin/115174 Submitted by: Nate Eldredgei nge cs.hmc.edu Reviewed by: mjacob MFC after: 1 month
* Quiet spurious warnings.mckusick2010-02-111-8/+8
|
* Remove dead code. This section of code is only run in thegavin2010-01-021-10/+4
| | | | | | | | | | (sblock.fs_magic == FS_UFS1_MAGIC) case, so the check within the loop is redundant. Submitted by: Nate Eldredge nge cs.hmc.edu Reviewed by: mjacob Approved by: ed (mentor) MFC after: 1 month
* Switch the default WARNS level for sbin/ to 6.ru2009-10-191-2/+0
| | | | Submitted by: Ulrich Spörlein
* The cylinder group tag cg_initediblk needs to match the number of inodesmjacob2009-10-051-2/+8
| | | | | | | | | actually initialized. In the growfs case for UFS2, no inodes were actually being initialized and the number of inodes noted as initialized was the number of inodes per group. This created a filesystem that was deemed corrupted because the inodes thus added were full of garbage. MFC after: 1 month
* Fix an int overflow on very large file systems.das2007-12-171-2/+2
| | | | | PR: bin/113399 Submitted by: Staffan Ulfberg <staffan@ulfberg.se>
* Teach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag.pjd2006-10-311-0/+3
| | | | Sponsored by: home.pl
* Remove duplicated assignment.stefanf2006-07-171-1/+0
|
* Don't define FS_DEBUG by default, as this causes growfs to write debuggingrwatson2005-03-311-1/+0
| | | | | | | information to /tmp/growfs.debug, which is a world-writable directory. MFC after: 3 days Reported by: Jon Passki <cykyc@yahoo.com>
* Sort sections.ru2005-01-181-18/+18
|
* Remove \n at the end of err(3) stringscharnier2005-01-161-7/+5
|
* Cross-reference ffsinfo(8).jkoshy2004-12-261-0/+1
|
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* 3 important fixes for growfs:scottl2004-10-091-22/+42
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Catch up with recent gcc changes and introduce a DIP_SET macrole2004-07-292-3/+9
| | | | | to use when setting values that depend on the UFS version. Raise WARNS again.
* Downgrade WARNS level until GCC 3.4.2 warning are fixed.kan2004-07-281-1/+1
|
* Parenthesised string literals are invalid in initialisers for character arrays.stefanf2004-07-061-1/+1
| | | | Use braces instead.
* Include <time.h> instead of depending on namespace pollution in <sys/stat.h>bde2004-04-041-0/+1
| | | | for the declaration of time().
* It seems growfs(8) is now WARNS?=6 safe.mux2004-04-031-1/+1
| | | | Tested on: alpha, i386, ia64, sparc64
* Fix the remaining warnings of growfs(8) on my sparc64 box withmux2004-04-031-4/+4
| | | | | | | | WARNS=6. I don't change the WARNS level in the Makefile because I didn't tested this on other archs. The fs.h fix was suggested by: marcel Reviewed by: md5(1)
* - Don't abuse caddr_t when what we really want is a void *.mux2004-04-031-4/+5
| | | | | | | - Use the %jd format and a cast to intmax_t to print an int64_t. - The return type of getopt() is an int, not a char. This fixes some warnings but there's still much more work to do here.
* Temporarily go back to WARNS=0 until I can figure out what's breakingle2004-04-031-1/+1
| | | | | | the {powerpc, sparc64, ia64} tinderboxes. Sorry for the noise. :-(
* Make growfs WARNS=6 clean.le2004-04-033-45/+49
| | | | Approved by: grog (mentor)
* Remove these MAINTAINER lines since the maintainers has had theirjohan2004-04-011-2/+0
| | | | commit bits retired for safe keeping.
* Don't read an inode which isn't used to avoid problems on UFS2 where notle2004-03-261-0/+8
| | | | | | all inodes are initialized when running newfs. Approved by: grog (mentor)
* Fix bogus "ffsinfo -c 0" example with "ffsinfo -g 0 -l 4".blackend2004-01-231-1/+2
| | | | | | PR: bin/61472 Submitted by: Alex Popa <razor@ldc.ro> MFC after: 1 week
* Remove another instance of 'disklabel' which eluded me last time.trhodes2003-12-261-1/+1
| | | | Noticed by: Andre Guibert de Bruet <andy@siliconlandmark.com> (via -doc)
* s/disklabel/bsdlabeltrhodes2003-12-231-1/+1
| | | | Submitted by: Andre Guibert de Bruet <andy@siliconlandmark.com> (via -doc)
* Remove a few unused variables.trhodes2003-10-301-3/+2
|
* Commit 1 of 2 to fix ffsinfo(8) for UFS2.rwatson2003-08-142-115/+292
| | | | | | | | | | | | | Add support for UFS2 to the UFS debugging routines in growfs; required to update ffsinfo(8) for UFS2. A variety of types and fs variables are renamed to reflect UFS1/2 structures. Also, the print routines for inodes are now split into separate UFS1 and UFS2 versions. We now define dbg_dump_csum_total(), but lose the printing of rotational information since that's not present in UFS2. In the future, we may want to re-add this functionality to print it solely for UFS1. Submitted by: Lukas Ertl <l.ertl@univie.ac.at> PR: bin/53517
* Remove references to ffsinfo(8) for now. It was disconnected frombrueffer2003-06-171-1/+0
| | | | the build almost a year ago.
* style clean.obrien2003-06-111-2/+2
|
* Understand GEOM. This makes growfs work again, but it really needs rewriting.grog2003-05-121-28/+57
| | | | | Submitted by: Lukas Ertl <l.ertl@univie.ac.at> Approved by: re (scottl)
* Fix typos in comments; some style(9) fixes; no code changes.schweikh2003-04-261-121/+117
| | | | | PR: misc/50979 Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
OpenPOWER on IntegriCloud