History log of /src/sbin/resize_ffs/resize_ffs.c |
Revision | | Date | Author | Comments |
1.58 |
| 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.57 |
| 17-Nov-2022 |
chs | branches: 1.57.2; Restore backward compatibility of UFS2 with previous NetBSD releases by disabling support in UFS2 for extended attributes (including ACLs). Add a new variant of UFS2 called "UFS2ea" that does support extended attributes. Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended attributes in the process).
|
1.56 |
| 08-Apr-2022 |
andvar | fix various typos, mainly in comments, but also log messages, docs, game text.
|
1.55 |
| 24-May-2020 |
jmcneill | Use getfsspecname and getrawdiskname so we can resize by NAME= label.
|
1.54 |
| 21-Apr-2019 |
maya | wether -> whether
|
1.53 |
| 09-Oct-2017 |
mlelstv | branches: 1.53.4; Fix computation of left-over fragments also for ufs2.
Fixes PR 52600.
|
1.52 |
| 01-Oct-2017 |
christos | PR/52590: David H. Gutteridge: Minor documentation improvements
|
1.51 |
| 01-Oct-2017 |
mlelstv | - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2.
|
1.50 |
| 30-Sep-2017 |
kre | Fix the syntax (pointed out by David H. Gutteridge on source-changes-d). Fix the build...
|
1.49 |
| 30-Sep-2017 |
riastradh | Use int64_t for loop index so we don't iterate forever/until trap.
|
1.48 |
| 28-Sep-2017 |
sborrill | Fix the most obvious integer overflow errors which can lead to superblock corruption. Thanks to riastradh@
For example:
# df /data Filesystem 1K-blocks Used Avail %Cap Mounted on /dev/ccd0d -19974939099004 -19982708701532 -737868756431824584 0% /data
# dumpfs -s /dev/rccd0d file system: /dev/rccd0d format FFSv2 endian little-endian location 65536 (-b 128) magic 19540119 time Thu Sep 28 13:18:10 2017 superblock location 65536 id [ 595fa4a5 3363fe37 ] cylgrp dynamic inodes FFSv2 sblock FFSv2 fslevel 5 nbfree 242773148 ndir 211185 nifree 650798800 nffree 215448 ncg 13933 size 2647654400 blocks -4993734774751 bsize 32768 shift 15 mask 0xffff8000 fsize 4096 shift 12 mask 0xfffff000 frag 8 shift 3 fsbtodb 3 bpg 23754 fpg 190032 ipg 46848 minfree 5% optim time maxcontig 2 maxbpg 4096 symlinklen 120 contigsumsize 2 maxfilesize 0x000800800805ffff nindir 4096 inopb 128 avgfilesize 16384 avgfpdir 64 sblkno 24 cblkno 32 iblkno 40 dblkno 2968 sbsize 4096 cgsize 32768 csaddr 35792 cssize 225280 cgrotor 0 fmod 0 ronly 0 clean 0x01 wapbl version 0x1 location 2 flags 0x0 wapbl loc0 6354693888 loc1 131072 loc2 512 loc3 3 flags none fsmnt /data volname swuid 0
|
1.47 |
| 24-Aug-2016 |
dholland | branches: 1.47.6; Fix handling of ffsv2 inode initialization. Retires PR 51116.
|
1.46 |
| 17-Mar-2016 |
christos | fix pasto
|
1.45 |
| 17-Mar-2016 |
christos | Appease gcc-5 from phone@
|
1.44 |
| 06-Apr-2015 |
jmcneill | if the -p flag is specified, display a progress bar while growing the file-system
|
1.43 |
| 06-Apr-2015 |
mlelstv | factor out geometry calculation and use this also in CheckOnly mode. be a bit more verbose in Verbose mode.
|
1.42 |
| 06-Apr-2015 |
mlelstv | Handle case in grow() where last cylinder group is too small for ufs2. Align with code in shrink().
|
1.41 |
| 29-Mar-2015 |
chopps | - Add -c to check to see if grow/shrink is required - Divide by DEV_BSIZE when returning size of file. - Update manpage
|
1.40 |
| 28-Mar-2015 |
riastradh | Use `!= -1' instead of `== 0' out of paranoia.
|
1.39 |
| 28-Mar-2015 |
riastradh | Make get_dev_size work on regular files too.
|
1.38 |
| 23-Jun-2013 |
dholland | branches: 1.38.6; 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.37 |
| 23-Jun-2013 |
dholland | Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of the following symbols so as to disambiguate fully. (Christos already did the lfs ones.)
lblkno lblktosize lfragtosize numfrags blkroundup fragroundup
|
1.36 |
| 23-Jun-2013 |
dholland | fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB() dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()
(Christos already did the lfs ones a few days back)
|
1.35 |
| 19-Jun-2013 |
dholland | Rename ambiguous macros: MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR INOPB -> FFS_INOPB, LFS_INOPB INOPF -> FFS_INOPF, LFS_INOPF blksize -> ffs_blksize, ext2_blksize, or lfs_blksize sblksize -> ffs_blksize
These are not the only ambiguously defined filesystem macros, of course, there's a pile more. I may not have found all the ambiguous definitions of blksize(), too, as there are a lot of other things called 'blksize' in the system.
|
1.34 |
| 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.33 |
| 20-Apr-2012 |
christos | branches: 1.33.2; fix cast in local macro
|
1.32 |
| 27-Aug-2011 |
christos | branches: 1.32.2; PR/45301: Julian Fagir: make clear that the unit is sectors and fix a typo. While there, use errx, and sizeof(*var) instead of sizeof(type)
|
1.31 |
| 15-Aug-2011 |
dholland | Fix another dodgy switch-jump.
|
1.30 |
| 15-Aug-2011 |
dholland | WARNS = 4
|
1.29 |
| 15-Aug-2011 |
dholland | Add missing __RCSID().
|
1.28 |
| 15-Aug-2011 |
dholland | Whitespace.
|
1.27 |
| 15-Aug-2011 |
dholland | Avoid switch-jumping into the middle of an if. Compiler output is unchanged.
|
1.26 |
| 15-Aug-2011 |
dholland | Minor KNF.
|
1.25 |
| 05-Jan-2011 |
riz | Add support for byteswapped file systems (big-endian on little-endian host, and vice versa), to fix PR#44203.
Add support for growing (but not yet shrinking) UFS2 file systems. Partially addresses PR#44205.
While I'm here, reformat the code for closer adherence to KNF.
Fairly extensive testing was performed, using the shortly-to-be-committed updated ATF tests. Patch posted to tech-userlevel on 21 December 2010, no comments.
|
1.24 |
| 14-Dec-2010 |
wiz | filesystem -> file system.
|
1.23 |
| 14-Dec-2010 |
riz | Be explicit about byteswapped and ffsv2 file systems being currently unsupported, while catching up to some changes in my local tree which will hopefully support them at some time in the future.
Also, change "device" variable to "special", to reflect the fact that resize_ffs will work on a plain file.
|
1.22 |
| 14-Dec-2010 |
riz | Don't special-case v1 superblocks - especially with an incorrect calculation.
|
1.21 |
| 12-Dec-2010 |
riz | Remove bogus check which is not actually testing anything useful, and depending on file system data, can actually be a false error.
Fixes what I was actually testing for in bin/44209, though the actual problem was not what I originally described.
|
1.20 |
| 12-Dec-2010 |
mhitch | Add support for old ffsv1 superblocks. After reading an old superblock, copy appropriate data to where they are expected in the updated superblock. When writing the updated superblock, move the updated values back to the old ffsv1 superblock locations. Also check for old superblock format when updating the last cylinder group and adjust cg_old_ncyl appropriately. Derived from how mksf sets them. Should address PR bin/44209.
|
1.19 |
| 08-Dec-2010 |
riz | If we're operating on a plain file instead of a device, ftruncate() it to ensure it's been properly extended. Clears up some problems at certain blocksizes which showed up during creation of atf tests, which is done using file-backed file systems.
|
1.18 |
| 07-Dec-2010 |
riz | As currently written, writeat() expects disk blocks, not fs blocks, so when testing that the last sector of the new size is writeable, make sure we're ACTUALLY writing in the new space, instead of possibly overwriting something in the existing fs.
Discovered while writing tests - tests which uncovered file corruption at certain block sizes.
XXX should rewrite writeat() to expect fs blocks instead of disk blocks.
OK mlelstv@
|
1.17 |
| 02-Dec-2010 |
riz | Use howmany() instead of "/" to calculate the number of cylinders for the changed file system, so as to not drop a partial cylinder at the end. Fixes PR bin/44177.
|
1.16 |
| 01-Dec-2010 |
riz | Do not look for a v1 file system at SBLOCK_UFS2, as this gets the wrong superblock (first alternate) for a file system with 64k blocks. Spotted by mhitch@.
|
1.15 |
| 01-Dec-2010 |
riz | Clean up this file:
- sync usage comment with current reality - sort includes - wrap lines - use EXIT_FAILURE consistently - make error messages consistent: Cannot->Can't - Remove "Old FFSv1 macros" in favor of system macros in ufs/ffs/fs.h . Leave dblksize() because it uses the on-disk dinode structure.
More cleanup is needed. No functional changes intended.
|
1.14 |
| 29-Nov-2010 |
riz | Restore a couple of checks for updating the cg_old_ncyl value which were commented out with XXX and a notation to "fix once fsck is fixed." fsck seems to have been fixed for this particular issue sometime in the 7 years since the code was brought into the tree.
Update cg_old_niblk instead of cg_ni_blk, since this tool currently supports ffsv1 only.
With these two changes, I can grow a file system and have the result be clean according to fsck_ffs. Shrinking still results in an unclean file system.
OK mhitch@
While I'm here, fix a typo in an error message.
|
1.13 |
| 30-Oct-2010 |
haad | Add resize_ffs tool to build, change default behaviour to grow filesystem to device size. Add parameter -s to specify size if user want to shrink filesystem.
Apply some KNF, remove dead unused code.
Oked by christos@.
|
1.12 |
| 15-Dec-2007 |
perry | branches: 1.12.10; convert __attribute__s to applicable cdefs.h macros
|
1.11 |
| 15-Dec-2007 |
perry | include sys/cdefs.h so that __attribute__ can be fixed later
|
1.10 |
| 08-Jul-2007 |
bouyer | branches: 1.10.4; 1.10.6; writeat() also expect offsets in DEV_BSIZE unit. This and the previous commit should fix PR bin/35560. Thanks to Michael L. Hitch for pointing me at the PR.
|
1.9 |
| 05-Jul-2007 |
bouyer | readat() expects the offset in DEV_BSIZE units. This made resize_ffs find the filesystem on a vnd partition for me. It did grow the filesystem, and after a fsck -f on the partition to fix a few superblock inconsistencies, all looks good.
|
1.8 |
| 03-Jun-2005 |
snj | Fix a typo in a comment.
|
1.7 |
| 21-Mar-2004 |
dsl | Dunno why this code is playing 'hunt the superblock', but stop it finding an ffsv1 sb at 64k. Also stop it playing with fs that have 'FS_FLAGS_UPDATED' set. It certainly doesn't act on that falg, and my guess is that it is playing the pre-ffsv2 fs. Fixes part of PR kern/24809
|
1.6 |
| 05-Jan-2004 |
jmmv | Homogenize usage messages: make the 'usage' word all lowercase, as this seems to be the most common practice in our tree.
|
1.5 |
| 26-Jul-2003 |
salo | netbsd.org->NetBSD.org
|
1.4 |
| 03-Apr-2003 |
christos | make this compile again.
|
1.3 |
| 10-Mar-2003 |
wiz | Correct program name in comments.
|
1.2 |
| 21-Feb-2003 |
martin | This program deals with on-disk structures. s/daddr_t/int32_t/g for now (UFS2 will need other changes as well).
|
1.1 |
| 21-Feb-2003 |
jtk | Preliminary version of resize_ffs, based on der Mouse's fsresize tool. I didn't have time to clean it up completely before my legal status w.r.t. open source projects goes into limbo for a while. Other developers are encouraged to play with the tool and get it into release-worthy shape.
TODO list (see TODO file)
* verify it builds on -current, put it into release lists/etc. and src/sbin/Makefile (built & tested on 1.6.1) * make it ask questions before doing any work (confirm) * create regression test suite (see discussions on tech-kern and developers) and fix any bugs * verify conversion to ANSI C didn't break anything * port to UFS2
|
1.10.6.1 |
| 27-Dec-2007 |
mjf | Sync with HEAD.
|
1.10.4.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.12.10.1 |
| 18-Nov-2011 |
sborrill | Pull up the following revisions(s) (requested by riz in ticket #1690): distrib/sets/lists/base/mi patch distrib/sets/lists/man/mi patch sbin/Makefile patch sbin/resize_ffs/Makefile patch sbin/resize_ffs/TODO patch sbin/resize_ffs/resize_ffs.8 patch sbin/resize_ffs/resize_ffs.c patch
Fix resize_ffs(8) so that growing and shrinking all FFSv1 (including byteswapped) and growing FFSv2 file systems is supported.
|
1.32.2.3 |
| 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.32.2.2 |
| 23-Jan-2013 |
yamt | sync with head
|
1.32.2.1 |
| 23-May-2012 |
yamt | sync with head.
|
1.33.2.3 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.33.2.2 |
| 23-Jun-2013 |
tls | resync from head
|
1.33.2.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.38.6.3 |
| 23-Oct-2017 |
snj | Pull up following revision(s) (requested by sborrill in ticket #1516): sbin/resize_ffs/resize_ffs.8: revision 1.18 sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53 Fix the most obvious integer overflow errors which can lead to superblock corruption. Thanks to riastradh@ -- Use int64_t for loop index so we don't iterate forever/until trap. -- Fix the syntax (pointed out by David H. Gutteridge on source-changes-d). Fix the build... -- - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2. -- PR/52590: David H. Gutteridge: Minor documentation improvements -- Fix computation of left-over fragments also for ufs2. Fixes PR 52600.
|
1.38.6.2 |
| 10-Sep-2016 |
snj | branches: 1.38.6.2.2; Pull up following revision(s) (requested by dholland in ticket #1242): sbin/resize_ffs/resize_ffs.c: revision 1.47 Fix handling of ffsv2 inode initialization. Retires PR 51116.
|
1.38.6.1 |
| 06-Aug-2015 |
snj | branches: 1.38.6.1.2; 1.38.6.1.4; Pull up following revision(s) (requested by skrll in ticket #909): distrib/sets/lists/etc/mi: revision 1.237 distrib/sets/lists/tests/mi: revision 1.613 distrib/utils/embedded/conf/armv7.conf: revisions 1.1, 1.2 distrib/utils/embedded/conf/beagleboard.conf: delete distrib/utils/embedded/conf/evbarm.conf: revisions 1.21, 1.22 distrib/utils/embedded/conf/rpi.conf: revisions 1.28, 1.29 distrib/utils/embedded/conf/rpi_inst.conf: revisions 1.7, 1.8 distrib/utils/embedded/conf/usermode.conf: revision 1.5 distrib/utils/embedded/conf/x86.conf: revision 1.5 distrib/utils/embedded/files/resize_disklabel: revision 1.1 distrib/utils/embedded/mkimage: revisions 1.49, 1.55-1.59 etc/defaults/rc.conf: revision 1.133 etc/etc.evbarm/Makefile.inc: revisions 1.72, 1.76 etc/rc.d/Makefile: revision 1.93 via patch etc/rc.d/resize_root: revisions 1.1-1.3 etc/rc.d/root: revision 1.5 sbin/resize_ffs/Makefile: revision 1.5 sbin/resize_ffs/resize_ffs.8: revisions 1.14-1.16 sbin/resize_ffs/resize_ffs.c: revisions 1.39-1.44 share/man/man5/rc.conf.5: revision 1.158, 1.159 tests/sbin/resize_ffs/Makefile: revision 1.4 tests/sbin/resize_ffs/common.sh: revision 1.14 tests/sbin/resize_ffs/t_check.sh: revision 1.1 tests/sbin/resize_ffs/t_grow.sh: revision 1.9 tests/sbin/resize_ffs/t_grow_swapped.sh: revision 1.3 tests/sbin/resize_ffs/t_shrink.sh: revision 1.8 tests/sbin/resize_ffs/t_shrink_swapped.sh: revision 1.2 fix image building: - round up the total size of the disk image - fix fdisk offset for netbsd ffs images -- Make get_dev_size work on regular files too. -- Use `!= -1' instead of `== 0' out of paranoia. -- - Add -c to check to see if grow/shrink is required - Divide by DEV_BSIZE when returning size of file. - Update manpage -- New sentence, new line. Sort option descriptions. -- Add resize_root boot operation. If resize_root=YES in rc.conf then the system attempts to resize the root file system to fill it's partition prior to mounting read-write. Useful for things like AMI file system images. May eventually be used by arm images after coming up with similar solution for increasing the parition size. -- - Add new tests for -c check flag in resize_ffs -- Bump date for previous. it's -> its -- Handle case in grow() where last cylinder group is too small for ufs2. Align with code in shrink(). -- factor out geometry calculation and use this also in CheckOnly mode. be a bit more verbose in Verbose mode. -- Add support for auto-growing the root partition. Enable it for rpi.img. -- initialize resize before pulling in board config -- add KEYWORD: interactive, honour resize_root_flags and resize_root_postcmd rc vars -- if the -p flag is specified, display a progress bar while growing the file-system -- show resize_ffs progress bar when resizing root partition -- fix typo in previous; pass -y unconditionally to resize_ffs, not -p -- Rename beagleboard.img to armv7.img. The new image includes the same kernels as beagleboard.img plus support for Raspberry Pi 2, ODROID-C1, Cubieboard2, Cubietruck, Hummingbird A31, and Banana Pi. -- Properly spell X' name. From X(7): The X.Org Foundation requests that the following names be used when referring to this software: X X Window System X Version 11 X Window System, Version 11 X11 -- Add some documentation: Tell what this does, and what it expects from conf files -- Cleanup: make_filesystems is not used any longer, purge remains -- More cleanup: Instead of first overwriting the *_evbarm functions with own code, and then calling them from the regular functions, directly put the code into the regular functions. No more functions from evbarm.conf are used now. Some variables are still used! -- define TOOL_MKUBOOTIMAGE for mkimage -- fix mkubootimage
|
1.38.6.2.2.1 |
| 23-Oct-2017 |
snj | Pull up following revision(s) (requested by sborrill in ticket #1516): sbin/resize_ffs/resize_ffs.8: revision 1.18 sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53 Fix the most obvious integer overflow errors which can lead to superblock corruption. Thanks to riastradh@ -- Use int64_t for loop index so we don't iterate forever/until trap. -- Fix the syntax (pointed out by David H. Gutteridge on source-changes-d). Fix the build... -- - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2. -- PR/52590: David H. Gutteridge: Minor documentation improvements -- Fix computation of left-over fragments also for ufs2. Fixes PR 52600.
|
1.38.6.1.4.1 |
| 18-Jan-2017 |
skrll | Sync with netbsd-5
|
1.38.6.1.2.1 |
| 23-Oct-2017 |
snj | Pull up following revision(s) (requested by sborrill in ticket #1516): sbin/resize_ffs/resize_ffs.8: revision 1.18 sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53 Fix the most obvious integer overflow errors which can lead to superblock corruption. Thanks to riastradh@ -- Use int64_t for loop index so we don't iterate forever/until trap. -- Fix the syntax (pointed out by David H. Gutteridge on source-changes-d). Fix the build... -- - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2. -- PR/52590: David H. Gutteridge: Minor documentation improvements -- Fix computation of left-over fragments also for ufs2. Fixes PR 52600.
|
1.47.6.1 |
| 24-Oct-2017 |
snj | Pull up following revision(s) (requested by sborrill in ticket #308): sbin/resize_ffs/resize_ffs.8: revision 1.18 sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53 Fix the most obvious integer overflow errors which can lead to superblock corruption. Thanks to riastradh@ -- Use int64_t for loop index so we don't iterate forever/until trap. -- Fix the syntax (pointed out by David H. Gutteridge on source-changes-d). Fix the build... -- - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2. -- PR/52590: David H. Gutteridge: Minor documentation improvements -- Fix computation of left-over fragments also for ufs2. Fixes PR 52600.
|
1.53.4.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.57.2.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.
|