Commit Graph

173 Commits

Author SHA1 Message Date
bde
ff2cd60993 Fixed a bogus include pathname which broke compiling in an obj directory. 1999-08-07 13:11:12 +00:00
bde
1d0b5e51f7 Fixed syntax errors. Code should be tested before committing it, or at
least before enabling it in LINT and merging it into RELENG_3.
1999-08-07 13:09:30 +00:00
phk
23d029e51d Better way to circumvent the boot problem on older versions.
Submitted by:	Larry Baird <lab@gta.com>
1999-08-06 17:06:49 +00:00
phk
dcd4c3ba16 Add driver support for M-systems DiskOnChip Products.
Sponsored by:	M-systems Inc.	http://www.m-sys.com
1999-08-06 15:59:07 +00:00
des
284ed27f44 Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
lile
f6f795d98a Update to latest version of PowerMACH Works from Olicom. 1999-07-05 17:47:50 +00:00
mckusick
7151ad3643 No longer need to set B_ASYNC flag since BUF_KERNPROC now
unconditionally sets the identity of the buffer.
1999-06-29 15:57:40 +00:00
peter
b5d1061c97 Keep the inlines for <sys/buf.h> happy.. 1999-06-27 13:26:23 +00:00
mckusick
cc86997b99 Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.
1999-06-26 02:47:16 +00:00
green
de23b5e30a Add RCS strings to kernel ipfilter files. 1999-06-19 11:35:41 +00:00
mckusick
7c68e9b5c4 Add a vnode argument to VOP_BWRITE to get rid of the last vnode
operator special case. Delete special case code from vnode_if.sh,
vnode_if.src, umap_vnops.c, and null_vnops.c.
1999-06-16 23:27:55 +00:00
mckusick
f3746e495b Get rid of the global variable rushjob and replace it with a function in
kern/vfs_subr.c named speedup_syncer() which handles the speedup request.
Change the various clients of rushjob to use the new function.
1999-06-15 23:37:29 +00:00
julian
284c90ec6d Cosmetic changes to make it compile without errors in gcc -Wall 1999-05-22 04:43:04 +00:00
mckusick
04cee7c227 Add a hook to ffs_fsync to allow soft updates to get first chance at doing
a sync on the block device for the filesystem. That allows it to push the
bitmap blocks before the inode blocks which greatly reduces the number of
inode rollbacks that need to be done.
1999-05-14 01:26:46 +00:00
mckusick
06d92ae45f Put back changes that might be causing trouble on Alpha. 1999-05-09 19:39:54 +00:00
peter
970b6faae9 Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it.  Driver writers can do
this if it's not defined.  (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)
1999-05-09 17:07:30 +00:00
mckusick
c8d57b6289 Whitespace cleanup. 1999-05-07 05:21:16 +00:00
mckusick
3e9638ef1f Get rid of random debugging cruft; sync up with latest version. 1999-05-07 05:11:31 +00:00
mckusick
dfd46d845f Severe slowdowns have been reported when creating or removing many
files at once on a filesystem running soft updates. The root of
the problem is that soft updates limits the amount of memory that
may be allocated to dependency structures so as to avoid hogging
kernel memory. The original algorithm just waited for the disk I/O
to catch up and reduce the number of dependencies. This new code
takes a much more aggressive approach. Basically there are two
resources that routinely hit the limit. Inode dependencies during
periods with a high file creation rate and file and block removal
dependencies during periods with a high file removal rate. I have
attacked these problems from two fronts. When the inode dependency
limits are reached, I pick a random inode dependency, UFS_UPDATE
it together with all the other dirty inodes contained within its
disk block and then write that disk block. This trick usually
clears 5-50 inode dependencies in a single disk I/O. For block and
file removal dependencies, I pick a random directory page that has
at least one remove pending and VOP_FSYNC its directory. That
releases all its removal dependencies to the work queue. To further
hasten things along, I also immediately start the work queue process
rather than waiting for its next one second scheduled run.
1999-05-07 02:26:47 +00:00
peter
729ca8a773 Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.
1999-04-24 20:24:02 +00:00
peter
619eff0496 As I understand it, these register_intr()'s shouldn't be here. The isa
driver attaches the interupt itself.
1999-04-21 07:02:19 +00:00
julian
971949c6a2 Need to include /contrib/dev/oltr/... not dev/oltr/... 1999-03-10 17:45:26 +00:00
julian
01ac04537d Submitted by: Larry Lile
Move the Olicom token ring driver to the officially sanctionned location of
/sys/contrib. Also fix some brokenness in the generic token ring support.

Be warned that if_dl.h has been changed and SOME programs might
like recompilation.
1999-03-10 10:11:43 +00:00
mckusick
a33170aeb3 Reorganize locking to avoid holding the lock during calls to bdwrite
and brelse (which may sleep in some systems).

