Commit Graph

69 Commits

Author SHA1 Message Date
Bruce Evans
3aa12267a5 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) that I didn't notice when I fixed
"all" such warnings before.
1995-03-28 07:58:53 +00:00
David Greenman
f57459b632 Removed third arg (vmio) to allocbuf() that was added with the original
merged cache changes, and figure it out based on the B_VMIO buffer flag.
Fixes a problem where delayed write VMIO buffers would sometimes get
recopied into kernel-alloced memory.

Submitted by:	John Dyson
1995-03-26 23:29:13 +00:00
David Greenman
edf8a81561 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
David Greenman
1b2cfc2645 Backed out change to panic call: As Chris just pointed out to me, panic()
does indeed work like printf(). gdb gets the string untranslated for some
reason.
1995-03-19 13:44:03 +00:00
David Greenman
1e1ece7deb Fix a call to panic: panic doesn't do token substitution on the panic
string.
1995-03-19 09:47:32 +00:00
David Greenman
4e83f749ec Don't sync the inode date changes of character special devices
during the FS sync. The system would appear to hang momentarily
if there was a large backlog of I/O. This is because the vnode
remains locked during the output - preventing normal character
I/O. The problem was exacerbated by the FFS contiguous block
allocation fixes and a semi-broken disksort(). The inode/date
will still be synced during a normal FS dismount and whenever
the inode is changed for other reasons.
1995-03-18 18:03:29 +00:00
David Greenman
0338878131 Woops, add back that #define...it's used later in the file. 1995-03-18 07:06:51 +00:00
David Greenman
9e4817309b Fixed comments and removed b_cylinder #define. 1995-03-18 06:38:04 +00:00
David Greenman
89247e0412 Integrated change from 1.1.5: Fixed broken disksort to sort by pblkno
rather than by cylinder.
1995-03-18 06:32:48 +00:00
Bruce Evans
b5e8ce9f12 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
Bruce Evans
ec00834c18 Finish the previous change. The device name got lost in diskerr(). 1995-03-12 08:17:30 +00:00
David Greenman
9a4bf98e66 Removed gratuitous and *extremely* evil setting of OBJ_INTERNAL. This
caused a cascade of problems including kernel memory corruption, file
corruption, system hangs, and panics.
1995-03-11 22:23:14 +00:00
David Greenman
07be9bd45f Increased default minfree to 8%. 1995-03-10 22:18:16 +00:00
David Greenman
e23c0ff5a0 The threshold for switching from time-space and space-time is too small
when minfree is 5%...so make it stay at space in this case.

Submitted by:	Kirk McKusick
1995-03-10 22:11:50 +00:00
David Greenman
57677027ac Patch to fix quota panic from Mike Karels:
allow Q_SYNC regardless of "target" uid, we allow it with -1;
fix bug that caused all ops to refer to user quotas, not group.

Submitted by:	Mike Karels
1995-03-10 22:06:39 +00:00
David Greenman
403ef252fa Removed obsolete vtrace() remnants. 1995-03-04 03:24:45 +00:00
David Greenman
22470903a0 Fixes from John Dyson to work around vnode lock hang. Basically, remove
the VOP_BMAP calls, and add one to bdwrite.

Submitted by:	John Dyson
1995-03-03 22:13:16 +00:00
Stefan Eßer
7368f324a8 Don't try to make use of useless rotational position optimisation,
if all free blocks are in the same bucket (i.e. NRPOS == 1).
Else a free block is choosen, possibly from a different cylinder,
even if the block succeeding bpref was free ...

Submitted by:	se
1995-02-27 17:43:57 +00:00
Bruce Evans
30ca037de1 Use dsname() to get consistent names. 1995-02-22 22:46:48 +00:00
Bruce Evans
de13c90ff2 Adjust slice names in diskerr() for the rearranged slice numbers. The
mapping from numbers to names is messy for backwards compatibility.
E.g., for driver "sd", unit "0":

slice 0: omit the slice number for compatibility; names are sd0[a-h].
slice 1: omit the partition letter 'c' because the whole disk device
         shouldn't have anything to do with partitions; sd0 is the
         only name.
slices 2-31: subtract 1 from slice number to compensate for the
         compatibility slice 0; names are sd0s[1-30][a-h].
1995-02-16 14:47:38 +00:00
Poul-Henning Kamp
d2fc53150b YF fix. 1995-02-14 06:14:28 +00:00
David Greenman
efc68ce10f Fixed bmap run-length brokeness.
Use bmap run-length extension when doing clustered paging.

