Commit Graph

42 Commits

Author SHA1 Message Date
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
wiz ab9a7c3733 dumplfs needs one argument -- remove .Op. 2003-04-16 10:21:57 +00:00
wiz a0d5a7bba1 Sync usage with man page. 2003-04-16 09:25:04 +00:00
fvdl 42614ed3f3 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.
2003-04-02 10:39:19 +00:00
perseant af18198dff Add option to check partial-segment data checksums. 2003-03-07 22:50:09 +00:00
perseant 8685c52d63 Make the "-O" (start filesystem offset) flag to newfs_lfs work correctly,
and update fsck_lfs and dumplfs to deal with it.  Note that while the argument
to -O is given in disk sectors, it must be a multiple of the fragment size,
and although it can be lower than the label or superblock, it can't intersect
either.
2003-02-23 04:32:05 +00:00
simonb aeb8d0ecad Show the address of segment 0. 2003-02-21 04:01:07 +00:00
perseant b397c875ae Add code to UBCify LFS. This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon.  To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
  writes for the pagedaemon, but which also takes over some of the
  functions of lfs_check().  This thread is started the first time an
  LFS is mounted.

* Add a "flags" parameter to GOP_SIZE.  Current values are
  GOP_SIZE_READ, meaning that the call should return the size of the
  in-core version of the file, and GOP_SIZE_WRITE, meaning that it
  should return the on-disk size.  One of GOP_SIZE_READ or
  GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
  resources to get by and use malloc(...M_NOWAIT), using the reserves if
  necessary.  Use the pool subsystem for structures small enough that
  this is feasible.  This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
  structure; getting closer to LFS as an LKM.  "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
  checkpoint; any segments that pass two checkpoints both dirty and
  empty can be summarily cleaned.  Do this.  Right now lfs_segclean
  still works, but this should be turned into an effectless
  compatibility syscall.
2003-02-17 23:48:08 +00:00
mrg a1f69dd514 make this build on alpha after daddr_t->64bit 2003-01-28 07:44:54 +00:00
fvdl a3ff3a3038 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.
2003-01-24 21:55:02 +00:00
lukem 17d72c8a6b use NETBSDSRCDIR as appropriate 2002-09-18 03:54:26 +00:00
wiz 5ba5a79d16 Sort SEE ALSO. 2002-01-19 03:10:41 +00:00
perseant 4e3fced95b 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.
2001-07-13 20:30:18 +00:00
lukem c2aa46e7c2 use %ll_ instead of the less standard %q_ 2001-01-05 03:27:26 +00:00
perseant a3bb9e16b4 Report, and detect and correct inconsistencies in, the number of clean
segments.  Patches from Jesse Off <joff@gci-net.com> (PR #11470).
2000-11-13 00:30:48 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
toshii 3f9bbd97f5 Defined datobyte(fs, da) macro, to ensure cast to off_t.
Fixes overflows with >2GB partitions. Reviewed by <enami@netbsd.org>.
2000-08-25 05:27:49 +00:00
perseant 4e02de35d3 use -s option to shorten the list of SEGUSEs printed as well as whole segments 2000-06-25 21:36:16 +00:00
perseant 37318e5a65 Assorted changes/fixes to dumplfs:
Add flags "-b" and "-I" to dumplfs, to allow the user to specify the
location of the superblock and Ifile inode, respectively.

Don't print "corrupt segment header" any more for leftover slivers of
space too close to the next segment to write a partial-segment.  In the
event that there was no such sliver, the segment still ends; recognize
this and print out the segment number, and superblock if asked.

Document all the flags in the man page.

Print the partial-segment write flags (SS_DIROP, SS_CONT).

Make the "-a" flag output look slightly better.

Change all hex numbers to lowercase, instead of having some upper and
some lower.
2000-06-14 01:55:37 +00:00
perseant 5415bc30ff Reversed (corrected) sense of superblock timestamp comparison; added the
disk address of the reported superblock to the "master superblock" line
of the report.
1999-05-02 00:26:01 +00:00
mrg 3e4fcb2e57 newlfs -> newfs_lfs. 1999-04-20 07:15:38 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
pk f6ed324c42 Deal with superblock changes; from PR#6032. 1998-09-11 21:22:53 +00:00
nathanw a542b8e8e3 Add braces to satisfy egcs. 1998-08-30 01:40:15 +00:00
ross 5b1f2d4c8c Add {} pairs to shut up egcs. 1998-08-27 18:03:42 +00:00
thorpej a14f3dad40 Fix printf formats on Alpha: cast quads to long long for printing w/
%qd.
1998-03-03 07:35:50 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
lukem f5bf267d90 enable WARNS=1 by default, but disable in unclean 3rd party code 1997-10-18 06:42:25 +00:00
mikel b674a8fd0e fix typos noted by Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp>. 1997-05-13 04:15:06 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
thorpej 47efd9f35e Make this compile with -Werror. 1995-12-14 22:30:45 +00:00
cgd 788733b7a9 typeof(timeval.tv_sec) != time_t 1995-06-07 17:14:21 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
cgd 06e2955ff1 specify man pages the new way. 1994-12-22 10:44:04 +00:00
cgd 5eeab43e28 more cleanups from Jim Jegers, passed over by me. 1994-12-05 20:15:31 +00:00
cgd 696b7080ba correct pointer type. 1994-10-31 04:21:52 +00:00
mycroft 8ffd59e28b err(3)/warn(3) cleanup 1994-09-23 02:18:30 +00:00
deraadt 48c91e8043 do not need -I/sys 1994-08-03 21:07:10 +00:00
mycroft 0924c7ec2d Import 4.4-Lite version. 1994-06-13 22:50:46 +00:00
pk 928beac1da X compilation 1994-06-10 17:33:55 +00:00
mycroft ccfa3742b5 Update from 4.4-Lite, with local changes. 1994-06-08 18:57:30 +00:00