Commit Graph

104518 Commits

Author SHA1 Message Date
rwatson
7f31e63415 In the BPF and ethernet bridging code, don't allow callouts to execute
without Giant if we're not debug.mpsafenet=1.
2004-07-05 16:28:31 +00:00
des
19bffaa4e2 Additional preemptive unsigned -> signed casts. 2004-07-05 14:55:58 +00:00
des
8df6332425 ki_pctcpu is unsigned, so we cast to long before subtracting. 2004-07-05 14:52:06 +00:00
des
7540ed5e1b Unhealthy amount of manual code cleanup. Some long lines still remain. 2004-07-05 14:45:57 +00:00
pjd
b951d5938e g_clone_bio() can fail, be ready for this.
Approved by:	le
2004-07-05 13:24:22 +00:00
tjr
a6440b3288 Add support for multibyte characters. 2004-07-05 13:20:03 +00:00
des
3c179b6bbe Apply consistent indentation. Long lines will be fixed in a separate
commit.
2004-07-05 13:12:16 +00:00
des
80c98eacb8 Protoize. 2004-07-05 13:03:35 +00:00
des
4baad12ab0 Sort out the #include mess. In particular, do not #include "os.h", since
all it does is provide broken prototypes for standard library functions.
2004-07-05 12:58:47 +00:00
des
8dc9140ae0 Mechanical whitespace cleanup. 2004-07-05 12:51:35 +00:00
des
9a0e55da26 My previous commit fixed uid filtering, but broke io mode. Unravel the
process filtering logic to prevent this from happening again.
2004-07-05 12:48:17 +00:00
tjr
3c6fc2a521 Fix handling of multibyte delimiter characters with the -t option. 2004-07-05 12:40:31 +00:00
des
d93a14bb3f Fix selecting processes by uid, which was broken in the previous commit. 2004-07-05 12:22:50 +00:00
des
541c3c8b8b Correct a misleading (cut'n'pasted) comment. 2004-07-05 12:19:53 +00:00
des
2220967d8b Truncate long file names in stat_display(), as was originally intended.
MFC after:	1 week
2004-07-05 11:21:50 +00:00
des
e9bdc432d9 Make libalias WARNS?=6-clean. This mostly involves renaming variables
named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing
signed / unsigned comparisons, and shoving unused function arguments
under the carpet.

I was hoping WARNS?=6 might reveal more serious problems, and perhaps
the source of the -O2 breakage, but found no smoking gun.
2004-07-05 11:10:57 +00:00
des
1421b18004 Parenthesize return values. 2004-07-05 10:55:23 +00:00
des
b3e7157564 Mechanical whitespace cleanup. 2004-07-05 10:53:28 +00:00
ru
a8b553c713 Markup fixes. 2004-07-05 07:21:55 +00:00
ru
d8db898112 Markup fixes. 2004-07-05 06:59:17 +00:00
ru
d8dfd1146a Markup fixes. 2004-07-05 06:53:34 +00:00
ru
df2af25f5d Markup nits. 2004-07-05 06:39:03 +00:00
bms
abd96c3dcf Locking cleanup for rl(4).
- Eliminate the use of a recursive mutex.
 - Mark the driver INTR_MPSAFE.

This work is incomplete and will be refined in a future commit.
 - Most notably, _locked() variants of entry points need to be introduced.
 - The mii upcall/downcall may still be racy.
 - Add a stubbed-out guard against racing rl_detach() for the time being.

Tested on:	UP, debug.mpsafenet && !debug.mpsafenet
Reviewed by:	silence on -net
2004-07-05 02:51:32 +00:00
bms
969da655b8 style(9) and whitespace cleanup.
Use C99 types. Use ANSI function definitions. Sort prototypes.
Split long lines correctly. Punctuate/wordsmith comments.
Use device_printf()/if_printf() where possible.

Reviewed by:	-net (silence)
2004-07-05 02:46:42 +00:00
bms
c14613165e Reintroduce and clean up locking in xl(4).
- Eliminate the use of a recursive mutex.
 - Mark the driver as INTR_MPSAFE.
 - Split the default media choice code out into xl_choose_media() to
   avoid making poor assumptions about the state of the lock during attach.
 - The miibus upcall/downcall paths may still be racy.
   Change to commented-out locking assertions there for now.
 - Tested with nfsclient, routed, ssh, ntp, dhclient and quagga bgpd.
 - This needs SMP test coverage. I do not have such resources.

Tested on:	UP, !debug.mpsafenet && debug.mpsafenet
Hardware:	3C905B-TX (0x905510b7)
2004-07-05 02:34:35 +00:00
pjd
2640f71eaf MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there. 2004-07-05 02:06:44 +00:00
truckman
e5660cf5be Rework syncer termination code:
Speed up the syncer when shutting down by sleeping for a shorter
    period of time instead of cranking up rushjob and using the
    normal one second sleep.

    Skip empty worklist slots when shutting down to avoid lengthy
    intervals of inactivity.

    Give I/O more time to complete between steps by not speeding the
    syncer quite as much.

    Terminate the syncer after one full pass through the worklist
    plus one second with the worklist containing nothing but syncer
    vnodes.

    Print an indication of shutdown progress to the console.

