summaryrefslogtreecommitdiff
path: root/sbin/dumpfs
Commit message (Collapse)AuthorAgeFilesLines
* When running the -m option to generate a newfs(8) command suitable forKirk McKusick2013-05-162-3/+27
| | | | | | | | | | | | | | | | | | | | recreating the filesystem, check for and output the -i, -k, and -l options if appropriate. Note the remaining deficiencies of the -m option in the dumpfs(8) manual page. Specifically that newfs(8) options -E, -R, -S, and -T options are not handled and that -p is not useful so is omitted. Also document that newfs(8) options -n and -r are neither checked for nor output but should be. The -r flag is needed if the filesystem uses gjournal(8). PR: bin/163992 Reported by: Dieter <freebsd@sopwith.solgatos.com> Submitted by: Andy Kosela <akosela@andykosela.com> MFC after: 1 week Notes: svn path=/head/; revision=250710
* Clean up trailing whitespace.Kirk McKusick2013-05-161-3/+3
| | | | | | | | Submitted by: Andy Kosela MFC after: 1 week Notes: svn path=/head/; revision=250708
* The purpose of this change to the FFS layout policy is to reduce theKirk McKusick2013-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix problem with geom_label(4) not recognizing UFS labels on filesystemsEdward Tomasz Napierala2012-10-301-2/+3
| | | | | | | | | | | | | | | | | | | | | extended using growfs(8). The problem here is that geom_label checks if the filesystem size recorded in UFS superblock is equal to the provider (i.e. device) size. This check cannot be removed due to backward compatibility. On the other hand, in most cases growfs(8) cannot set fs_size in the superblock to match the provider size, because, differently from newfs(8), it cannot recompute cylinder group sizes. To fix this problem, add another superblock field, fs_providersize, used only for this purpose. The geom_label(4) will attach if either fs_size (filesystem created with newfs(8)) or fs_providersize (filesystem expanded using growfs(8)) matches the device size. PR: kern/165962 Reviewed by: mckusick Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=242379
* Add support for gjournal to dumpfsEitan Adler2012-10-221-0/+2
| | | | | | | | | | PR: 165821 Submitted by: Andreas Longwitz <longwitz@incore.de> Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=241842
* Add missing -l flag to usage().Christian Brueffer2011-12-261-1/+1
| | | | | | | | | PR: 163629 Submitted by: olgeni MFC after: 1 week Notes: svn path=/head/; revision=228898
* Staticify dumpfs.Ed Schouten2011-12-131-20/+20
| | | | | | | | | This tool only consists of a single C file, so we can simply mark everything except main() static. This seems to shave off about 8% of the binary size. Notes: svn path=/head/; revision=228458
* Add missing static keywords for global variables to tools in sbin/.Ed Schouten2011-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. Notes: svn path=/head/; revision=227081
* Use _PATH_DEV and make the format more consistent with GEOM_LABEL.Xin LI2011-07-141-1/+2
| | | | | | | Submitted by: ivoras Notes: svn path=/head/; revision=224025
* Add a -l option to show file system's corresponding /dev/ufsid path.Xin LI2011-07-142-5/+26
| | | | | | | | | | This is useful for scripts that converts existing system's fstab to use their /dev/ufsid devices. MFC after: 2 weeks Notes: svn path=/head/; revision=224004
* 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
* Add support for displaying newfs flags for SU+J and TRIM.Juli Mallett2011-03-231-1/+5
| | | | Notes: svn path=/head/; revision=219899
* Add support for FS_TRIM to user-mode UFS utilities.Konstantin Belousov2010-12-291-1/+3
| | | | | | | | | Reviewed by: mckusick, pjd, pho Tested by: pho MFC after: 1 month Notes: svn path=/head/; revision=216798
* - Merge soft-updates journaling from projects/suj/head into head. ThisJeff Roberson2010-04-241-2/+2
| | | | | | | | | | | 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
* Print leading zeros in the UFS2 FSID.Gavin Atkinson2010-01-061-1/+1
| | | | | | | | | | PR: bin/142155 Submitted by: Efstratios Karatzas gpf.kira gmail.com Approved by: ed (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=201647
* Implement NFSv4 ACL support for UFS.Edward Tomasz Napierala2009-12-211-1/+4
| | | | | | | Reviewed by: rwatson Notes: svn path=/head/; revision=200796
* Switch the default WARNS level for sbin/ to 6.Ruslan Ermilov2009-10-191-0/+1
| | | | | | | Submitted by: Ulrich Spörlein Notes: svn path=/head/; revision=198236
* Properly re-create "-s size" argument to newfs(8).Ruslan Ermilov2009-10-191-1/+1
| | | | Notes: svn path=/head/; revision=198231
* Print disk offets as %jd rather than %lld; I fixed one before committingRobert Watson2009-01-281-1/+1
| | | | | | | | | | but missed the other, which breaks 64-bit builds. Reported by: bf <bf2006a at yahoo dot com> MFC after: 1 week Notes: svn path=/head/; revision=187820
* Bump doc date for recent change.Tom Rhodes2009-01-281-1/+1
| | | | Notes: svn path=/head/; revision=187818
* Add a new flag to dumpfs(8), -f, which causes dumpfs to list all freeRobert Watson2009-01-282-7/+82
| | | | | | | | | | | | | | | | | | | | | | fragments in the file system by fragment (block) number. This new mode does the necessary arithmetic to generate absolute fragment numbers rather than than the cg-relative numbers printed in the default mode. If -f is passed once, contiguous fragment ranges are collapsed into an X-Y format as free block lists are currently printed in regular dumpfs output, but if specified twice, all block numbers are printed individually, allowing both compact and more script-friendly representation. This proves quite handy when attempting to recover deleted data, as it allows exclusion of non-deleted data from blocks searched. MFC after: 1 week Discussed with: jeff, Richard Clayton <richard dot clayton at cl.cam.ac.uk> Sponsored by: Google, Inc. Notes: svn path=/head/; revision=187814
* Replace incomprehensive description of -m by much clearer text from OpenBSD,Pav Lucistnik2007-05-121-2/+3
| | | | | | | | | | | | with the exception of one word. PR: docs/112465 Submitted by: naddy Obtained from: OpenBSD MFC after: 1 week Notes: svn path=/head/; revision=169511
* Teach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag.Pawel Jakub Dawidek2006-10-311-5/+9
| | | | | | | Sponsored by: home.pl Notes: svn path=/head/; revision=163844
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-02-101-1/+1
| | | | Notes: svn path=/head/; revision=141611
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-1/+2
| | | | Notes: svn path=/head/; revision=131488
* Remove advertising clause from University of California Regent's license,Mark Murray2004-04-092-8/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core, imp Notes: svn path=/head/; revision=128073
* Reinstate 1.40 -- swap avgfilesize and avgfpdir column order.Don Lewis2003-12-071-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=123219
* I forgot about the code freeze, so back this out.Don Lewis2003-12-011-2/+2
| | | | Notes: svn path=/head/; revision=123079
* Swap avgfilesize and avgfpdir order to give better column alignment.Don Lewis2003-12-011-2/+2
| | | | Notes: svn path=/head/; revision=123078
* Print the dirpref avgfilesize and avgfpdir parameters.Don Lewis2003-11-171-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=122825
* Make this WARNS=2 clean byJohan Karlsson2003-11-142-20/+22
| | | | | | | | | - using (intmax_t) and %j instead of %q Tested by: make universe Notes: svn path=/head/; revision=122670
* Marshal newfs -L (filesystem volume names), the names are not marshalledJuli Mallett2003-06-091-0/+2
| | | | | | | with any quoting, but that should be OK for re-input, regardless. Notes: svn path=/head/; revision=116083
* mdoc(7) police: markup laundry.Ruslan Ermilov2003-02-231-2/+2
| | | | Notes: svn path=/head/; revision=111285
* Correct lines incorrectly added to the copyright message. Add missing period.Kirk McKusick2003-02-141-4/+1
| | | | | | | | Submitted by: Bruce Evans <bde@zeta.org.au> Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=110884
* Bring in support for volume labels to the filesystem utilities.Gordon Tetlow2003-02-011-0/+3
| | | | | | | Reviewed by: mckusick Notes: svn path=/head/; revision=110174
* Spell libufs correctly in DPADD.Ruslan Ermilov2003-01-261-1/+1
| | | | | | | Reviewed by: juli Notes: svn path=/head/; revision=109883
* Parse both old flags location and new one. Print out new flags includingNate Lawson2003-01-241-14/+24
| | | | | | | acls, multilabel, and location updated. Notes: svn path=/head/; revision=109767
* Add libufs to dependencies.Juli Mallett2003-01-201-1/+2
| | | | Notes: svn path=/head/; revision=109599
* Kill initialisation and shadow warnings. Half-hearted cleanup (e.g. only theJuli Mallett2003-01-191-20/+21
| | | | | | | | | | more important ones) of format warnings. XXX Lots of this assumes int32 can be printed with %d. Yuck. Reviewed by: bde Notes: svn path=/head/; revision=109532
* Add support to marshal a filesystem to a newfs(8) command that could be usedJuli Mallett2003-01-192-18/+94
| | | | | | | | | to create it. A small number of options are not marshalled as they are things it would be dumb to spit out, as they are used by internal computations, and newfs may change them, or they may not be directly apparent. Notes: svn path=/head/; revision=109525
* Let libufs handle all the work with regard to going through a list of cgs, now.Juli Mallett2003-01-191-8/+7
| | | | Notes: svn path=/head/; revision=109519
* Use libufs to read one cylinder group from the disk at a time.Juli Mallett2003-01-191-7/+2
| | | | Notes: svn path=/head/; revision=109510
* Simplify the main function now that libufs will hunt for the disk for us.Juli Mallett2003-01-191-13/+7
| | | | Notes: svn path=/head/; revision=109507
* Simplify conditional.Juli Mallett2003-01-181-6/+4
| | | | Notes: svn path=/head/; revision=109461
* Create a new 32-bit fs_flags word in the superblock. Add code to moveKirk McKusick2002-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | the old 8-bit fs_old_flags to the new location the first time that the filesystem is mounted by a new kernel. One of the unused flags in fs_old_flags is used to indicate that the flags have been moved. Leave the fs_old_flags word intact so that it will work properly if used on an old kernel. Change the fs_sblockloc superblock location field to be in units of bytes instead of in units of filesystem fragments. The old units did not work properly when the fragment size exceeeded the superblock size (8192). Update old fs_sblockloc values at the same time that the flags are moved. Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk> Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=107294
* Deal with the possibility that time_t != int32_t. Otherwise ia64 thoughtPeter Wemm2002-11-171-2/+4
| | | | | | | the fs_old_size was the half part of fs_old_time etc. Notes: svn path=/head/; revision=107031
* Use more non-b0rked error reporting. Print the disk we are trying to openJuli Mallett2002-11-051-3/+6
| | | | | | | | | and (we have the disk error from libufs? the disk error: the errno). Requested by: bde, <many> Notes: svn path=/head/; revision=106456
* Forgot to include <errno.h> when using 'errno' here.Juli Mallett2002-10-221-0/+1
| | | | Notes: svn path=/head/; revision=105741
* When errno is not set, do not use warn(3).Juli Mallett2002-10-221-1/+2
| | | | Notes: svn path=/head/; revision=105739
* Use the libufs_printerror() function, which hopefully will deconfuse usersJuli Mallett2002-10-221-1/+2
| | | | | | | | | getting error cases in a libufsificated dumpfs(8). Poked by: kkenn Notes: svn path=/head/; revision=105738