Submitted by:	John Dyson
1995-02-03 06:46:28 +00:00
David Greenman
e5501f43a5 Removed some unused/obsolete code.
Submitted by:	John Dyson
1995-01-24 10:02:00 +00:00
David Greenman
0d94caffca These changes embody the support of the fully coherent merged VM buffer cache,
much higher filesystem I/O performance, and much better paging performance. It
represents the culmination of over 6 months of R&D.

The majority of the merged VM/cache work is by John Dyson.

The following highlights the most significant changes. Additionally, there are
(mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to
support the new VM/buffer scheme.

vfs_bio.c:
Significant rewrite of most of vfs_bio to support the merged VM buffer cache
scheme.  The scheme is almost fully compatible with the old filesystem
interface.  Significant improvement in the number of opportunities for write
clustering.

vfs_cluster.c, vfs_subr.c
Upgrade and performance enhancements in vfs layer code to support merged
VM/buffer cache.  Fixup of vfs_cluster to eliminate the bogus pagemove stuff.

vm_object.c:
Yet more improvements in the collapse code.  Elimination of some windows that
can cause list corruption.

vm_pageout.c:
Fixed it, it really works better now.  Somehow in 2.0, some "enhancements"
broke the code.  This code has been reworked from the ground-up.

vm_fault.c, vm_page.c, pmap.c, vm_object.c
Support for small-block filesystems with merged VM/buffer cache scheme.

pmap.c vm_map.c
Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of
kernel PTs.

vm_glue.c
Much simpler and more effective swapping code.  No more gratuitous swapping.

proc.h
Fixed the problem that the p_lock flag was not being cleared on a fork.

swap_pager.c, vnode_pager.c
Removal of old vfs_bio cruft to support the past pseudo-coherency.  Now the
code doesn't need it anymore.

machdep.c
Changes to better support the parameter values for the merged VM/buffer cache
scheme.

machdep.c, kern_exec.c, vm_glue.c
Implemented a seperate submap for temporary exec string space and another one
to contain process upages. This eliminates all map fragmentation problems
that previously existed.

ffs_inode.c, ufs_inode.c, ufs_readwrite.c
Changes for merged VM/buffer cache.  Add "bypass" support for sneaking in on
busy buffers.

Submitted by:	John Dyson and David Greenman
1995-01-09 16:06:02 +00:00
Justin T. Gibbs
61acca9f2f Change panic messges that are ffs_blah functions to say they are ffs not
ufs functions.
1995-01-04 23:48:04 +00:00
Justin T. Gibbs
1a451e33ef LFS stability patches. There is still a problem with directory update
ordering that can prove fatal during large batches of deletes, but this
is much better than it was.  I probably won't be putting much more time
into this until Seltzer releases her new version of LFS which has
fragment support.  This should be availible just before USENIX.
1995-01-04 23:46:34 +00:00
Bruce Evans
59f08b8ba7 Use the same current time throughout ffs_update().
Update some macro names in comments.

Don't use MNT_WAIT for something not related to mounting.
1994-12-27 14:44:42 +00:00
Bruce Evans
e4bebee03e Use the same current time throughout ITIMES(). I want all current
timestamps for an atomic operation such as rename() on a local file
system to be identical.

Uniformize yet another idempotency ifdef.  The comment nesting was
bogus.
1994-12-27 13:59:14 +00:00
Bruce Evans
222d875bec Print `slicename' and not a bogus pointer in diskerr() 1994-12-22 04:42:31 +00:00
Bruce Evans
fb72042b5c Duplicate readdisklabel() and writedisklabel() and remove DOS stuff from
from the copies to create correct_readdisklabel() and
correct_writedisklabel().

Print the slice number in diskerr() if it is nonzero.
1994-12-16 16:31:23 +00:00
Bruce Evans
3339943545 Submitted by: Kirk McKusick
Allow chown() to return success if the gid isn't changed even if
the gid is not the caller's.  Such gids are normal for files created
in world-writable directories sucj as /tmp.  This "fixes" annoying
error messages for mv'ing files created in /tmp to another file
system.  mv still preserves the foreign gid of /tmp, but now does
it silently.
1994-11-26 19:38:30 +00:00
Justin T. Gibbs
471e5fa096 John Dyson's patches (and a few from me too) to LFS to use a different
buffering scheme and make it more in tune with FreeBSD's vfs_bio
implementation.  The filesystem seems fairly stable, but I wouldn't recommend
it to anyone not willing to experience problems.  This is very green code and
has the limitation that YOU CAN ONLY HAVE ONE LFS PARTITION MOUNTED AT A TIME.

What LFS is good for:

	Non fsynced writes	FASTER THAN FFS
	Large deletions		Increadibly fast

Reads are a little bit slower than FFS right now, but that is a factor of
how under optimized this code is.  LFS should in theory perform at least as
well as FFS under fsync (iozone) type loads, and this is what I'm currently
working on.

Reviewed by:	Justin Gibbs
Submitted by:	John Dyson
Obtained from:
1994-11-17 01:30:53 +00:00
Bruce Evans
ad7dee4d66 Remove unused `struct disklabel' (the declarations that used it went away).
Uniformize idempotency ifdef.
1994-11-14 13:50:15 +00:00
Bruce Evans
36633bf49d Undo a previous change. <sys/disklabel.h> was broken, not these files. 1994-11-14 13:22:52 +00:00
Jordan K. Hubbard
94a92413cd From: fredriks@mcs.com (Lars Fredriksen)
...
It turns out that these files do not include <sys/dkbad.h> before
<sys/disklabel.h>.
Submitted by:	fredriks
1994-10-28 12:42:05 +00:00
Jordan K. Hubbard
54c7241bd3 Julian Elischer's disklabel fixes. 1994-10-27 20:45:13 +00:00
David Greenman
901ba606c5 Restrict fs_maxfilesize to 2^40, and check against this in ffs_truncate().
This is part of a bug fix from Kirk McKusick to work around problems in FFS
related to the blkno of a 64bit offset not fitting into an int. Note the
proper solution would be to deal with 64bit block numbers, but doing this
would require sweeping changes; some other day perhaps.

Submitted by:	Marshall Kirk McKusick
1994-10-22 02:27:35 +00:00
Garrett Wollman
091b0456f4 Make my ALLDEVS kernel compile (basically, LINT minus a lot of options).
This involves fixing a few things I broke last time.
1994-10-21 01:19:28 +00:00
Poul-Henning Kamp
1be9232f73 This basically allows you to stick a disklabel on any partition.
For it to be useful, you must stick your disklabel on the partition which
starts where the MBR says FreeBSD lives.  If you don't do that, you might
get a bad day.

Oh, that probably also means that putting swap there is a bad idea...
1994-10-17 02:31:33 +00:00
Andrey A. Chernov
ffcef9bdf8 Add back variable declaration removed by wrong previous cleanups 1994-10-15 04:14:23 +00:00
Andrey A. Chernov
2fe5b4cb4e Add back variable declaration removed by wrong prevous cleanups. 1994-10-15 04:08:44 +00:00
Poul-Henning Kamp
c1d9efcbb9 Cosmetics. make gcc less noisy. Still some way to go here. 1994-10-10 01:04:55 +00:00
David Greenman
35c10d2239 Got rid of map.h. It's a leftover from the rmap code, and we use rlists.
Changed swapmap into swaplist.
1994-10-09 07:35:18 +00:00
Poul-Henning Kamp
0f954e5d09 POSSIBLE BOGUS CODE found, (related to dos-partitions) in ufs_disksubr.c,
look for CC_WALL.
Cosmetics, a couple of unused vars.
1994-10-08 06:57:29 +00:00
Poul-Henning Kamp
c96716023b Cosmetics for gcc -Wall. A couple of unused "int i"'s removed and a couple of
prototypes added.  And the usual () work.
1994-10-08 06:20:06 +00:00
Poul-Henning Kamp
5c0c90e877 Cosmetics. 1994-10-08 01:41:15 +00:00
David Greenman
824789192c Use tsleep() rather than sleep so that 'ps' is more informative about
the wait.
1994-10-06 21:07:04 +00:00
Doug Rabson
9abf4d6ee0 Make NFS ask the filesystems for directory cookies instead of making them
itself.
1994-09-28 16:45:22 +00:00
Poul-Henning Kamp
3810319894 Moved the "relookup" routine into vfs_lookup.c from ufs/ufs/ufs_vnops.c.
Several FS's use this, so it doesn't belong in ufs.  (unionfs, msdosfs and ufs)
1994-09-27 20:33:41 +00:00
David Greenman
c770b47d56 Removed unimplemented subr_rmap.c and unused references to it. 1994-09-25 22:31:11 +00:00