History log of /src/usr.sbin/makefs/ffs |
Revision | Date | Author | Comments |
1.1 | 16-Jan-2009 |
pooka | Move fs-specific stuff in Makefile to fs/Makefile.inc to clarify top-level Makefile.
|
1.28 | 14-Mar-2023 |
kre | In bwrite() if the write() returned -1, the associated errno was being used after a (possible) call to printf (only happens when debugging) and a certain call to free() (via brelse()). Make a copy, and use that instead.
|
1.27 | 14-Mar-2023 |
kre | Use %zd to print ssize_t (%z[uxo] for size_t), rather than %jd (just like the other adjacent printfs do)
Should fix i386 build.
|
1.26 | 13-Mar-2023 |
christos | modernize; release bpp and set it to NULL as the kernel does even if we never return here.
|
1.25 | 09-Apr-2022 |
riastradh | makefs(8): Nix trailing whitespace.
Computed by machine, eyeballed by hand, so to speak.
|
1.24 | 24-Jun-2016 |
christos | tidy up error messages
|
1.23 | 24-Dec-2015 |
christos | little size_t/ssize_t...
|
1.22 | 29-Mar-2015 |
agc | Make the userland signature and uses of bread() match the kernel ones, after the removal of the cred argument.
|
1.21 | 03-Feb-2013 |
christos | - more changes to make -O work - fix err* calls.
|
1.20 | 02-Feb-2013 |
christos | add and document offset.
|
1.19 | 30-Jan-2013 |
christos | - don't abuse vp->fs to mean struct fs for ffs and struct msdos_opts; make it always fsinfo_t and change void * to that. - kill unused structure members.
|
1.18 | 30-Jan-2013 |
christos | buf is generic; it has nothing to do with ffs and will eventually be moved. gc sectorize.
|
1.17 | 28-Jan-2013 |
christos | - use emalloc and friends - kill a bunch of global variables, more work to be done here - homogenize option parsing. more work for cd9660 - use the new options parsing code to print an fs-specific usage
|
1.16 | 28-Jan-2013 |
mlelstv | Do not use *bp after freeing it in brelse.
|
1.15 | 27-Jan-2013 |
christos | This works well enough to populate plain files in the root dir. creating directories fails.
|
1.14 | 27-Jan-2013 |
christos | Don't print the pointers in debugging, it is not useful. zero all memory
|
1.13 | 26-Jan-2013 |
christos | make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile.
|
1.12 | 20-Jun-2004 |
jmc | branches: 1.12.48; 1.12.54; Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
|
1.11 | 16-Oct-2003 |
itojun | branches: 1.11.2; safer use of realloc
|
1.10 | 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.9 | 31-Jan-2002 |
tv | Roll in fixes to permit cross-compiling from non-NetBSD hosts. This round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions.
|
1.8 | 08-Jan-2002 |
lukem | need ufs/ufs/dinode.h for ufs/ffs/fs.h
|
1.7 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.6 | 07-Jan-2002 |
lukem | - pull in <ufs/ufs/dinode.h> before <ufs/ffs/fs.h> - #include <ufs/[uf]fs/*.h> instead of "ufs/[uf]fs/*.h", and don't bother with -I../../sys; we'll solve the hostprog problem another way and unconditionally pulling in NetBSD-current's usr/src/sys on a host system could be a Bad Thing.
|
1.5 | 07-Jan-2002 |
lukem | fix bugs reported by matt green: - when calculating file size, round up to frag size not block size - #define FFS_EI in makefs.h, and include that before [uf]fs/*.h
other stuff: - round up final size to next block (instead of next sector) - protect makefs.h from multiple inclusion
|
1.4 | 22-Nov-2001 |
lukem | reference the ufs/[uf]fs headers in ../../sys rather than using those in /usr/include. this should make it easier to make this a host tool
|
1.3 | 02-Nov-2001 |
lukem | tweak copyright
|
1.2 | 28-Oct-2001 |
lukem | add __RCSID()
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.11.2.1 | 22-Jun-2004 |
tron | Pull up revision 1.12 (requested by jmc in ticket #527): Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
|
1.12.54.1 | 25-Feb-2013 |
tls | resync with head
|
1.12.48.1 | 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.14 | 06-Mar-2022 |
hgutch | Make sure daddr_t is a 64 bit type when building tools. (see also PR sw-bug/56742 ).
|
1.13 | 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.12 | 16-Feb-2017 |
christos | branches: 1.12.10; 1.12.12; need <sys/stat.h>
|
1.11 | 16-Feb-2017 |
christos | fix msdos reproducible builds!
|
1.10 | 29-Mar-2015 |
agc | branches: 1.10.2; 1.10.4; Make the userland signature and uses of bread() match the kernel ones, after the removal of the cred argument.
|
1.9 | 30-Jan-2013 |
christos | - don't abuse vp->fs to mean struct fs for ffs and struct msdos_opts; make it always fsinfo_t and change void * to that. - kill unused structure members.
|
1.8 | 30-Jan-2013 |
christos | buf is generic; it has nothing to do with ffs and will eventually be moved. gc sectorize.
|
1.7 | 28-Jan-2013 |
christos | - use emalloc and friends - kill a bunch of global variables, more work to be done here - homogenize option parsing. more work for cd9660 - use the new options parsing code to print an fs-specific usage
|
1.6 | 27-Jan-2013 |
christos | This works well enough to populate plain files in the root dir. creating directories fails.
|
1.5 | 27-Jan-2013 |
christos | zero memory
|
1.4 | 26-Jan-2013 |
christos | make this cross-compile friendly.
|
1.3 | 26-Jan-2013 |
christos | make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile.
|
1.2 | 02-Nov-2001 |
lukem | branches: 1.2.56; 1.2.62; tweak copyright
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.2.62.1 | 25-Feb-2013 |
tls | resync with head
|
1.2.56.1 | 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.10.4.1 | 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.10.2.1 | 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.12.12.1 | 10-Jun-2019 |
christos | Sync with HEAD
|
1.12.10.1 | 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.33 | 27-Jun-2025 |
andvar | s/quadradically/quadratically/ in comments.
|
1.32 | 13-Mar-2023 |
christos | branches: 1.32.2; Don't brelse() if bread() fails. The kernel does this for us. Our bread() implementation just exits on failure, but if it didn't we would double-free. From Ed Maste (https://reviews.freebsd.org/D39069)
|
1.31 | 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.30 | 09-Apr-2022 |
riastradh | branches: 1.30.2; makefs(8): Nix trailing whitespace.
Computed by machine, eyeballed by hand, so to speak.
|
1.29 | 24-Jun-2016 |
christos | tidy up error messages
|
1.28 | 29-Mar-2015 |
agc | Make the userland signature and uses of bread() match the kernel ones, after the removal of the cred argument.
|
1.27 | 23-Jun-2013 |
dholland | 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.26 | 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.25 | 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.24 | 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.23 | 30-Jan-2013 |
christos | - don't abuse vp->fs to mean struct fs for ffs and struct msdos_opts; make it always fsinfo_t and change void * to that. - kill unused structure members.
|
1.22 | 27-Jan-2013 |
christos | This works well enough to populate plain files in the root dir. creating directories fails.
|
1.21 | 26-Jan-2013 |
christos | make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile.
|
1.20 | 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.19 | 19-Apr-2012 |
christos | branches: 1.19.2; WARNS=5
|
1.18 | 06-Mar-2011 |
bouyer | branches: 1.18.4; 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.17 | 18-Dec-2006 |
christos | branches: 1.17.30; from Anon Ymous: compile with -Wextra
|
1.16 | 19-Aug-2005 |
christos | 64 bit inode changes
|
1.15 | 23-Jun-2005 |
fvdl | Pull in DIP_ADD from sys/ufs/ufs/inode.h and use it, to prevent bad lvalue assignment warnings/errors from gcc4.
|
1.14 | 20-Jun-2004 |
jmc | branches: 1.14.2; 1.14.4; Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
|
1.13 | 07-Aug-2003 |
agc | branches: 1.13.2; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.12 | 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.11 | 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.10 | 20-Jul-2002 |
grant | sweep of errx/warnx, remove unnecessary trailing \n
|
1.9 | 06-Feb-2002 |
lukem | use (size / DEV_BSIZE) instead of btodb(size). fixes cross build issue.
|
1.8 | 31-Jan-2002 |
tv | Roll in fixes to permit cross-compiling from non-NetBSD hosts. This round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions.
|
1.7 | 08-Jan-2002 |
lukem | need ufs/ufs/dinode.h for ufs/ffs/fs.h
|
1.6 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.5 | 07-Jan-2002 |
lukem | - pull in <ufs/ufs/dinode.h> before <ufs/ffs/fs.h> - #include <ufs/[uf]fs/*.h> instead of "ufs/[uf]fs/*.h", and don't bother with -I../../sys; we'll solve the hostprog problem another way and unconditionally pulling in NetBSD-current's usr/src/sys on a host system could be a Bad Thing.
|
1.4 | 07-Jan-2002 |
lukem | fix bugs reported by matt green: - when calculating file size, round up to frag size not block size - #define FFS_EI in makefs.h, and include that before [uf]fs/*.h
other stuff: - round up final size to next block (instead of next sector) - protect makefs.h from multiple inclusion
|
1.3 | 22-Nov-2001 |
lukem | reference the ufs/[uf]fs headers in ../../sys rather than using those in /usr/include. this should make it easier to make this a host tool
|
1.2 | 28-Oct-2001 |
lukem | add __RCSID()
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.13.2.1 | 22-Jun-2004 |
tron | Pull up revision 1.14 (requested by jmc in ticket #527): Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
|
1.14.4.1 | 12-Oct-2006 |
ghen | Apply patch (requested by skrll in ticket #1529): PR toolchain/34258: Fix cross-building NetBSD 3.x binutils with GCC 4.x.
|
1.14.2.1 | 06-Oct-2006 |
ghen | Apply patch (requested by skrll in ticket #1529): PR toolchain/34258: Fix cross-building NetBSD 3.x binutils with GCC 4.x.
|
1.17.30.1 | 08-Feb-2011 |
bouyer | ffs_clusteracct() moved to ffs_subr.c, so remove it from this copy of ffs_alloc.c (otherwise we have duplicate symbols at link time). Always use UFS_FSNEEDSWAP(fs) even if !KERNEL; so we can use for makefs too. other !KERNEL consumers will have UFS_FSNEEDSWAP(fs) == 0 anyway.
|
1.18.4.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.18.4.2 | 23-Jan-2013 |
yamt | sync with head
|
1.18.4.1 | 23-May-2012 |
yamt | sync with head.
|
1.19.2.3 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.19.2.2 | 23-Jun-2013 |
tls | resync from head
|
1.19.2.1 | 25-Feb-2013 |
tls | resync with head
|
1.30.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.
|
1.32.2.1 | 02-Aug-2025 |
perseant | Sync with HEAD
|
1.23 | 13-Mar-2023 |
christos | Don't brelse() if bread() fails. The kernel does this for us. Our bread() implementation just exits on failure, but if it didn't we would double-free. From Ed Maste (https://reviews.freebsd.org/D39069)
|
1.22 | 17-Nov-2022 |
chs | 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.21 | 29-Mar-2015 |
agc | Make the userland signature and uses of bread() match the kernel ones, after the removal of the cred argument.
|
1.20 | 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.19 | 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.18 | 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.17 | 30-Jan-2013 |
christos | - don't abuse vp->fs to mean struct fs for ffs and struct msdos_opts; make it always fsinfo_t and change void * to that. - kill unused structure members.
|
1.16 | 27-Jan-2013 |
christos | This works well enough to populate plain files in the root dir. creating directories fails.
|
1.15 | 26-Jan-2013 |
christos | make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile.
|
1.14 | 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.13 | 20-Jun-2004 |
jmc | branches: 1.13.48; 1.13.54; Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
|
1.12 | 07-Aug-2003 |
agc | branches: 1.12.2; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.11 | 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.10 | 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.9 | 31-Jan-2002 |
tv | Roll in fixes to permit cross-compiling from non-NetBSD hosts. This round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions.
|
1.8 | 08-Jan-2002 |
lukem | need ufs/ufs/dinode.h for ufs/ffs/fs.h
|
1.7 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.6 | 07-Jan-2002 |
lukem | - pull in <ufs/ufs/dinode.h> before <ufs/ffs/fs.h> - #include <ufs/[uf]fs/*.h> instead of "ufs/[uf]fs/*.h", and don't bother with -I../../sys; we'll solve the hostprog problem another way and unconditionally pulling in NetBSD-current's usr/src/sys on a host system could be a Bad Thing.
|
1.5 | 07-Jan-2002 |
lukem | fix bugs reported by matt green: - when calculating file size, round up to frag size not block size - #define FFS_EI in makefs.h, and include that before [uf]fs/*.h
other stuff: - round up final size to next block (instead of next sector) - protect makefs.h from multiple inclusion
|
1.4 | 31-Dec-2001 |
thorpej | Need <stdlib.h> for abort() prototype (noticed by gcc 3.1).
|
1.3 | 22-Nov-2001 |
lukem | reference the ufs/[uf]fs headers in ../../sys rather than using those in /usr/include. this should make it easier to make this a host tool
|
1.2 | 28-Oct-2001 |
lukem | add __RCSID()
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.12.2.1 | 22-Jun-2004 |
tron | Pull up revision 1.13 (requested by jmc in ticket #527): Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
|
1.13.54.3 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.13.54.2 | 23-Jun-2013 |
tls | resync from head
|
1.13.54.1 | 25-Feb-2013 |
tls | resync with head
|
1.13.48.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.13.48.1 | 23-Jan-2013 |
yamt | sync with head
|
1.9 | 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.8 | 09-Apr-2022 |
riastradh | branches: 1.8.2; makefs(8): Nix trailing whitespace.
Computed by machine, eyeballed by hand, so to speak.
|
1.7 | 09-Feb-2017 |
kre | Revert the part of mkfs.c 1.36 that "gutted the const" (while retaining the part that added a different one).
That is, re-constipate makefs (well, just a bit, no real pain here.)
|
1.6 | 07-Aug-2003 |
agc | branches: 1.6.78; 1.6.82; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.5 | 15-Jun-2003 |
tsutsui | Fix function declaration mismatch with src/sys/ufs/ffs/ffs_extern.h which causes makefs(8) failure on big endian machines. Pointed out by tsubai.
XXX The real problem is that some sources include {.CURDIR}/ffs/ffs_extern.h XXX but others include /usr/include/ufs/ffs/ffs_extern.h .
|
1.4 | 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.3 | 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.2 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.6.82.1 | 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.6.78.1 | 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.8.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.
|
1.42 | 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.41 | 17-Nov-2022 |
chs | branches: 1.41.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.40 | 02-Apr-2022 |
mlelstv | Avoid integer overflow on systems with 32bit disk addresses.
|
1.39 | 26-Mar-2020 |
kre | Fix the build, use %jd and (intmax_t) cast for big numbers, off_t and ptrdiff_t aren't always the same size.
|
1.38 | 25-Mar-2020 |
christos | improve error messages.
|
1.37 | 09-Feb-2017 |
kre | branches: 1.37.12;
Revert the part of mkfs.c 1.36 that "gutted the const" (while retaining the part that added a different one).
That is, re-constipate makefs (well, just a bit, no real pain here.)
|
1.36 | 08-Feb-2017 |
christos | gut const for now.
|
1.35 | 08-Feb-2017 |
christos | Don't store random (from ASLR) pointers into the superblock. Should be the last (famous last words) problem with reproducible builds!
|
1.34 | 24-Jun-2016 |
christos | branches: 1.34.2; 1.34.4; tidy up error messages
|
1.33 | 21-Dec-2015 |
christos | more deterministic ffs for reproducible builds.
|
1.32 | 19-Oct-2013 |
christos | fix unused variable warnings.
|
1.31 | 23-Jun-2013 |
dholland | 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.30 | 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.29 | 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.28 | 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.27 | 03-Feb-2013 |
christos | - more changes to make -O work - fix err* calls.
|
1.26 | 28-Jan-2013 |
christos | - use emalloc and friends - kill a bunch of global variables, more work to be done here - homogenize option parsing. more work for cd9660 - use the new options parsing code to print an fs-specific usage
|
1.25 | 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.24 | 19-Apr-2012 |
dholland | branches: 1.24.2; Fix build failure reported by bracket.
(shouldn't this size_t be ino_t?)
|
1.23 | 19-Apr-2012 |
christos | WARNS=5
|
1.22 | 09-Oct-2011 |
christos | branches: 1.22.2; add support for setting the ufs label. (Nathan Whitehorn)
|
1.21 | 20-Dec-2004 |
jmc | Refactor the filesystem specific portions out of makefs.c/makefs.h completely. Instead of extending fsinfo_t it now holds a void * to file system specific data. This is then setup/cleaned up by the additional of 2 additional callbacks. Makes adding new filesystems simpler as almost no code has to be updated in the generic makefs code now.
|
1.20 | 24-Jun-2004 |
lukem | Define FFS_MAXBSIZE to 65536 and use instead of MAXBSIZE. Deprecate unused MAXINOPB. Should fix PR [toolchain/25603].
|
1.19 | 20-Jun-2004 |
jmc | Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
|
1.18 | 07-Sep-2003 |
fvdl | branches: 1.18.2; Revert arc4random usage. makefs is only used for install images, filehandle randomization is not an issue there, and using arc4random broke building makefs as a host tool.
|
1.17 | 06-Sep-2003 |
itojun | use arc4random
|
1.16 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.15 | 16-Apr-2003 |
briggs | Protect use of __RCSID() with a check to ensure that it's defined. Suggested by Ian Lance Taylor on tech-userlevel@ to help cross-compilation on Red Hat 7.3.
|
1.14 | 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.13 | 28-Jan-2003 |
mrg | make this build on alpha after daddr_t->64bit
|
1.12 | 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.11 | 08-Aug-2002 |
soren | Remove extraneous \n's in {err,warn}{,x} that used to be printfs.
|
1.10 | 06-Feb-2002 |
lukem | don't need <ufs/ufs/dir.h> here
|
1.9 | 31-Jan-2002 |
tv | Roll in fixes to permit cross-compiling from non-NetBSD hosts. This round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions.
|
1.8 | 26-Jan-2002 |
lukem | - crank default cpg from 16 to 65536, and let the auto-sizing code in mkfs() do its job - pass cpgflg=1 to mkfs() if the user provided cpg, =0 otherwise - improve error reporting in ffs_write_file() - only add superblock & block map slop for one cylinder group. trying to calculate the number of required cylinder groups caused too many problems when tweaking parameters for small file systems. rely upon slop from minfree, and upon ffs_write_file() to complain if the user is too aggressive about tweaking the parameters
|
1.7 | 18-Jan-2002 |
lukem | apply changes from revs 1.56-1.59 of newfs/mkfs.c: * revision 1.56 the change of calculation of inodes per group in rev 1.52 was far too aggressive; rework to be a bit less susceptable to round-off error. now it's likely that the density might not be obtained with a small filesystem with a large number of inodes (e.g -s 4M -i 1k), but that's an extremely unlikely corner case that can easily be rectified with command-line arguments. fixed provided in private email by Takao Shinohara <shin@sm.sony.co.jp> should resolve PRs [bin/14049] and [bin/14046] [ this fixes a problem in makefs(8) that matt green reported ]
* revision 1.58 clamp bsize to MAXBSIZE
* revision 1.59 don't bother printing a warning about the cylinder group size being restricted if -c isn't given; it just confuses a user of newfs (and the cpg info is printed as part of the display anyway), and prints an unnecessary warning for mount_mfs.
XXX: I must rework newfs/mkfs.c to make it easier to just .PATH into makefs(8)
|
1.6 | 08-Jan-2002 |
lukem | need ufs/ufs/dinode.h for ufs/ffs/fs.h
|
1.5 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.4 | 07-Jan-2002 |
lukem | - pull in <ufs/ufs/dinode.h> before <ufs/ffs/fs.h> - #include <ufs/[uf]fs/*.h> instead of "ufs/[uf]fs/*.h", and don't bother with -I../../sys; we'll solve the hostprog problem another way and unconditionally pulling in NetBSD-current's usr/src/sys on a host system could be a Bad Thing.
|
1.3 | 07-Jan-2002 |
lukem | fix bugs reported by matt green: - when calculating file size, round up to frag size not block size - #define FFS_EI in makefs.h, and include that before [uf]fs/*.h
other stuff: - round up final size to next block (instead of next sector) - protect makefs.h from multiple inclusion
|
1.2 | 22-Nov-2001 |
lukem | reference the ufs/[uf]fs headers in ../../sys rather than using those in /usr/include. this should make it easier to make this a host tool
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.18.2.2 | 25-Jun-2004 |
jmc | Pullup rev 1.20 (requested by lukem in ticket #549)
Define FFS_MAXBSIZE to 65536 and use instead of MAXBSIZE. Deprecate unused MAXINOPB. PR#25603 fixed.
|
1.18.2.1 | 22-Jun-2004 |
tron | Pull up revision 1.19 (requested by jmc in ticket #527): Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
|
1.22.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.22.2.2 | 23-Jan-2013 |
yamt | sync with head
|
1.22.2.1 | 23-May-2012 |
yamt | sync with head.
|
1.24.2.3 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.24.2.2 | 23-Jun-2013 |
tls | resync from head
|
1.24.2.1 | 25-Feb-2013 |
tls | resync with head
|
1.34.4.1 | 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.34.2.1 | 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.37.12.1 | 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.41.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.
|
1.1 | 06-Mar-2022 |
hgutch | Make sure daddr_t is a 64 bit type when building tools. (see also PR sw-bug/56742 ).
|
1.5 | 06-Mar-2022 |
hgutch | Make sure daddr_t is a 64 bit type when building tools. (see also PR sw-bug/56742 ).
|
1.4 | 21-Dec-2015 |
christos | more deterministic ffs for reproducible builds.
|
1.3 | 21-Oct-2009 |
snj | Remove 3rd and 4th clauses in christos' license. OK christos.
|
1.2 | 24-Jun-2004 |
lukem | Define FFS_MAXBSIZE to 65536 and use instead of MAXBSIZE. Deprecate unused MAXINOPB. Should fix PR [toolchain/25603].
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1.1.4; makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.1.1.1.4.1 | 25-Jun-2004 |
jmc | Pullup rev 1.2 (requested by lukem in ticket #549)
Define FFS_MAXBSIZE to 65536 and use instead of MAXBSIZE. Deprecate unused MAXINOPB. PR#25603 fixed.
|
1.19 | 09-Apr-2022 |
riastradh | makefs(8): Nix trailing whitespace.
Computed by machine, eyeballed by hand, so to speak.
|
1.18 | 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.17 | 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.16 | 08-Oct-2005 |
chs | branches: 1.16.42; 1.16.48; avoid the need for a bogus initializer.
|
1.15 | 07-Jun-2005 |
he | Initialize a local variable in ufs_getlbns() to appease -Wuninitialized. Marked with XXXGCC for sparc64 (found while compiling for it).
Reviewed by lukem.
|
1.14 | 20-Jun-2004 |
jmc | Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
|
1.13 | 07-Aug-2003 |
agc | branches: 1.13.2; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.12 | 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.11 | 31-Jan-2002 |
tv | Protect __RCSID and __COPYRIGHT from being invoked if not defined.
|
1.10 | 18-Jan-2002 |
lukem | don't need ffs/buf.h here
|
1.9 | 08-Jan-2002 |
lukem | need ufs/ufs/dinode.h for ufs/ffs/fs.h
|
1.8 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.7 | 07-Jan-2002 |
lukem | - pull in <ufs/ufs/dinode.h> before <ufs/ffs/fs.h> - #include <ufs/[uf]fs/*.h> instead of "ufs/[uf]fs/*.h", and don't bother with -I../../sys; we'll solve the hostprog problem another way and unconditionally pulling in NetBSD-current's usr/src/sys on a host system could be a Bad Thing.
|
1.6 | 07-Jan-2002 |
lukem | fix bugs reported by matt green: - when calculating file size, round up to frag size not block size - #define FFS_EI in makefs.h, and include that before [uf]fs/*.h
other stuff: - round up final size to next block (instead of next sector) - protect makefs.h from multiple inclusion
|
1.5 | 31-Dec-2001 |
thorpej | Need <strings.h> for ffs() prototype (noticed by gcc 3.1).
|
1.4 | 22-Nov-2001 |
lukem | reference the ufs/[uf]fs headers in ../../sys rather than using those in /usr/include. this should make it easier to make this a host tool
|
1.3 | 08-Nov-2001 |
lukem | sync with ufs/ufs/ufs_bmap.c rev 1.14: - assert that ufs_getlbns() is only called for blocks which involve indirects - use a shift instead of a multiply in one place
|
1.2 | 28-Oct-2001 |
lukem | add __RCSID()
|
1.1 | 26-Oct-2001 |
lukem | branches: 1.1.1; Initial revision
|
1.1.1.1 | 26-Oct-2001 |
lukem | makefs - create a file system image from a directory tree. It doesn't need any special privileges or kernel devices.
Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends.
This program was designed & implemented by Luke Mewburn of Wasabi Systems.
|
1.13.2.1 | 22-Jun-2004 |
tron | Pull up revision 1.14 (requested by jmc in ticket #527): Completely rework how tools/compat is done. Purge all uses/references to _NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
|
1.16.48.2 | 23-Jun-2013 |
tls | resync from head
|
1.16.48.1 | 25-Feb-2013 |
tls | resync with head
|
1.16.42.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.16.42.1 | 23-Jan-2013 |
yamt | sync with head
|
1.5 | 30-Jan-2013 |
christos | - don't abuse vp->fs to mean struct fs for ffs and struct msdos_opts; make it always fsinfo_t and change void * to that. - kill unused structure members.
|
1.4 | 23-Jun-2005 |
fvdl | branches: 1.4.42; 1.4.48; Pull in DIP_ADD from sys/ufs/ufs/inode.h and use it, to prevent bad lvalue assignment warnings/errors from gcc4.
|
1.3 | 07-Aug-2003 |
agc | branches: 1.3.6; 1.3.10; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.2 | 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.1 | 07-Jan-2002 |
lukem | add "ffs/ufs_inode.h" with a minimal struct inode, to replace <ufs/ufs/inode.h>, since the latter has a lot of cruft we don't need and it #include's way more stuff in <sys/*> (etc) than is needed here. yet another nail in the "let's make makefs a proper host tool" coffin.
|
1.3.10.1 | 12-Oct-2006 |
ghen | Apply patch (requested by skrll in ticket #1529): PR toolchain/34258: Fix cross-building NetBSD 3.x binutils with GCC 4.x.
|
1.3.6.1 | 06-Oct-2006 |
ghen | Apply patch (requested by skrll in ticket #1529): PR toolchain/34258: Fix cross-building NetBSD 3.x binutils with GCC 4.x.
|
1.4.48.1 | 25-Feb-2013 |
tls | resync with head
|
1.4.42.1 | 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")
|