aboutsummaryrefslogtreecommitdiff
path: root/sbin/tunefs
Commit message (Collapse)AuthorAgeFilesLines
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-9/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* sbin: Remove ancient SCCS tags.Warner Losh2023-11-273-6/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* SEE ALSO section improvements for tuning(7), tunefs(8) and fsck_ffs(8)Gordon Bergling2023-11-171-1/+3
| | | | | | | | | | | cross-reference ffs(7) in fsck_ffs(8) cross-reference ffs(7) and tuning(7) in tunefs(8) cross-reference ffs(7) in tuning(7) PR: 263433 Reviewed by: bcr MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D42631
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Update newfs(8) and tunefs(8) manual pages.Kirk McKusick2023-08-061-3/+0
| | | | | | | | Delete note that UFS/FFS filesystems running with journaled soft updates cannot run background fsck as 344b5bf made it possible to do so. MFC-with: 344b5bf Sponsored-by: The FreeBSD Foundation
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* Document the mntopts(3) functions.Kirk McKusick2023-01-151-28/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mntopts(3) functions support operations associated with a mount point. The main purpose of this commit is to document the mntopts(3) functions that now appear in 18 utilities in the base system. See mntopts(3) for the documentation details. The getmntopts() function appeared in 4.4BSD. The build_iovec(), build_iovec_argf(), free_iovec(), checkpath(), and rmslashes() functions were added with nmount(8) in FreeBSD 5.0. The getmntpoint() and chkdoreload() functions are being added in this commit. These functions should be in a library but for historic reasons are in a file in the sources for the mount(8) program. Thus, to access them the following lines need to be added to the Makefile of the program wanting to use them: SRCS+= getmntopts.c MOUNT= ${SRCTOP}/sbin/mount CFLAGS+= -I${MOUNT} .PATH: ${MOUNT} Once these changes have been MFC'ed to 13 they may be made into a library. Reviewed by: kib, gbe MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37907
* Enable taking snapshots on UFS/FFS filesystems using journaled soft updates.Kirk McKusick2022-11-131-3/+1
| | | | | | | | | | | All the needed infrastructure updates have been made to allow snapshots to be taken on UFS/FFS filesystems that are using journaled soft updates. The most immediate benefit is the ability to use a snapshot to take a consistent filesystem dump on a live filesystem using the -L option to dump(8). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36491
* pkgbase: Put ufs related tools and lib in their own packageEmmanuel Vadot2022-10-261-1/+1
| | | | | | | | It's not really useful in a jail or in a mdroot or even if a users wants to do a full zfs machine. Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D36227
* Increase the maximum size of the journaled soft-updates journal.Kirk McKusick2022-10-211-1/+0
| | | | | | | | | | | | | | The size of the journaled soft-updates journal should be big enough to hold two minutes of filesystem metadata-update activity. The maximum size of the soft updates journal was set in the 1990s. At the time it was assummed that disk arrays would top out at 16 drives and disk writes per drive would top out at 500 per second. Today's I/O subsystems are considerably bigger and faster than those limits. Thus this delta removes the hard upper limit and lets tunefs(8) and newfs(8) set the upper bound based on the size of the filesystem and its cylinder groups. Sponsored by: The FreeBSD Foundation
* Update date in tunefs(8) manual page.Kirk McKusick2022-08-161-1/+1
| | | | | | Requested by: Li-Wen Hsu PR: 261944 Sponsored by: The FreeBSD Foundation
* Add a description of soft updates journaling to tunefs(8).Kirk McKusick2022-08-151-0/+40
| | | | | | | | | | Add a descrition to the tunefs(8) -j (journal enablement) flag that explains what soft updates journaling does, the tradeoffs to using it, and the limitations that it imposes. Requested by: Graham Perrin PR: 261944 Sponsored by: The FreeBSD Foundation
* Remove #define _KERNEL hacks from libprocstatKonstantin Belousov2021-02-211-0/+2
| | | | | | | | | | | | | | | | | | Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in userspace, assuming that the consumer has an idea what it is for. Unhide more material from sys/mount.h and sys/ufs/ufs/inode.h, sys/ufs/ufs/ufsmount.h for consumption of userspace tools, with the same caveat. Remove unacceptable hack from usr.sbin/makefs which relied on sys/buf.h being unusable in userspace, where it override struct buf with its own definition. Instead, provide struct m_buf and struct m_vnode and adapt code to use local variants. Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D28679
* 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