aboutsummaryrefslogtreecommitdiff
path: root/sbin/tunefs
Commit message (Collapse)AuthorAgeFilesLines
* Filesystem utilities that modify the filesystem (growfs(8), tunefs(8),Kirk McKusick2020-10-251-17/+24
| | | | | | | | | | | | and fsirand(8)) should check the filesystem status and require that fsck(8) be run if it is unclean. This requirement is not imposed on fsdb(8) or clri(8) since they may be used to clean up a filesystem. MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=367035
* Only set WARNS if not definedKyle Evans2020-09-111-1/+1
| | | | | | | | | | | | | This would allow interested parties to do experimental runs with an environment set appropriately to raise all the warnings throughout the build; e.g. env WARNS=6 NO_WERROR=yes buildworld. Not currently touching the numerous instances in ^/tools. MFC after: 1 week Notes: svn path=/head/; revision=365631
* The size of the UFS soft-updates journal must be a multiple of theKirk McKusick2019-03-021-2/+2
| | | | | | | | | | | | filesystem block size. When a size is specified with the -S flag to tunefs(8), round it up to the filesystem block size. Reported by: Peter Holm Tested by: Peter Holm Sponsored by: Netflix Notes: svn path=/head/; revision=344731
* Allow dashes as a valid character in UFS labels.Dmitry Morozovsky2019-01-292-4/+7
| | | | | | | | | Reviewed by: mckusick, imp, 0mp MFC after: 2 weeks Differential Revision: D18991 Notes: svn path=/head/; revision=343548
* Update tunefs and newfs error messages for the -L (volume label) optionKirk McKusick2019-01-261-3/+2
| | | | | | | | | | | to note that underscores are valid. PR: 235182 Reported by: Rodney W. Grimes (rgrimes@) Sponsored by: Netflix Notes: svn path=/head/; revision=343483
* Allow tunefs to include '_' as a legal character in label namesKirk McKusick2019-01-252-1/+2
| | | | | | | | | | | | | | to make it consistent with newfs. Document the legality of '_' in label names in both tunefs(8) and newfs(8). PR: 235182 Submitted by: darius@dons.net.au Reviewed by: Conrad Meyer MFC after: 3 days Sponsored by: Netflix Notes: svn path=/head/; revision=343449
* In preparation for adding inode check-hashes, clean up andKirk McKusick2018-11-131-89/+72
| | | | | | | | | | | | | | | | | | | document the libufs interface for fetching and storing inodes. The undocumented getino / putino interface has been replaced with a new getinode / putinode interface. Convert the utilities that had been using the undocumented interface to use the new documented interface. No functional change (as for now the libufs library does not do inode check-hashes). Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix Notes: svn path=/head/; revision=340411
* Fix spelling of an error message and add warning to another errorBjoern A. Zeeb2018-10-171-2/+4
| | | | | | | | | | | case in tunefs(8). Reviewed by: imp (2017 version of the same diff) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D10046 Notes: svn path=/head/; revision=339414
* Revert r313780 (UFS_ prefix)Ed Maste2018-03-171-2/+2
| | | | Notes: svn path=/head/; revision=331095
* Prefix UFS symbols with UFS_ to reduce namespace pollutionEd Maste2018-03-171-2/+2
| | | | | | | | | | | | | Followup to r313780. Also prefix ext2's and nandfs's versions with EXT2_ and NANDFS_. Reported by: kib Reviewed by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9623 Notes: svn path=/head/; revision=331083
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* prefix UFS symbols with UFS_ to reduce namespace pollutionEd Maste2017-02-151-13/+13
| | | | | | | | | | | | | | | | | | | | | Specifically: ROOTINO -> UFS_ROOTINO WINO -> UFS_WINO NXADDR -> UFS_NXADDR NDADDR -> UFS_NDADDR NIADDR -> UFS_NIADDR MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency) Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_ Reviewed by: kib, mckusick Obtained from: NetBSD MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9536 Notes: svn path=/head/; revision=313780
* Convert tunefs use to nmount(2)Brooks Davis2016-12-222-5/+19
| | | | | | | | | Reviewed by: jhb, emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8822 Notes: svn path=/head/; revision=310382
* Mention fsck_ffs -E in tunefs(8). It's non-obvious that one shouldEdward Tomasz Napierala2016-04-191-2/+8
| | | | | | | | | | | | use it after enabling TRIM. Reviewed by: brueffer@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5928 Notes: svn path=/head/; revision=298271
* MFHGlen Barber2016-03-101-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * tunefs: clear the entire previous label when setting a new oneEd Maste2016-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strlcpy(3) null terminates but does not zero-fill the buffer, so would leave beind any portion of the previous volume label longer than the new one. Note that tunefs only allows -L args up to a length of MAXVOLLEN-1, so the stored label will be null-terminated (whether or not required by UFS). Reviewed by: imp Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296468
* | Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Merge from headSimon J. Gerraty2013-09-051-4/+4
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ sync from headSimon J. Gerraty2013-04-122-9/+48
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync from headSimon J. Gerraty2012-11-041-16/+15
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* | | | Constify string pointers.Xin LI2013-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verified with: sha256(1) MFC after: 2 weeks Notes: svn path=/head/; revision=250718
* | | | Fix error check.Kirk McKusick2013-04-231-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Submitted by: Andrey Chernov (ache@) MFC after: 3 days Notes: svn path=/head/; revision=249789
* | | The purpose of this change to the FFS layout policy is to reduce theKirk McKusick2013-03-222-8/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | running time for a full fsck. It also reduces the random access time for large files and speeds the traversal time for directory tree walks. The key idea is to reserve a small area in each cylinder group immediately following the inode blocks for the use of metadata, specifically indirect blocks and directory contents. The new policy is to preferentially place metadata in the metadata area and everything else in the blocks that follow the metadata area. The size of this area can be set when creating a filesystem using newfs(8) or changed in an existing filesystem using tunefs(8). Both utilities use the `-k held-for-metadata-blocks' option to specify the amount of space to be held for metadata blocks in each cylinder group. By default, newfs(8) sets this area to half of minfree (typically 4% of the data area). This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm MFC after: 4 weeks Notes: svn path=/head/; revision=248623
* | | The .journal file needs to reside on the ROOTINO which must not extendPeter Holm2013-02-271-1/+1
| |/ |/| | | | | | | | | | | beyond direct blocks. A typo caused this check to fail. Notes: svn path=/head/; revision=247399
* | Declare functions as static and move global variables to the top;Edward Tomasz Napierala2012-10-281-13/+12
| | | | | | | | | | | | | | no functional changes. Notes: svn path=/head/; revision=242265
* | Fix sbin/ build with a 64-bit ino_t.Matthew D Fleming2012-09-271-3/+3
|/ | | | | | | Original code by: Gleb Kurtsou Notes: svn path=/head/; revision=241013
* Fix warning when compiling with gcc46:Eitan Adler2012-01-101-2/+1
| | | | | | | | | | error: variable 'Sflag' set but not used Approved by: dim MFC after: 3 days Notes: svn path=/head/; revision=229911
* Add missing static keywords for global variables to tools in sbin/.Ed Schouten2011-11-041-2/+2
| | | | | | | | | 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. Notes: svn path=/head/; revision=227081
* After creating a filesystem using newfs -j the time stamps are allKirk McKusick2011-10-111-0/+10
| | | | | | | | | | | | | | zero and thus report as having been made in January 1970. Apart from looking a bit silly, it also triggers alarms from scripts that detect weird time stamps. This update sets all 4 (or 3, in the case of UFS1) time stamps to the current time when enabling journaling during newfs or later when enabling it with tunefs. Reported by: Hans Ottevanger <hans@beastielabs.net> MFC after: 1 week Notes: svn path=/head/; revision=226266
* Advertise growfs(8) a little better.Edward Tomasz Napierala2011-06-221-1/+2
| | | | Notes: svn path=/head/; revision=223430
* We now have multiple filesystems (UFS, ZFS, ...), so for tools that onlyGavin Atkinson2011-05-081-3/+3
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=221659
* When creating a directory entry for the journal, always read at leastKonstantin Belousov2011-02-121-10/+20
| | | | | | | | | | | | | | the fragment, and write the full block. Reading less might not work due to device sector size bigger then size of direntries in the last directory fragment. Reported by: bz In collaboration with: pho Reviewed by: jeff Tested by: bz, pho Notes: svn path=/head/; revision=218603
* Add support for FS_TRIM to user-mode UFS utilities.Konstantin Belousov2010-12-292-5/+50
| | | | | | | | | Reviewed by: mckusick, pjd, pho Tested by: pho MFC after: 1 month Notes: svn path=/head/; revision=216798
* - Round up the journal size to the block size so we don't confuse fsck.Jeff Roberson2010-05-181-4/+8
| | | | | | | | | | | | | | Reported by: Mikolaj Golub <to.my.trociny@gmail.com> - Only require 256k of blocks per-cg when trying to allocate contiguous journal blocks. The storage may not actually be contiguous but is at least within one cg. - When disabling SUJ leave SU enabled and report this to the user. It is expected that users will upgrade SU filesystems to SUJ and want a similar downgrade path. Notes: svn path=/head/; revision=208241
* Improve usage of tunefs:Edwin Groothuis2010-05-011-3/+4
| | | | | | | | | | Document -j switch in usage() to reflect recent SUJ work. Submitted by: Alastair Hogge MFC after: 1 week Notes: svn path=/head/; revision=207462
* - Use the path to the filesystem mountpoint to look up the statfsJeff Roberson2010-04-301-4/+4
| | | | | | | | | | | structure so that we correctly reload. Note that tunefs doesn't properly detect the need to reload if the disk device is specified for a read-only mounted filesystem. - Lessen the contiguity requirement for the journal so that it is more likely to succeed. Notes: svn path=/head/; revision=207421
* - Temporarily lower WARNS until I fix alignment warnings on sparc64.Jeff Roberson2010-04-241-0/+2
| | | | | | | Reported by: Florian Smeets Notes: svn path=/head/; revision=207145
* - Merge soft-updates journaling from projects/suj/head into head. ThisJeff Roberson2010-04-242-9/+567
| | | | | | | | | | | brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm Notes: svn path=/head/; revision=207141
* Quiet spurious warnings.Kirk McKusick2010-02-111-2/+2
| | | | Notes: svn path=/head/; revision=203769