Add a sysctl, vfs.worklist_len, to allow the size of the syncer worklist
to be monitored.
2004-07-05 01:07:33 +00:00
bms
1d6488a23b Use if_printf() and device_printf() where appropriate, i.e.:
- Use device_printf() during device probe/attach.
 - Move if_xname initialization to before xl_reset() is called.
 - Use if_printf() at all other times after struct ifnet has been
   initialized.
2004-07-05 00:15:23 +00:00
bms
5314858731 ANSIfy function definitions.
Remove unnecessary return keywords.
Other minor stylistic changes.
2004-07-04 23:31:28 +00:00
phk
f909f2fe3b Mark our interrupt shareable and don't insist on DMA. This gets us closer
to working with a secondary floppy controller on a PC.
2004-07-04 23:16:04 +00:00
phk
60e92d131a Give synthetic root filesystem device vnodes a v_bsize of DEV_BSIZE. 2004-07-04 22:33:22 +00:00
bms
6d6fe5f2fb Fix whitespace, indentation, long line wrapping and comments. 2004-07-04 22:20:52 +00:00
bms
a655d45529 Fix whitespace and comments. 2004-07-04 22:19:50 +00:00
ru
def6ef4b52 Fixed cross-references in SEE ALSO.
Emininated double space and hard sentence breaks.
2004-07-04 21:15:37 +00:00
ru
4b40b7afb0 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
alfred
11595d6a47 Pass the operation in with the fsidctl.
Remove some fsidctls that we will not be using.
Correct prototypes for fs sysctls.
2004-07-04 20:21:58 +00:00
cperciva
2d9ac95b38 Add commentary explaining why we return EBADF upon attempts to fflush() a
read-only file.

Discussed on:	-current
2004-07-04 20:17:00 +00:00
cperciva
0609fe923f Fix dofsync() declaration.
Pointed out by:	dwmalone
2004-07-04 19:52:48 +00:00
phk
3da00d1ed4 Make the last commit handle non-phk root devices better. 2004-07-04 19:42:25 +00:00
cperciva
9ceaed5e9f Where syslogd would have fsync()ed a file in the past, instead set a flag
FFLAG_NEEDSYNC and fsync the file when select() next returns zero.  This
dramatically speeds up the process of logging large amounts of data, while
leaving the essential semantics (that data can be expected to be on disk
if we crash) unchanged.

In my tests, this speeds up the rc phase of booting by 18-20%. [1]

YES PLEASE! by:	phk [1]
2004-07-04 19:13:58 +00:00
marcel
d2941c8f85 Record the offset of thr_id in the thread structure. Required for
debugging.
2004-07-04 19:07:07 +00:00
bms
7921747f3c Check the return value of bus_dmamem_alloc() correctly.
Submitted by:	Darron Broad (with cleanups)
2004-07-04 18:40:36 +00:00
bms
ccba1d2d8d Workaround a locking problem in vlan(4). vlan_setmulti() may be called
with sleepable locks held from further up in the network stack, and
attempts to allocate memory to hold multicast group membership information
with M_WAITOK.

This panic was triggered specifically when an exiting routing daemon
process closes its raw sockets after joining multicast groups on them.

While we're here, comment some possible locking badness.

PR:	kern/48560
2004-07-04 18:32:54 +00:00
kientzle
a1ffa6b161 Yet another pointy hat: When restoring file flags, it's okay to use the
shared stat buffer, but don't try to access it through an uninitialized
pointer.
2004-07-04 18:28:56 +00:00
kientzle
70dac6d643 Pass the pointy hat, please:
All of --help should go to stdout, not some to stdout and some to stderr.
2004-07-04 18:13:01 +00:00
bms
0c1894fb23 Add documentation for the ieee80211_node.c functions.
Submitted by:	Darron Broad
2004-07-04 18:07:58 +00:00
sobomax
8421d59499 Nothing says that /var/log can't be not a directory but a symbolic link
to a directory. Therefore, use stat(2) instead of lstat(2) to check if
/var/log exists.

MFC after:	7 days
2004-07-04 17:24:12 +00:00
bms
1d049a1f69 style(9)/whitespace cleanup while I'm in this file. 2004-07-04 16:43:24 +00:00
phk
c622a4d75b Add modemcontrol support for DTR and DCD.
Tested by:	ambrisko
2004-07-04 16:27:58 +00:00
tjr
d5d8ff4136 Fix bug causing `[' to be wrongly included in character class expressions
in some multibyte locales (Red Hat bug #108484).

Obtained from:	Fedora (Tim Waugh)
2004-07-04 16:25:41 +00:00