History log of /netbsd-current/sbin/newfs_lfs/newfs.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.30 15-Oct-2015 dholland

Enable the creation of lfs64 volumes.

To create an lfs64 volume, use -w 64. You can also force a 32-bit
volume with -w 32, but this will fail on devices thta are too large.

lfs64 is the default for devices > 1TB. (1TB rather than 2TB because
daddr_t is signed and negative block numbers can cause interesting
complications.)

For now print a warning that the lfs64 format isn't finalized, because
it isn't. For now any lfs64 use should be limited to test data,
benchmarking, and so forth.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
# 1.29 18-Jun-2013 christos

Prefix most of the cpp macros with lfs_ and LFS_ to avoid conflicts with ffs.
This was done so that boot blocks that want to compile both FFS and LFS in
the same file work.


# 1.28 08-Jun-2013 dholland

Tidy up the LFS userland build hacks.
Don't use -I${NETBSDSRCDIR}/sys; don't include files other than the
exported LFS headers, which are lfs.h, lfs_inode.h, and (for now)
lfs_extern.h.


# 1.27 06-Jun-2013 dholland

ufs -> ulfs for newfs_lfs


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.26 02-Feb-2012 perseant

branches: 1.26.6;
If invoked with -D and creating an image file, ensure that the image
file is filled to the given size. This prevents false failures
with "lfs: ifile read: 22" in ATF tests.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.25 16-Feb-2010 mlelstv

branches: 1.25.6;
Three changes in a single commit.

- drop the notion of frags (LFS fragments) vs fsb (FFS fragments)
The code uses a complicated unity function that just makes the
code difficult to understand.

- support larger sector sizes. Fix disk address computations
to use DEV_BSIZE in the kernel as required by device drivers
and to use sector sizes in userland.

- Fix several locking bugs in lfs_bio.c and lfs_subr.c.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
# 1.24 20-Jul-2008 lukem

Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base mjf-devfs-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.23 05-Sep-2006 riz

branches: 1.23.18; 1.23.22;
Deal with wedges and the new disk geometry structures, instead of using
struct disklabel. From Christos Zoulas.


Revision tags: abandoned-netbsd-4-base
# 1.22 06-Aug-2006 perseant

Ensure sector size is zero in the debug case, to avoid a division by zero
error pointed out by Zafer Aydogan.


# 1.21 06-Aug-2006 perseant

Don't try to even fake building a filesystem on a file descriptor that is
neither a file nor a character special device.


# 1.20 04-May-2006 perseant

newfs_lfs(8) compoment of the recent superblock parameter addition. Change
the wording of the explanation of the -M option, detail a new -R option
that controls initial setting of the new parameter.


# 1.19 23-Apr-2006 jld

When testing seek speed (for the -A option), use sector-aligned offsets
so the reads don't always fail, and also be more careful not to read off
the end of the disk. If a read does fail, error out instead of silently
leaving the loop early (and possibly dividing by zero seconds), because
it means our idea of the disk size is wrong, or worse.

This fixes PR bin/33199.


# 1.18 22-Aug-2005 yamt

even with -F, don't overwrite p_size unless filesystem size is
specified by -s.


# 1.17 27-Jun-2005 christos

add const.


# 1.16 12-Apr-2005 perseant

Use the buffer cache improvements from fsck_lfs. Make it build again.


Revision tags: netbsd-3-base
# 1.15 26-Feb-2005 perseant

branches: 1.15.2;
Various minor LFS improvements:

* Extend the lfs library from fsck_lfs(8) so that it can be used with a
not-yet-existent LFS. Make newfs_lfs(8) use this library, so it can
create LFSs whose Ifile is larger than one segment.
* Make newfs_lfs(8) use strsuftoi64() for its arguments, a la newfs(8).
* Make fsck_lfs(8) respect the "file system is clean" flag.
* Don't let fsck_lfs(8) think it has dirty blocks when invoked with the
-n flag.


# 1.14 29-Oct-2004 dsl

Add (unsigned char) cast to ctype function


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.13 12-Aug-2003 dsl

branches: 1.13.4;
Stop superblock being written to sector 0 for small filesystems.
Honour the '-s size' command option.
Allow an LFS filesystem to be created in a file.


# 1.12 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.11 13-Jul-2003 itojun

use bounded string ops


Revision tags: fvdl_fs64_base
# 1.10 12-Dec-2002 scw

Use getlabeloffset() instead of LABELOFFSET.


# 1.9 29-Aug-2002 perseant

Don't use adaptive measuring techniques to discover a good segment size,
if the device is not a character device (they will give bogus results
if they interact with the buffer cache).


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.8 01-Nov-2001 lukem

fix -Wshadow warning by moving "int version" from global to main() scope


# 1.7 13-Jul-2001 perseant

Merge the short-lived perseant-lfsv2 branch into the trunk.

Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:

- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).

- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.

- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.

- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).

- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.

Other changes of note include:

- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.

- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.


Revision tags: perseant-lfsv2-base
# 1.6 05-Dec-2000 perseant

branches: 1.6.2;
Add "-A" option to autoconfigure the segment size based on measured
bandwidth and seek time of the disk, using the "4 * bandwidth * seek
time" formula from Neefe-Matthews' 1997 paper. An RZ25 disk with this
option gets 200K segments. Reference the paper in the manual page.


# 1.5 11-Oct-2000 he

The type of sizeof() can be u_long, so cast to that and print with %ld.


# 1.4 04-Jul-2000 perseant

Tweak how lfs_avail is initialized, corresponding to changes in the
kernel.

Don't make more superblock segments than we have a record of in
the superblock; and print these out as we go, like newfs.

Add am "-M" flag to specify the number of reserved segments, with a note
in the man page not to use it.


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.3 12-Feb-2000 perseant

branches: 1.3.4;
Add -F flag to override newfs_lfs' preference for 4.4LFS-labelled partitions.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.2 15-Jul-1999 perseant

Address PR 7412: fix newfs_lfs.8 to list all real options for newfs_lfs;
also fix newfs_lfs to get rid of all sorts of useless options that applied
only to newfs_ffs. Corrected reference to the FFS paper to the reference
to the BSD-LFS paper.


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.1 18-Mar-1999 perseant

branches: 1.1.2;
Change name of newlfs to newfs_lfs.