History log of /src/sbin/fsck_ffs/pass4.c |
Revision | | Date | Author | Comments |
1.31 |
| 04-Jul-2023 |
riastradh | fsck_ffs(8): Fix whitespace issues.
- Nix trailing whitespace. - Omit excessive blank lines. - Insert missing blank lines between $NetBSD$ and copyright.
No functional change intended.
|
1.30 |
| 14-Jan-2023 |
christos | catch up with sign changes in the fs.h
|
1.29 |
| 07-Jan-2023 |
chs | ufs: fixed signed/unsigned bugs affecting large file systems
Apply these commits from FreeBSD:
commit e870d1e6f97cc73308c11c40684b775bcfa906a2 Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Wed Feb 10 20:10:35 2010 +0000
This fix corrects a problem in the file system that treats large inode numbers as negative rather than unsigned. For a default (16K block) file system, this bug began to show up at a file system size above about 16Tb.
To fully handle this problem, newfs must be updated to ensure that it will never create a filesystem with more than 2^32 inodes. That patch will be forthcoming soon.
Reported by: Scott Burns, John Kilburg, Bruce Evans Followup by: Jeff Roberson PR: 133980 MFC after: 2 weeks
commit 81479e688b0f643ffacd3f335b4b4bba460b769d Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Thu Feb 11 18:14:53 2010 +0000
One last pass to get all the unsigned comparisons correct.
In additional to the changes from FreeBSD, this commit includes quite a few related changes to appease -Wsign-compare.
|
1.28 |
| 23-Jun-2013 |
dholland | branches: 1.28.38; Stick ffs_ in front of the following macros: fragstoblks() blkstofrags() fragnum() blknum()
to finish the job of distinguishing them from the lfs versions, which Christos renamed the other day.
I believe this is the last of the overtly ambiguous exported symbols from ffs... or at least, the last of the ones that conflicted with lfs. ffs still pollutes the C namespace very broadly (as does ufs) and this needs quite a bit more cleanup.
XXX: boo on macros with lowercase names. But I'm not tackling that just yet.
|
1.27 |
| 22-Jan-2013 |
dholland | Stuff UFS_ in front of a few of ufs's symbols to reduce namespace pollution. Specifically: ROOTINO -> UFS_ROOTINO WINO -> UFS_WINO NXADDR -> UFS_NXADDR NDADDR -> UFS_NDADDR NIADDR -> UFS_NIADDR MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have the same values in ext2fs and ffs.
No functional change intended.
|
1.26 |
| 06-Mar-2011 |
bouyer | branches: 1.26.4; 1.26.10; merge the bouyer-quota2 branch. This adds a new on-disk format to store disk quota usage and limits, integrated with ffs metadata. Usage is checked by fsck_ffs (no more quotacheck) and is covered by the WAPBL journal. Enabled with kernel option QUOTA2 (added where QUOTA was enabled in kernel config files), turned on with tunefs(8) on a per-filesystem basis. mount_mfs(8) can also turn quotas on.
See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html for details.
|
1.25 |
| 31-Jul-2008 |
simonb | branches: 1.25.14; Merge the simonb-wapbl branch. From the original branch commit:
Add Wasabi System's WAPBL (Write Ahead Physical Block Logging) journaling code. Originally written by Darrin B. Jewell while at Wasabi and updated to -current by Antti Kantee, Andy Doran, Greg Oster and Simon Burge.
OK'd by core@, releng@.
|
1.24 |
| 23-Feb-2008 |
christos | branches: 1.24.4; 1.24.6; Make sure that the exit values are always sane, and use symbolic instead of magic constants. Reviewed by go@
|
1.23 |
| 14-Nov-2006 |
apb | branches: 1.23.8; 1.23.16; 1.23.18; Improve the progress bar displayed by fsck_ffs -p -P.
The progress bar will now travel from 0 to 20% during pass 1, from 20% to 95% during pass 2, and from 95% to 100% during passes 3, 4, and 5. Previously, the progress bar was not displayed at all during pass 1, slowly traveled from 0 to about 50% during pass 2, and then very rapidly traveled from 50% to 100% during passes 3, 4, and 5.
Note that fsck_ffs is the only user of fsck/progress.{c,h}.
|
1.22 |
| 19-Aug-2005 |
christos | 64 bit inode changes
|
1.21 |
| 19-Jan-2005 |
xtraeme | branches: 1.21.2; Kill __P(), ANSIfy and WARNS=2
|
1.20 |
| 13-Jan-2005 |
christos | Use -DPROGRESS to enable the progress bar, don't depend on SMALL.
|
1.19 |
| 13-Jan-2005 |
christos | Add a progress meter to fsck_ffs based on the work by thorpej presented to the mailing lists last January. This is optional.
|
1.18 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
|
1.17 |
| 02-Apr-2003 |
fvdl | Add support for UFS2. UFS2 is an enhanced FFS, adding support for 64 bit block pointers, extended attribute storage, and a few other things.
This commit does not yet include the code to manipulate the extended storage (for e.g. ACLs), this will be done later.
Originally written by Kirk McKusick and Network Associates Laboratories for FreeBSD.
|
1.16 |
| 24-Jan-2003 |
fvdl | Bump daddr_t to 64 bits. Replace it with int32_t in all places where it was used on-disk, so that on-disk formats remain the same. Remove ufs_daddr_t and ufs_lbn_t for the time being.
|
1.15 |
| 06-May-2002 |
lukem | If SIGINFO is received, display summary information to stderr. Based on changes in FreeBSD, via Chuck Cranor <chuck@research.att.com>
|
1.14 |
| 20-Sep-1997 |
lukem | - don't indiscriminately include <stdlib.h> and <unistd.h> in "fsck.h" - explicitly pull in <stdio.h>, <stdlib.h> and <unistd.h> in *.c as necessary
|
1.13 |
| 16-Sep-1997 |
lukem | resolve conflicts from lite-2 merge.
|
1.12 |
| 14-Sep-1997 |
lukem | * cleanup for WARNS=1 * deprecate register * cleanup manpage * remove unused docheck() func * prefix hex numbers with '0x' * getopt returns -1 not EOF
|
1.11 |
| 27-Sep-1996 |
christos | - util.h -> fsutil.h
|
1.10 |
| 23-Sep-1996 |
christos | - fixed all printf formats [there were a lot of %l? <-> %? mistakes] - added missing prototypes, and made local functions static - removed parallel preening code; this is part of fsck(8) - use printing utilities from fsck(8) - Makefile does not make links to fsck and fsck.8 - removed -l maxparallel option. It has no meaning anymore.
|
1.9 |
| 18-Mar-1995 |
cgd | convert to new RCS Id conventions; reduce my headache
|
1.8 |
| 05-Dec-1994 |
cgd | more cleanups from Jim Jegers, passed over by me.
|
1.7 |
| 23-Sep-1994 |
mycroft | Eliminate uses of some obsolete functions.
|
1.6 |
| 08-Jun-1994 |
mycroft | Update from 4.4-Lite, with local changes.
|
1.5 |
| 25-Apr-1994 |
cgd | need <sys/time.h>
|
1.4 |
| 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.3 |
| 23-Mar-1993 |
cgd | changed "Id" to "Header" for rcsids
|
1.2 |
| 22-Mar-1993 |
cgd | added rcs ids to all files
|
1.1 |
| 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 |
| 16-Sep-1997 |
lukem | imported from lite-2
|
1.1.1.2 |
| 13-Jun-1994 |
mycroft | Import 4.4-Lite version.
|
1.1.1.1 |
| 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.21.2.1 |
| 20-Nov-2006 |
tron | Pull up following revision(s) (requested by ghen in ticket #1590): sbin/fsck_ffs/pass4.c: revision 1.23 sbin/fsck_ffs/pass5.c: revision 1.47 sbin/fsck_ffs/pass2.c: revision 1.44 sbin/fsck_ffs/pass1.c: revision 1.43 sbin/fsck_ffs/pass3.c: revision 1.19 sbin/fsck/progress.c: revision 1.3 sbin/fsck_ffs/main.c: revision 1.61 sbin/fsck/progress.h: revision 1.2 Improve the progress bar displayed by fsck_ffs -p -P. The progress bar will now travel from 0 to 20% during pass 1, from 20% to 95% during pass 2, and from 95% to 100% during passes 3, 4, and 5. Previously, the progress bar was not displayed at all during pass 1, slowly traveled from 0 to about 50% during pass 2, and then very rapidly traveled from 50% to 100% during passes 3, 4, and 5. Note that fsck_ffs is the only user of fsck/progress.{c,h}.
|
1.23.18.2 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.23.18.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.23.16.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.23.8.1 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.24.6.1 |
| 28-Jul-2008 |
simonb | Add support for creating a WAPBL log in the filesystem. Will create an in-filesystem log on first "mount -o log" if one doesn't exist, and will then continue to use same log in the future. See (soon to be added) wapbl(4) for more info.
Adds a new B_CONTIG low-level allocation flag that uses hints in "struct ffs_inode_ext" to lay out an ffs file's data contiguously.
Thanks to Greg Oster for helping with the design of this and to Antti Kantee for code review and suggestions.
|
1.24.4.1 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.25.14.3 |
| 12-Feb-2011 |
bouyer | Skip snapshot inodes for both block and inode quotas.
|
1.25.14.2 |
| 12-Feb-2011 |
bouyer | Snapshot inode doesn't count for block quotas.
|
1.25.14.1 |
| 20-Jan-2011 |
bouyer | Snapshot of work in progress on a modernised disk quota system: - new quotactl syscall (versionned for backward compat), which takes as parameter a path to a mount point, and a prop_dictionary (in plistref format) describing commands and arguments. For each command, status and data are returned as a prop_dictionary. quota commands features will be added to take advantage of this, exporting quota data or getting quota commands as plists.
- new on disk-format storage (all 64bit wide), integrated to metadata for ffs (and playing nicely with wapbl). Quotas are enabled on a ffs filesystem via superblock flags. tunefs(8) can enable or disable quotas. On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid block and inode usages, and will check and update quotas in Pass 6. quota usage and limits are stored in unliked files (one for users, one for groups)l fsck_ffs(8) will create the files if needed, or free them if needed. This means that after enabling or disabling quotas on a filesystem; a fsck_ffs(8) run is required. quotacheck(8) is not needed any more, on a unclean shutdown fsck or journal replay will take care of fixing quotas. newfs(8) can create a ready-to-mount quota-enabled filesystem (superblock flags are set and quota inodes are created). Other new features or semantic changes: - default quota datas, applied to users or groups which don't already have a quota entry - per-user/group grace time (instead of a filesystem global one) - 0 really means "nothing allowed at all", not "no limit". If you want "no limit", set the limit to UQUAD_MAX (tools will understand "unlimited" and "-")
A quota file is structured as follow: it starts with a header, containing a few per-filesystem values, and the default quota limits. Quota entries are linked together as a simple list, each entry has a pointer (as an offset withing the file) to the next. The header has a pointer to a list of free quota entries, and a hash table of in-use entries. The size of the hash table depends on the filesystem block size (header+hash table should fit in the first block). The file is not sparse and is a multiple of filesystem block size (when the free quota entry list is empty a new filesystem block is allocated). quota entries to not cross filesystem block boundaries.
In memory, the kernel keeps a cache of recently used quota entries as a reference to the block number, and offset withing the block. The quota entry itself is keept in the buf cache.
fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with related atf tests :) The kernel can update disk usage and report it via quotactl(2).
Todo: enforce quotas limits (limits are not checked by kernel yet) update repquota, edquota and rpc.rquotad to the new world implement compat_50_quotactl ioctl. update quotactl(2) man page
fsck_ffs required fixes so that allocating new blocks or inodes will properly update the superblock and cg sumaries. This was not an issue up to now because superblock and cg sumaries check happened last, but now allocations or frees can happen in pass 6.
|
1.26.10.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.26.10.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.26.4.2 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.26.4.1 |
| 23-Jan-2013 |
yamt | sync with head
|
1.28.38.2 |
| 13-May-2023 |
martin | Pull up following revision(s) (requested by chs in ticket #162):
sbin/fsck_ffs/inode.c: revision 1.74 sbin/fsck_ffs/utilities.c: revision 1.68 sbin/fsck_ffs/fsck.h: revision 1.57 sbin/fsck_ffs/pass4.c: revision 1.30
catch up with sign changes in the fs.h
|
1.28.38.1 |
| 13-May-2023 |
martin | Pull up following revision(s) (requested by chs in ticket #160):
usr.sbin/makefs/ffs/ffs_alloc.c: revision 1.31 sbin/tunefs/tunefs.c: revision 1.58 sbin/fsck_ffs/setup.c: revision 1.105 sbin/fsck_ffs/pass5.c: revision 1.56 usr.sbin/makefs/ffs.c: revision 1.74 usr.sbin/makefs/ffs/mkfs.c: revision 1.42 usr.sbin/makefs/Makefile: revision 1.40 sys/ufs/ffs/fs.h: revision 1.71 sbin/fsdb/fsdb.c: revision 1.54 sbin/resize_ffs/resize_ffs.c: revision 1.58 sbin/fsck_ffs/pass4.c: revision 1.29 usr.sbin/makefs/ffs/ffs_extern.h: revision 1.9 sbin/newfs/mkfs.c: revision 1.133 sys/ufs/ffs/ffs_alloc.c: revision 1.172 sbin/fsck_ffs/pass1b.c: revision 1.24 usr.sbin/dumpfs/dumpfs.c: revision 1.68 sys/ufs/ffs/ffs_extern.h: revision 1.88 usr.sbin/quotacheck/quotacheck.c: revision 1.51 sys/ufs/ffs/ffs_subr.c: revision 1.54 sbin/fsck_ffs/main.c: revision 1.91 sbin/fsck_ffs/pass1.c: revision 1.63
ufs: fixed signed/unsigned bugs affecting large file systems
Apply these commits from FreeBSD: commit e870d1e6f97cc73308c11c40684b775bcfa906a2 Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Wed Feb 10 20:10:35 2010 +0000 This fix corrects a problem in the file system that treats large inode numbers as negative rather than unsigned. For a default (16K block) file system, this bug began to show up at a file system size above about 16Tb. To fully handle this problem, newfs must be updated to ensure that it will never create a filesystem with more than 2^32 inodes. That patch will be forthcoming soon. Reported by: Scott Burns, John Kilburg, Bruce Evans Followup by: Jeff Roberson PR: 133980 MFC after: 2 weeks
commit 81479e688b0f643ffacd3f335b4b4bba460b769d Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Thu Feb 11 18:14:53 2010 +0000 One last pass to get all the unsigned comparisons correct.
In additional to the changes from FreeBSD, this commit includes quite a few related changes to appease -Wsign-compare.
|