Home | History | Annotate | Download | only in newfs_ext2fs
History log of /src/sbin/newfs_ext2fs/mke2fs.c
RevisionDateAuthorComments
 1.28  05-Jan-2025  andvar fix various typos in comments.
 1.27  22-Feb-2024  tsutsui branches: 1.27.2;
Pull a change of newfs/mkfs.c rev 1.136:

> if the window size works but is 0, assume it didn't work and use 80.
 1.26  17-May-2023  tsutsui Use https for Ext2 documentation URLs.
 1.25  05-Sep-2016  martin Add a bit of swapping for values in CG descriptors (used to be done
wholesale in e2fs_cgsave, but now common code keeps them in FS byte
order). Seems to fix newfs_ext2fs on big endian hosts.
 1.24  04-Aug-2016  jdolecek rename struct ext2fs_dinode attribute e2di_dacl to correct
e2di_size_high; even Linux ext2 filesystem code actually uses it
unconditionally this way and ext4 code finally also calls it that way
in their struct definition too; if there was any trace of this for other
purpose it's long gone
 1.23  04-Aug-2016  nonaka pass EXT2_DINODE_SIZE(&sblock) as isize to e2fs_isave().
 1.22  16-Jun-2015  christos branches: 1.22.2;
fix error messages containing \n
 1.21  19-Oct-2013  tsutsui Wrap long lines overflowed after EXT2_ prefix addtion to fs macro.
 1.20  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.19  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.18  07-Feb-2013  apb free(bbp) in error paths. Coverity CID 274748.
 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  24-Mar-2012  joerg branches: 1.16.2;
Avoid non-literal format string. Raise WARNS to 4 and disable
sign warnings instead.
 1.15  06-Mar-2012  tsutsui Stop zero'ing all possible superblock backup leftovers conservatively.
Instead, explicitly zap only possible first backups and FFS superblocks.

Fixes "Extreamly slow newfs_ext2fs on 60Gb USB stick" problem
reported by Aleksey Cheusov on tech-kern@.
 1.14  10-Sep-2010  tsutsui branches: 1.14.6; 1.14.8;
Add a URL of Linux Documentation "The Second Extended Filesystem."
 1.13  19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.12  02-Mar-2009  tsutsui Use inodesize to get offset of inode in one more place.
 1.11  02-Mar-2009  tsutsui - accept only EXT2_REV0_DINODE_SIZE inodesize on -O 0
- use inodesize to get offset of inode, not struct ext2fs_dinode array
 1.10  01-Mar-2009  christos Support variable inode sizes.
 1.9  28-Aug-2008  tsutsui branches: 1.9.2; 1.9.4;
Fix some spelling.
 1.8  14-May-2008  tsutsui Normalize my licenses.
 1.7  14-Dec-2007  tsutsui branches: 1.7.2; 1.7.6; 1.7.8; 1.7.10;
Don't allow blocksize larger than 4096 bytes as our kernel, fsck_ext2fs(8),
and Linux e2fsprogs.
 1.6  09-Dec-2007  tsutsui Fix typo.
 1.5  21-Nov-2007  tsutsui branches: 1.5.2;
Roundup e2fs_ipg to make it use whole inode table blocks since
it's still reasonable and some kernel code seems to assume it
(otherwise some inode numbers of directories could be corrupted).

XXX: not sure if odd e2fs_ipg is valid or not in ext2fs spec.
 1.4  20-Nov-2007  tsutsui Fix e2fs_itpg calculation.
 1.3  19-Nov-2007  tsutsui - fix a possible integer overflow
- initialize inode generation numbers with random numbers for NFS
like newfs(8) as man page said
XXX: sys/ufs/ext2fs/ext2fs_alloc.c:ext2fs_valloc() seems to override
these generated numbers.
 1.2  18-Nov-2007  tsutsui Several minor fixes:
- replace a magic number with a macro
- fix several printf format
- fix possble block sizes for zap_old_sblock()
- use err(3) rather than errx(3) + strerror(errno)
- fix a typo
- misc cosmetics
 1.1  17-Nov-2007  tsutsui Add a dumb but BSD-licensed newfs_ext2fs(8) command.