Obtained from:	Matthew Dillon <dillon@apollo.backplane.com>
1999-03-02 06:38:07 +00:00
mckusick
6932da536e Ensure that softdep_sync_metadata can handle bmsafemap and mkdir entries
if they ever arise (which should not happen as softdep_sync_metadata is
currently used).
1999-03-02 00:19:47 +00:00
mckusick
9a94f31915 fix double LIST_REMOVE; other cosmetic changes to match version 9.32.
Obtained from: Jeffrey Hsu <hsu@FreeBSD.ORG>
1999-02-17 20:01:20 +00:00
dillon
1e80df272f Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 22:42:27 +00:00
dg
b2ee04d692 Gutted softdep_deallocate_dependencies and replaced it with a panic. It
turns out to not be useful to unwind the dependencies and continue in
the face of a fatal error.
Also changed the log() to a printf() in softdep_error() so that it will
be output in the case of a impending panic.
Submitted by:	Kirk McKusick <mckusick@mckusick.com>
1999-01-22 09:07:32 +00:00
bde
620faec4dc Don't pass unused unused timestamp args to UFS_UPDATE() or waste
time initializing them.  This almost finishes centralizing (in-core)
timestamp updates in ufs_itimes().
1999-01-07 16:14:19 +00:00
bde
6b4cb42fc5 UFS_UPDATE() takes a boolean `waitfor' arg, so don't pass it the value
MNT_WAIT when we mean boolean `true' or check for that value not being
passed.  There was no problem in practice because MNT_WAIT had the
magic value of 1.
1999-01-06 18:18:06 +00:00
julian
4252a29a60 Remove some compiler warnings. 1998-12-10 20:11:47 +00:00
archie
84bd80a4f9 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
archie
dcdc1187e3 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
eivind
5a7826c415 Staticize some more. 1998-11-26 18:54:52 +00:00
peter
28edd064e3 Change dirty block list handling to use TAILQ macros. 1998-10-31 15:33:32 +00:00
jkh
f9d5811600 Clarify a rather ambiguous debugging message. 1998-10-28 10:37:54 +00:00
nate
0704380261 Fix 'noatime' bug that was unrelated to use of noatime.
The problem is caused when a directory block is compacted.  When this
occurs, softdep_change_directoryentry_offset() is called to relocate each
directory entry and adjust its matching diradd structure, if any, to match
the new location of the entry.  The bug is that while
softdep_change_directoryentry_offset() correctly adjusts the offsets of
the diradd structures on the pd_diraddhd[] lists (which are not yet ready
to be committed to disk), it fails to adjust the offsets of the diradd
structures on the pd_pendinghd list (which are ready to be committed to
disk).  This causes the dependency structures to be inconsistent with
the buf contents.  Now, if the compaction has moved a directory entry to
the same offset as one of the diradd structures on the pd_pendinghd list
*and* a syscall is done that tries to remove this directory entry before
this directory block has been written to disk (which would empty
pd_pendinghd), a sanity check in newdirrem() will call panic() when it
notices that the inode number in the entry that it is to be removed doesn't
match the inode number in the diradd structure with that offset of that
entry.

Reviewed by:	Kirk McKusick <mckusick@McKusick.COM>
Submitted by:	Don Lewis <Don.Lewis@tsc.tdk.com>
1998-10-03 19:17:11 +00:00
luoqi
011a265214 Eliminate a race in VOP_FSYNC() when softupdates is enabled.
Submitted by:	Kirk McKusick	<mckusick@McKusick.COM>
Two minor changes are also included,
1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set,
   vn_lock should always succeed in these cases.
2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount
   a little more unstable. It also keeps us in sync with other BSDs.
Suggested by:	Bruce Evans	<bde@zeta.org.au>
1998-09-24 15:02:46 +00:00
bde
6a16d85af1 Made some disgusting ifdefs even more disgusting to enable the support
for `u_long cmd' ioctl args if __FreeBSD_version >= 300003.  Some ioctls
were broken on machines with 32-bit ints and 64-bit longs.
1998-08-15 21:51:53 +00:00
julian
e8b1f3cb31 Handle the case of moving a directory onto the top of a sibling's
child of the same name.

Submitted by:	Kirk Mckusick with fixes from luoqi Chen
Obtained from:   Whistle test tree.
1998-08-12 20:46:47 +00:00
peter
47998d00bc Merge ipfilter 3.2.3 -> 3.2.7 changes onto mainline. 1998-06-20 18:37:51 +00:00
peter
a555f4e059 This commit was generated by cvs2svn to compensate for changes in r37071,
which included commits to RCS files with non-trunk default branches.
1998-06-20 18:18:05 +00:00
peter
58a6b13b40 Import ipfilter 3.2.7 kernel components 1998-06-20 18:18:05 +00:00
julian
7618cf95f3 Note which version of Kirk's sources this corresponds to. 1998-06-12 21:21:26 +00:00
julian
83d0c40d08 Fix the case when renaming to a file that you've just created and deleted,
that had an inode that has not yet been written to disk, when the inode of the
new file is also not yet written to disk, and your old directory entry is not
yet on disk but you need to remove it and the new name exists in memory
but has been deleted but the transaction to write the deleted name to disk
exists and has not yet been cancelled by the request to delete the non
existant name.  I don't know how kirk could have missed such a glaring
problem for so long. :-) Especially since the inconsitency survived on
the disk for a whole 4 second on average before being fixed by other code.
This was not a crashing bug but just led to filesystem inconsitencies
if you crashed.

Submitted by: Kirk McKusick (mckusick@mckusick.com)
1998-06-12 20:48:30 +00:00
julian
9ab92044d4 Add B_NOCACHE to several cases where BSD4.4 only required a B_INVAL.
Change worked out by john and kirk in consort.
1998-06-11 17:44:32 +00:00
julian
1e472dc252 Fix for "live inode" panic.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Reviewed by: yeah right...
1998-06-10 20:45:46 +00:00
julian
c16287759e Remove buggy debugging code. 1998-06-10 20:03:16 +00:00
bde
2fe18afefc Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
bde
2974de2572 ip_fil.h has 9 separate declarations of iplioctl() in a disgusting
ifdef tangle.  The previous commit to ip_fil.h didn't change the
one that actually applies to the current FreeBSD kernel, of course.
Fixed.

Fixed style bugs in previous commit to ip_fil.h.
1998-06-08 06:04:12 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
julian
231adce91d Add a reference to the Ganger/Patt paper 1998-06-02 01:27:27 +00:00
julian
6cb609db70 A fix to a debug test from Kirk. 1998-05-27 03:32:23 +00:00
julian
1d370e5321 Bring up-to-date with Whistle's current version
Includes some debugging code.
1998-05-19 23:07:25 +00:00
julian
1aca5b515a Merge with Kirk's version as of Feb 20
His version 9.23 == our version 1.5 of ffs_softdep.c
His version 9.5 ==  our version 1.4 of softdep.c
1998-05-19 22:54:53 +00:00
julian
775d9bc55b Merge in Kirk's changes to stop softupdates from hogging all of memory. 1998-05-19 21:45:53 +00:00
julian
03438335f7 Change to stop a silly panic. This should be understood better.
Change a buffer swizzle trick to a bcopy. It would be nice if the efficient
trick could be used in the future.
1998-05-19 20:50:41 +00:00
julian
294f018f94 First published FreeBSD version of soft updates Feb 5. 1998-05-19 20:18:42 +00:00
julian
59d05b8498 This commit was generated by cvs2svn to compensate for changes in r36206,
which included commits to RCS files with non-trunk default branches.
1998-05-19 20:03:29 +00:00
julian
cf933b4671 Import the next version received from kirk after some
FreeBSD feedback.
1998-05-19 20:03:29 +00:00
julian
e12c18397d This commit was generated by cvs2svn to compensate for changes in r36201,
which included commits to RCS files with non-trunk default branches.
1998-05-19 19:47:22 +00:00
julian
49095e88f1 Import the earliest version of the soft update code that I have. 1998-05-19 19:47:22 +00:00
phk
d635529ea0 Use read_random() 1998-04-06 11:40:42 +00:00
peter
6f6743c093 allow open on all minors 1998-03-27 18:03:13 +00:00
peter
919c54ef2f Make it compile.. missing "opt_ipfilter.h" and missing <sys/malloc.h> 1998-03-21 14:42:45 +00:00
peter
a4f5a0656c Some patchups for when this code is compiled in userland (!). 1998-03-21 13:37:44 +00:00
peter
f29f1bbca3 Make this compile.. There are some unpleasing hacks in here.
A major unifdef session is sorely tempting but would destroy any remaining
chance of tracking the original sources.
1998-03-21 11:34:28 +00:00
peter
d0b95c10ff Import kernel parts of ipfilter v3.2.3 1998-03-21 10:11:54 +00:00
peter
4b965aa581 Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
darrenr
31b14cdfce Import version 3.2alpha7 1997-05-25 15:50:46 +00:00
darrenr
021f0bfee7 Really import sys/netinet changes for IP Filter 3.2alpha4 this time. 1997-04-03 10:39:35 +00:00
peter
4c6cc15963 Import ipfilter 3.1.8 kernel components 1997-03-02 15:50:35 +00:00
peter
89e688499d Replacement import of ipfilter 3.1.7 components used in kernel.
(This is to repair the vendor branching)
1997-03-02 15:49:41 +00:00