This is based on the newfs(8) command for ffs, but
most ext2fs specific part is written from scratch.

Tested on alpha, cobalt, i386 and sgimips with some disks and vnd(4),
and at least cobalt's firmware can load boot files from an ext2fs
E2FS_REV0 partition created by this native newfs_ext2fs(8) command.

Closes PR bin/16175.
 1.5.2.2  27-Dec-2007  mjf Sync with HEAD.
 1.5.2.1  21-Nov-2007  mjf file mke2fs.c was added on branch mjf-devfs on 2007-12-27 00:47:03 +0000
 1.7.10.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.7.10.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.8.1  18-May-2008  yamt sync with head.
 1.7.6.2  28-Sep-2008  mjf Sync with HEAD.
 1.7.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.7.2.2  09-Jan-2008  matt sync with HEAD
 1.7.2.1  14-Dec-2007  matt file mke2fs.c was added on branch matt-armv6 on 2008-01-09 01:38:14 +0000
 1.9.4.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.9.2.1  16-Jan-2011  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1486):
sbin/fsck_ext2fs/setup.c: revision 1.26
sbin/newfs_ext2fs/mke2fs.c: revision 1.10
sbin/newfs_ext2fs/mke2fs.c: revision 1.11
sbin/newfs_ext2fs/mke2fs.c: revision 1.12
sbin/fsck_ext2fs/inode.c: revision 1.24
sys/lib/libsa/ext2fs.c: revision 1.6
sbin/newfs_ext2fs/extern.h: revision 1.3
sbin/fsck_ext2fs/inode.c: revision 1.25
sys/lib/libsa/ext2fs.c: revision 1.7
sbin/fsck_ext2fs/inode.c: revision 1.26
sys/ufs/ext2fs/ext2fs_inode.c: revision 1.68
sbin/fsck_ext2fs/inode.c: revision 1.27
sbin/fsck_ext2fs/inode.c: revision 1.28
sys/ufs/ext2fs/ext2fs_dinode.h: revision 1.18
sys/ufs/ext2fs/ext2fs_dinode.h: revision 1.19
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.5
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.2
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.6
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.3
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.142
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.7
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.4
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.8
PR/40936: Frederik Sausmikat: ext2fs: add support for inodes > 128 bytes
Support variable inode sizes.
catch up with variable inode size.
Don't use e2fs_inode_size in superblock on E2FS_REV0 file system.
- accept only EXT2_REV0_DINODE_SIZE inodesize on -O 0
- use inodesize to get offset of inode, not struct ext2fs_dinode array
Replace a magic number with a new EXT2_REV0_DINODE_SIZE macro.
Use EXT2_DINODE_SIZE() to get offset of inode, not struct ext2fs_dinode array.
Fix botched logic in inodesize check.
Use inodesize to get offset of inode in one more place.
- add a sanity check for e2fs_inode_size in readsb()
- use EXT2_DINODE_SIZE() rather than sizeof(struct ext2fs_dinode) or
struct ext2fs_dinode array/pointer to see e2fs_ipb and inode offsets
Sort options.
New sentence, new line.
Sort options in usage.
- unsigned -> unsigned int
- remove unnecessary casts from malloc(3) and free(3)
- fix a bogus indent
Use "size > INT32_MAX" rather than "size >= 0x80000000U" to check 2GB limit.
Add missed byteswap ops against ext2fs_dinode members.
Handle 32 bit uid field on E2FS_REV1.
 1.14.8.1  09-Mar-2012  sborrill Pull up the following revisions(s) (requested by tsutsui in ticket #105):
sbin/newfs_ext2fs/mke2fs.c: revision 1.15

Fix extremely slow newfs_ext2fs(8) operation on large USB stick.
 1.14.6.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.14.6.2  23-Jan-2013  yamt sync with head
 1.14.6.1  17-Apr-2012  yamt sync with head
 1.16.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.2.2  23-Jun-2013  tls resync from head
 1.16.2.1  25-Feb-2013  tls resync with head
 1.22.2.1  06-Aug-2016  pgoyette Sync with HEAD
 1.27.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed