]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoo Test truncate(2) on fifo: it should ignore the request and
maxim [Mon, 29 May 2006 10:56:27 +0000 (10:56 +0000)]
o Test truncate(2) on fifo: it should ignore the request and
return success.

PR: kern/98064
Submitted by: Kirk Russell

18 years agoMFalpha/amd64/arm/ia64
alc [Mon, 29 May 2006 06:12:01 +0000 (06:12 +0000)]
MFalpha/amd64/arm/ia64
 Retire pmap_track_modified().  We no longer need it because we do not
 create managed mappings within the clean submap.  To prevent regressions,
 add assertions blocking the creation of managed mappings within the clean
 submap.

18 years agoUnexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY(foo).
delphij [Mon, 29 May 2006 05:43:26 +0000 (05:43 +0000)]
Unexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY(foo).

18 years agoBackout changes trying to inherit floating-point environment, although
davidxu [Mon, 29 May 2006 02:58:37 +0000 (02:58 +0000)]
Backout changes trying to inherit floating-point environment, although
POSIX (susv3) requires this, but it is unclear what should be inherited,
duplicating whole 387 stack for new thread seems to be unnecessary and
dangerous. Revert to previous code, force a new thread to be started with
clean FP state.

18 years agoIf a zero-length bulk or interrupt transfer is requested then assume
iedowse [Sun, 28 May 2006 23:37:04 +0000 (23:37 +0000)]
If a zero-length bulk or interrupt transfer is requested then assume
USBD_FORCE_SHORT_XFER to ensure that we actually build and execute
a transfer. This means that the various alloc_sqtd_chain functions
will always construct a transfer, so it is safe to modify the
allocated descriptors on return. Previously there were cases where
a zero length transfer would cause a NULL dereference.

Reported by: bp

18 years agoRemove incorrect null_checkexp() routine. This
rodrigc [Sun, 28 May 2006 22:45:52 +0000 (22:45 +0000)]
Remove incorrect null_checkexp() routine.  This
will allow the NFS server to call vfs_stdcheckexp() on the exported nullfs
filesystem, not the underlying filesystem being nullfs mounted.
If the lower filesystem was not NFS exported, then the NFS exported
null filesystem would not work.

Pointed out by: scottl
PR: kern/87906
MFC after: 1 week

18 years agoCorrect typos
kris [Sun, 28 May 2006 22:15:28 +0000 (22:15 +0000)]
Correct typos

MFC after: 2 weeks

18 years agoBack out the BUS_DMA_ALLOCNOW change from rev 1.39. Scottl informed me that
silby [Sun, 28 May 2006 20:35:39 +0000 (20:35 +0000)]
Back out the BUS_DMA_ALLOCNOW change from rev 1.39.  Scottl informed me that
it's unnecessary, as the TX/RX lists are static allocations.

18 years agoModify MNT_UPDATE behavior for nullfs so that it does not
rodrigc [Sun, 28 May 2006 20:09:18 +0000 (20:09 +0000)]
Modify MNT_UPDATE behavior for nullfs so that it does not
return EOPNOTSUPP if an "export" parameter was passed in.
This should allow nullfs mounts to be NFS exported.

PR: kern/87906
MFC after: 1 week

18 years agoAvoid unwanted sign extension of indexed byte load in bpf code.
dwmalone [Sun, 28 May 2006 20:00:02 +0000 (20:00 +0000)]
Avoid unwanted sign extension of indexed byte load in bpf code.

PR: 89748
Submitted by: Guy Harris <guy@alum.mit.edu>
Obtained from: NetBSD via OpenBSD
MFC after: 2 weeks

18 years agoDo not log "can't delete export" messages if nmount() returns ENOTSUP.
rodrigc [Sun, 28 May 2006 18:59:28 +0000 (18:59 +0000)]
Do not log "can't delete export" messages if nmount() returns ENOTSUP.
This eliminates spurious log entries for trying to delete exports
for filesystems like devfs and procfs.

18 years agoRe-revert back to rev 1.8:
silby [Sun, 28 May 2006 18:44:39 +0000 (18:44 +0000)]
Re-revert back to rev 1.8:

- Reduce the number of RX and TX buffers bfe uses so that it does not use more
  bounce buffers than busdma is willing to allow it to use

See if_bfe.c for comments on why this is now safe to do.

18 years agodocument that I'm still maintaining kqueue and want to review commits to
jmg [Sun, 28 May 2006 18:42:59 +0000 (18:42 +0000)]
document that I'm still maintaining kqueue and want to review commits to
it before they hit the tree...

18 years ago1. Make sure that the TX and RX descriptor rings are 4096 byte aligned.
silby [Sun, 28 May 2006 18:41:47 +0000 (18:41 +0000)]
1.  Make sure that the TX and RX descriptor rings are 4096 byte aligned.
    Also use BUS_DMA_ALLOCNOW to be on the safe side.

2.  Look for the Descriptor Error, and Descriptor Protocol Error flags from
    the card, and down the interface if we detect either.

#1 (along with fixes to busdma) makes sure that this card works in all
memory situations.  Prior to this change, it was just luck that 512 count
RX/TX lists were properly aligned.  Now we can use any size of RX/TX lists
and still have them properly aligned.

#2 ensures that we don't get into an endless interrupt storm if busdma fails
us.  Descriptor Protocol Error would occur if we misaligned the TX/RX rings,
and Descriptor Error would occur if we tried to give the card descriptors
or rings with addresses > 1G.  Trying to reinitialize the card isn't going
to fix these errors, hence we don't try.

18 years agoMFi386 rev 1.78:
silby [Sun, 28 May 2006 18:31:32 +0000 (18:31 +0000)]
MFi386 rev 1.78:

Add a quick hack to ensure that bus_dmamem_alloc properly aligns
small allocations with large alignment requirements.

Add a panic to detect cases where we've still failed to properly align.

18 years agoAdd a quick hack to ensure that bus_dmamem_alloc properly aligns
silby [Sun, 28 May 2006 18:30:36 +0000 (18:30 +0000)]
Add a quick hack to ensure that bus_dmamem_alloc properly aligns
small allocations with large alignment requirements.

Add a panic to detect cases where we've still failed to properly align.

18 years agoAdd a disclaimer regarding public/internal functions to every subsystem for
netchild [Sun, 28 May 2006 15:25:18 +0000 (15:25 +0000)]
Add a disclaimer regarding public/internal functions to every subsystem for
now.

Discussed on: cvs-all
Helped with the wording: "Ben Kaduk" <minimarmot@gmail.com>

18 years agoUse a more appropriate printf format for size_t.
netchild [Sun, 28 May 2006 14:07:47 +0000 (14:07 +0000)]
Use a more appropriate printf format for size_t.

This should unbreak the tinderbox build (64bit architectures).

18 years agoPrint the euid after the gid as demanded by POSIX.
stefanf [Sun, 28 May 2006 12:32:30 +0000 (12:32 +0000)]
Print the euid after the gid as demanded by POSIX.

Submitted by: Martin Nagy <nagy.martin@gmail.com>
PR: 96239
MFC after: 2 weeks

18 years agoRevert 1.73, since mounting devfs without a devfs ruleset inside a
simon [Sun, 28 May 2006 09:44:13 +0000 (09:44 +0000)]
Revert 1.73, since mounting devfs without a devfs ruleset inside a
jail is a very bad idea security wise.

Approved by: trhodes (jcamou mentor)
No response: jcamou

18 years agoMention ruleset #4 (devfsrules_jail) in jail's man page.
matteo [Sun, 28 May 2006 08:29:49 +0000 (08:29 +0000)]
Mention ruleset #4 (devfsrules_jail) in jail's man page.

MFC after: 3

18 years agoIn execve(), audit the path name being executed. In the future, it
rwatson [Sun, 28 May 2006 08:28:47 +0000 (08:28 +0000)]
In execve(), audit the path name being executed.  In the future, it
would also be good to audit the interpreter pathname, if any.

Obtained from: TrustedBSD Project

18 years agoAdd missing % signs in the lock annotations of the functions:
dds [Sun, 28 May 2006 07:24:12 +0000 (07:24 +0000)]
Add missing % signs in the lock annotations of the functions:
lookup, rename, strategy, islocked
The missing % sign meant that the lines were processed as plain
comments and the corresponding assertions were never generated.

18 years agodocument that even if magic is newer than magic.mgc, it isn't used
jmg [Sun, 28 May 2006 07:15:35 +0000 (07:15 +0000)]
document that even if magic is newer than magic.mgc, it isn't used

compiling mgc on a big endian system (specificly tested sparc64) breaks,
using one from a little endian system works

18 years agoClear high 16 bits of mxcsr register, according to Intel document, if
davidxu [Sun, 28 May 2006 06:51:57 +0000 (06:51 +0000)]
Clear high 16 bits of mxcsr register, according to Intel document, if
the high 16 bits is non-zero, fxrstor instruction will generate GP fault,
resulting kernel crash, this bug can be triggered by setcontext and
ptrace(PT_SETXMMREGS).

18 years agoLayers are for cakes, not for software.
dds [Sun, 28 May 2006 06:16:15 +0000 (06:16 +0000)]
Layers are for cakes, not for software.
                -- Bart Smaalders

From Performance Anti-patterns. ACM Queue 4(1):44-50. February 2006.
(Author confirmed via email that the quote is his own).

18 years agoUse the limited scatter-gather capabilities of ehci, ohci and uhci
iedowse [Sun, 28 May 2006 05:27:09 +0000 (05:27 +0000)]
Use the limited scatter-gather capabilities of ehci, ohci and uhci
host controllers to avoid the need to allocate any multi-page
physically contiguous memory blocks. This makes it possible to use
USB devices reliably on low-memory systems or when memory is too
fragmented for contiguous allocations to succeed.

The USB subsystem now uses bus_dmamap_load() directly on the buffers
supplied by USB peripheral drivers, so this also avoids having to
copy data back and forth before and after transfers. The ehci and
ohci controllers support scatter/gather as long as the buffer is
contiguous in the virtual address space. For uhci the hardware
cannot handle a physical address discontinuity within a USB packet,
so it is necessary to copy small memory fragments at times.

18 years agoPCB_NPXINITDONE is cleared by npx_fork_thread.
davidxu [Sun, 28 May 2006 04:47:56 +0000 (04:47 +0000)]
PCB_NPXINITDONE is cleared by npx_fork_thread.

18 years agoIf parent thread never used FPU, the only work is to clear flag
davidxu [Sun, 28 May 2006 04:40:45 +0000 (04:40 +0000)]
If parent thread never used FPU, the only work is to clear flag
PCB_NPXINITDONE for new thread and let trap code initialize it.

18 years agoWhen creating a new thread, inherit floating-point environment from
davidxu [Sun, 28 May 2006 02:03:13 +0000 (02:03 +0000)]
When creating a new thread, inherit floating-point environment from
current thread, this is required by POSIX pthread_create document.

18 years agoNULL out ii->stdstart and ii->stdend when they are invalid. This
iedowse [Sun, 28 May 2006 01:17:13 +0000 (01:17 +0000)]
NULL out ii->stdstart and ii->stdend when they are invalid. This
is not necessary for correct operation but makes it clearer that
freed transfer descriptors cannot be accessed.

18 years agoFix a harmless typo where the software pointer in the dummy QH for
iedowse [Sun, 28 May 2006 01:07:46 +0000 (01:07 +0000)]
Fix a harmless typo where the software pointer in the dummy QH for
control transfers did not match the hardware pointer.

18 years agoDefer axe_tick processing to a USB task, since axe miibus operations
iedowse [Sat, 27 May 2006 23:46:13 +0000 (23:46 +0000)]
Defer axe_tick processing to a USB task, since axe miibus operations
need to sleep. This avoids an INVARIANTS panic. It looks like if_rue
and if_aue need a similar change, but I don't have hardware to test.

18 years agoavoid null ptr deref
sam [Sat, 27 May 2006 23:04:30 +0000 (23:04 +0000)]
avoid null ptr deref

Obtained from: netbsd

18 years agocorrect static array overrun
sam [Sat, 27 May 2006 23:03:08 +0000 (23:03 +0000)]
correct static array overrun

Obtained from: netbsd

18 years agoFix using "P" command on empty pattern space. If the "P" command is
krion [Sat, 27 May 2006 19:32:28 +0000 (19:32 +0000)]
Fix using "P" command on empty pattern space.  If the "P" command is
used once on a non-empty pattern space and then again on an empty
pattern space, the second usage restores the pattern space length to
the length that it had when the first "P" was used.

PR: bin/96052
Submitted by: Andrey Zholos <aaz@althenia.net>
MFC after: 7 days

18 years agoAdd the capability for a trailing scale indicator to cause the
krion [Sat, 27 May 2006 18:27:41 +0000 (18:27 +0000)]
Add the capability for a trailing scale indicator to cause the
specified size to be read in the more familiar units of kilobytes,
megabytes, gigabytes, terabytes and petabytes.

PR: bin/50988
Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk>
MFC after: 7 days

18 years agoUnbreak after previous commit. While here, improve function naming
marcel [Sat, 27 May 2006 17:52:08 +0000 (17:52 +0000)]
Unbreak after previous commit. While here, improve function naming
consistency by s/ssc/ssc_/g.

18 years agoWork in progress toward fixing IM checked in after having
mjacob [Sat, 27 May 2006 17:26:57 +0000 (17:26 +0000)]
Work in progress toward fixing IM checked in after having
lost one set to a peninsula power failure last night. After
this, I can see both submembers and the raid volumes again,
but speed negotiation is still broken.

Add a mpt_raid_free_mem function to centralize the resource
reclaim and fixed a small memory leak.

Remove restriction on number of targets for systems with IM enabled-
you can have setups that have both IM volumes as well as other devices.

Fix target id selection for passthru and nonpastrhu cases.

Move complete command dumpt to MPT_PRT_DEBUG1 level so that just
setting debug level gets mostly informative albeit less verbose
dumping.

18 years agoCommit the new (old) midi framework. It's based in parts on the NetBSD code,
netchild [Sat, 27 May 2006 16:51:37 +0000 (16:51 +0000)]
Commit the new (old) midi framework. It's based in parts on the NetBSD code,
but large parts are rewritten by matk and tanimura.

This is old code, it's not maintained since 2003. We also don't have a
maintainer for this! Yuriy Tsibizov took it and uses it in his emu10kx
driver. Since the emu10kx driver will enter the tree "soon" (some bugs
have to be fixed after Yuriy return from his holidays), I add it here
already.

This also contains some changes to emu10k1 and cmi, so if you're lucky,
you can now make some kind of use of midi with those soundcards.

To all those poor souls which don't have such a card: feel free to send
patches, we don't have a maintainer for this.

To those which miss a specific feature in the midi code: feel free to
submit patches, we don't have a maintainer for this.

Oh, did I already told that it would be nice if someone would take care
of it? Maintainer with midi equipment wanted! :-)

If you get LOR's, submit a PR and notify multimedia@ please. If you get
panics, submit a PR with a backtrace (compile the sound system into your
kernel instead of using modules in this case) and notify multimedia@
please.

Written by: matk, tanimura
Submitted by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
Based upon: code from NetBSD

18 years agoCommit the new (old) midi framework. It's based in parts on the NetBSD code,
netchild [Sat, 27 May 2006 16:32:05 +0000 (16:32 +0000)]
Commit the new (old) midi framework. It's based in parts on the NetBSD code,
but large parts are rewritten by matk and tanimura.

This is old code, it's not maintained since 2003. We also don't have a
maintainer for this! Yuriy Tsibizov took it and uses it in his emu10kx
driver. Since the emu10kx driver will enter the tree "soon" (some bugs
have to be fixed after Yuriy return from his holidays), I add it here
already.

This also contains some changes to emu10k1 and cmi, so if you're lucky,
you can now make some kind of use of midi with those soundcards.

To all those poor souls which don't have such a card: feel free to send
patches, we don't have a maintainer for this.

To those which miss a specific feature in the midi code: feel free to
submit patches, we don't have a maintainer for this.

Oh, did I already told that it would be nice if someone would take care
of it? Maintainer with midi equipment wanted! :-)

If you get LOR's, submit a PR and notify multimedia@ please. If you get
panics, submit a PR with a backtrace (compile the sound system into your
kernel instead of using modules in this case) and notify multimedia@
please.

Written by: matk, tanimura
Submitted by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
Based upon: code from NetBSD

18 years agoMFCs noted: Support for i386 systems with no AT-style keyboard
bmah [Sat, 27 May 2006 14:26:49 +0000 (14:26 +0000)]
MFCs noted: Support for i386 systems with no AT-style keyboard
controller, jail(8) -s (+ fixed a minor grammo whil here), ls(1) -U,
ntp-4.2.0 manpages.

18 years agoRemove mention of minor number construction.
phk [Sat, 27 May 2006 10:20:17 +0000 (10:20 +0000)]
Remove mention of minor number construction.

18 years agoFix typo in printf string.
simon [Sat, 27 May 2006 09:28:59 +0000 (09:28 +0000)]
Fix typo in printf string.

MFC after: 1 week
Approved by: cperciva (mentor)

18 years agoextlen and cpp is not used here in linker_search_kld(), so nuke them.
delphij [Sat, 27 May 2006 09:21:41 +0000 (09:21 +0000)]
extlen and cpp is not used here in linker_search_kld(), so nuke them.

Reported by: Mingyan Guo <guomingyan at gmail dot com>
MFC After: 2 weeks

18 years agoFix the output.
ru [Sat, 27 May 2006 09:04:43 +0000 (09:04 +0000)]
Fix the output.

Noticed by: rodrigc

18 years agotypo.
nyan [Sat, 27 May 2006 04:40:41 +0000 (04:40 +0000)]
typo.

18 years agoMove call to ignore SIGPIPE signals before calling fork(),
rodrigc [Sat, 27 May 2006 02:37:37 +0000 (02:37 +0000)]
Move call to ignore SIGPIPE signals before calling fork(),
so that both parent and child processes ignore this signal.

PR:             bin/97768
Submitted by:   Gea-Suan Lin <gslin at csie dot nctu dot edu dot tw>
MFC after:      3 days

18 years agoFix for a potential attempt to sleep while holding nm_mtx. Caught and reported
mohans [Fri, 26 May 2006 18:45:55 +0000 (18:45 +0000)]
Fix for a potential attempt to sleep while holding nm_mtx. Caught and reported
by Witness (which forces the mbuf allocation flag to M_NOWAIT).

Reported by: "sekes".

18 years agoUpdate to new console api.
phk [Fri, 26 May 2006 18:25:34 +0000 (18:25 +0000)]
Update to new console api.

18 years agoAdd sanity checking for QUEUE(3) TAILQs under INVARIANTS (similar to
emaste [Fri, 26 May 2006 18:17:53 +0000 (18:17 +0000)]
Add sanity checking for QUEUE(3) TAILQs under INVARIANTS (similar to
the LIST checks).  Races may lead to list corruption, which can be
difficult to unravel in a post-mortem analysis.  These checks verify
that the prev and next pointers are consistent when inserting or
removing elements, thus catching any corruption earlier.

18 years agoConnect the kernel subsystem API documentation generation framework to
netchild [Fri, 26 May 2006 18:10:06 +0000 (18:10 +0000)]
Connect the kernel subsystem API documentation generation framework to
the build infrastructure: "make doxygen"

Changes to the man pages will be made when some defaults are revisited.

Requested by: gnn

18 years agoThis is the kernel subsystem API documentation generation framework.
netchild [Fri, 26 May 2006 18:06:07 +0000 (18:06 +0000)]
This is the kernel subsystem API documentation generation framework.

It uses doxygen to generate the API documentation. For each subsystem
a very small (about 20 lines with comments) subsystem specific Doxyfile
has to be written (have a look at the README for more). All common doxygen
options are specified in a separate file.

The framework is configured to not only generate the HTML version, but also
a PDF version (the paper size is hardcoded to DIN A4 currently and depending
on the subsystem you have to increase some limits in the latex configuration
of your system, the README tells more about this).

It also allows cross-references between the subsystems (it generates doxygen
tag files).

Currently the docs are generated in OBJDIR, but this may change after
coordination with doc@. The makefile is prepared to generate/move various
parts of the generated docs to different destinations.

TARGET_ARCH is respected and some env-vars are set for architecture specific
handling of the source (the README tells more).

Subsystems for which docs are generated:
 - cam                  - crypto                - dev_pci
 - dev_sound            - dev_usb               - geom
 - i4b                  - kern                  - libkern
 - linux                - net80211              - netgraph
 - netinet              - netinet6              - netipsec
 - opencrypto           - vm

Requested by: gnn

18 years agoConvert to new console api
phk [Fri, 26 May 2006 13:54:27 +0000 (13:54 +0000)]
Convert to new console api

18 years agoConvert to new console interface.
phk [Fri, 26 May 2006 13:51:38 +0000 (13:51 +0000)]
Convert to new console interface.

18 years agoAling to new console and gdb_port semantics
phk [Fri, 26 May 2006 13:33:28 +0000 (13:33 +0000)]
Aling to new console and gdb_port semantics

18 years agos/2005/2006/ for FreeBSD 6.1 and 5.5.
maxim [Fri, 26 May 2006 13:19:46 +0000 (13:19 +0000)]
s/2005/2006/ for FreeBSD 6.1 and 5.5.

18 years agoAdd support for "export" option, to allow NFS exporting
rodrigc [Fri, 26 May 2006 13:01:53 +0000 (13:01 +0000)]
Add support for "export" option, to allow NFS exporting
of XFS filesystems.

18 years agoRemove "update" from ffs_opts. It has been moved to global_opts
rodrigc [Fri, 26 May 2006 12:44:12 +0000 (12:44 +0000)]
Remove "update" from ffs_opts.  It has been moved to global_opts
in vfs_mount.c.

18 years agoRemove calls to vfs_export() for exporting a filesystem for NFS mounting
rodrigc [Fri, 26 May 2006 11:58:30 +0000 (11:58 +0000)]
Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems.  Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.

Approved by: dumbbell

18 years agoEliminate gdb_checkc member from GDB_DBGPORT(), it is never used.
phk [Fri, 26 May 2006 11:54:32 +0000 (11:54 +0000)]
Eliminate gdb_checkc member from GDB_DBGPORT(), it is never used.

Use polling behaviour for gdb_getc() where convenient, this edges us
closer to the console code.

18 years agoDon't use GDB_DBGPORT() macro to fill in dummy element in gdb_dbgport_set.
phk [Fri, 26 May 2006 11:52:59 +0000 (11:52 +0000)]
Don't use GDB_DBGPORT() macro to fill in dummy element in gdb_dbgport_set.

18 years agoWrap our drivers gdb_getc() function so that if it returns -1 we
phk [Fri, 26 May 2006 11:52:20 +0000 (11:52 +0000)]
Wrap our drivers gdb_getc() function so that if it returns -1 we
try again.  This way it matches the console behaviour and allows us
to share more code.

18 years agoConvert to use CONSOLE_DRIVER() macro:
phk [Fri, 26 May 2006 11:21:52 +0000 (11:21 +0000)]
Convert to use CONSOLE_DRIVER() macro:

Remove cngetc, rename cncheckc to cngetc (fix GDB console accordingly)

18 years agoIf the console has no cncheckc method, use cngetc instead.
phk [Fri, 26 May 2006 11:00:20 +0000 (11:00 +0000)]
If the console has no cncheckc method, use cngetc instead.

18 years agoAdd new CONSOLE_DRIVER macro which takes just the name of the console
phk [Fri, 26 May 2006 10:58:39 +0000 (10:58 +0000)]
Add new CONSOLE_DRIVER macro which takes just the name of the console
and constructs the member function names with CPPs' ##.

Do not include the checkc entry as it is going away.

18 years agoDon't use CONS_DRIVER() macro to insert dummy element in cons_set
phk [Fri, 26 May 2006 10:46:38 +0000 (10:46 +0000)]
Don't use CONS_DRIVER() macro to insert dummy element in cons_set

18 years agoInsert a '_' in the console function names to be more consistent with
phk [Fri, 26 May 2006 10:44:47 +0000 (10:44 +0000)]
Insert a '_' in the console function names to be more consistent with
the future.

18 years agoGC the cn_dbctl_t hook for consoles, it is unused.
phk [Fri, 26 May 2006 10:24:00 +0000 (10:24 +0000)]
GC the cn_dbctl_t hook for consoles, it is unused.

This used to make syscons switch to vty0 when we entered DDB but this
was lost in the KDB shuffle.  We may want to bring it back down the road
but it should be done by calling cn_init_t/cn_term_t instead, possibly
with a flag argument saying "Debugger!"

18 years agoBe less harsh on brueffers eyes :-)
phk [Fri, 26 May 2006 10:23:05 +0000 (10:23 +0000)]
Be less harsh on brueffers eyes :-)

18 years agoRemove SI_SUB_CONSOLE, porting from 4.4-Lite is no longer an issue.
phk [Fri, 26 May 2006 10:00:58 +0000 (10:00 +0000)]
Remove SI_SUB_CONSOLE, porting from 4.4-Lite is no longer an issue.

18 years agodon't require a buffer if all we are doing is manipulating the GPIO pins...
jmg [Fri, 26 May 2006 07:36:50 +0000 (07:36 +0000)]
don't require a buffer if all we are doing is manipulating the GPIO pins...

MFC after: 3 weeks

18 years agoUpdate usage comment to match reality.
dds [Fri, 26 May 2006 07:13:26 +0000 (07:13 +0000)]
Update usage comment to match reality.

18 years agoGet most of the way back to having Integrated Mirroring work
mjacob [Fri, 26 May 2006 05:54:21 +0000 (05:54 +0000)]
Get most of the way back to having Integrated Mirroring work
again- the addition of target mode support broke it massively.

18 years agogratuitous formatting changes
mjacob [Fri, 26 May 2006 05:43:14 +0000 (05:43 +0000)]
gratuitous formatting changes

18 years agoFix spellings. Prototype mpt_dump_request. Add a 'raid_enabled' tag.
mjacob [Fri, 26 May 2006 05:42:00 +0000 (05:42 +0000)]
Fix spellings. Prototype mpt_dump_request. Add a 'raid_enabled' tag.

18 years agoRemove handrolled raw dump of a request from
mjacob [Fri, 26 May 2006 05:41:14 +0000 (05:41 +0000)]
Remove handrolled raw dump of a request from
mpt_send_cmd and replace with a new debug function.

18 years agowi works on amd64 laptops. Enable its building as a module.
imp [Fri, 26 May 2006 03:45:29 +0000 (03:45 +0000)]
wi works on amd64 laptops.  Enable its building as a module.

18 years agoAdd "update" mount option to global_opts array,
rodrigc [Fri, 26 May 2006 02:38:48 +0000 (02:38 +0000)]
Add "update" mount option to global_opts array,
for use with vfs_filteropt().

18 years agoQUEUE_MACRO_DEBUG is intended for userland code, so don't include checks
emaste [Fri, 26 May 2006 02:26:53 +0000 (02:26 +0000)]
QUEUE_MACRO_DEBUG is intended for userland code, so don't include checks
that call panic under it.

18 years agoRemove any reference to enable_mmu(), it's been gone for a long time.
cognet [Fri, 26 May 2006 01:41:47 +0000 (01:41 +0000)]
Remove any reference to enable_mmu(), it's been gone for a long time.

Submitted by: kevlo

18 years agoRemove calls to vfs_export() for exporting a filesystem for NFS mounting
rodrigc [Fri, 26 May 2006 01:21:51 +0000 (01:21 +0000)]
Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems.  Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.

18 years agoRemove calls to vfs_export() for exporting a filesystem for NFS mounting
rodrigc [Fri, 26 May 2006 00:32:21 +0000 (00:32 +0000)]
Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems.  Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.

18 years agoAPM was calling the suspend process from a timeout. This meant that
imp [Thu, 25 May 2006 23:06:38 +0000 (23:06 +0000)]
APM was calling the suspend process from a timeout.  This meant that
other timeouts could not happen while suspending, including timeouts
for things like msleep.  This caused the system to hang on suspend
when the cbb was enabled, since its suspend path powered down the
socket which used a timeout to wait for it to be done.

APM now creates a thread when it is enabled, and deletes the thread
when it is disabled.  This thread takes the place of the timeout by
doing its polling every ~.9s.  When the thread is disabled, it will
wakeup early, otherwise it times out and polls the varius things the
old timeout polled (APM events, suspend delays, etc).

This makes my Sony VAIO 505TS suspend/resume correctly when APM is
enabled (ACPI is black listed on my 505TS).

This will likely fix other problems with the suspend path where
drivers would sleep with msleep and/or do other timeouts.  Maybe
there's some special case code that would use DELAY while suspending
and msleep otherwise that can be revisited and removed.

This was also tested by glebius@, who pointed out that in the patch I
sent him, I'd forgotten apm_saver.c

MFC After: 3 weeks

18 years agoIgnore SIGPIPE signals on write() failures.
rodrigc [Thu, 25 May 2006 22:12:05 +0000 (22:12 +0000)]
Ignore SIGPIPE signals on write() failures.
We already check for write() failures and handle EPIPE.
Failure to handle SIGPIPE was resulting in rpc.lockd terminating.

PR: bin/97768
Reported by: Gea-Suan Lin <gslin at csie dot nctu dot edu dot tw>
MFC after: 1 day

18 years agoOnly reference the firmware module once rather than twice. The extra call
jhb [Thu, 25 May 2006 22:04:46 +0000 (22:04 +0000)]
Only reference the firmware module once rather than twice.  The extra call
was accidentally added in 1.55 and resulted in an extra reference count
being held on the linker file.

MFC after: 1 week

18 years agoEnable numeric arguments and +/- prefixes with -user (-group)
krion [Thu, 25 May 2006 21:20:43 +0000 (21:20 +0000)]
Enable numeric arguments and +/- prefixes with -user (-group)
options.

PR: bin/71513
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after: 7 days

18 years agoo FreeBSD 5.5 added.
maxim [Thu, 25 May 2006 18:16:16 +0000 (18:16 +0000)]
o FreeBSD 5.5 added.

18 years agoCall vm_object_page_clean() with the object lock held.
ups [Thu, 25 May 2006 17:16:11 +0000 (17:16 +0000)]
Call vm_object_page_clean() with the object lock held.

Submitted by: kensmith@
Reviewed by: mohans@
MFC after: 6 days

18 years agoUse getsock() and fput() instead of fgetsock() and fputsock() in
rwatson [Thu, 25 May 2006 15:10:13 +0000 (15:10 +0000)]
Use getsock() and fput() instead of fgetsock() and fputsock() in
sendfile().  This causes sendfile() to use the file descriptor
reference to the socket instead of bumping the socket reference
count, which avoids an additional refcount operation, as well as a
potential expensive socket refcount drop, which can lead to
contention on the accept mutex.  This change also has the side
effect of further reducing the number of cases where an in-progress
I/O operation can occur on a socket after close, as using the file
descriptor refcount prevents the socket from closing while in use.

MFC after: 3 months

18 years agoClarify that G_F_DISKIOCTL is unused, and remove G_T_DETAILS altogether,
ceri [Thu, 25 May 2006 13:39:27 +0000 (13:39 +0000)]
Clarify that G_F_DISKIOCTL is unused, and remove G_T_DETAILS altogether,
since it isn't actually #defined.

Discussed with: phk

18 years ago In our system there's no intermediate step between a definitive Supreme
phk [Thu, 25 May 2006 11:21:40 +0000 (11:21 +0000)]
 In our system there's no intermediate step between a definitive Supreme
 Court decision and violent revolution.
                -- Al Gore (New York Magazine, May 29 2006)

18 years agoUse WARNS and rely on rules rather than an explicit target for the
rwatson [Thu, 25 May 2006 10:46:43 +0000 (10:46 +0000)]
Use WARNS and rely on rules rather than an explicit target for the
test binary.

Reported by: maxim

18 years agoAdd a basic regression test for sendfile() over TCP, which sends varying
rwatson [Thu, 25 May 2006 09:50:14 +0000 (09:50 +0000)]
Add a basic regression test for sendfile() over TCP, which sends varying
lengths of headers and data and makes sure it receives about the right
number of bytes.

18 years agos/on a crt//
brd [Thu, 25 May 2006 06:05:04 +0000 (06:05 +0000)]
s/on a crt//
systat is working great on this LCD ;)

Submitted by: Ben Haga <tuximus AT absoludicrous DOT com>
MFC after: 3 days

18 years ago - Add include for libutil.h and string.h for prototype.
delphij [Thu, 25 May 2006 04:01:04 +0000 (04:01 +0000)]
 - Add include for libutil.h and string.h for prototype.
 - Cast the rvalue to be compared with the result of
   strlen() to size_t.

18 years agoDo not set B_NOCACHE on buffers when releasing them in flushbuflist().
ups [Thu, 25 May 2006 01:00:35 +0000 (01:00 +0000)]
Do not set B_NOCACHE on buffers when releasing them in flushbuflist().
If B_NOCACHE is set the pages of vm backed buffers will be invalidated.
However clean buffers can be backed by dirty VM pages so invalidating them
can lead to data loss.
Add support for flush dirty page in the data invalidation function
of some network file systems.

This fixes data losses during vnode recycling (and other code paths
using invalbuf(*,V_SAVE,*,*)) for data written using an mmaped file.

Collaborative effort by: jhb@,mohans@,peter@,ps@,ups@
Reviewed by: tegge@
MFC after: 7 days

18 years agoSince NFSv4 is not SMP safe, nfsiod needs to acquire Giant for NFSv4 mounts
mohans [Wed, 24 May 2006 23:06:50 +0000 (23:06 +0000)]
Since NFSv4 is not SMP safe, nfsiod needs to acquire Giant for NFSv4 mounts
before doing the read/write.

Reported by: Chuck Lever.

18 years agoWhen starting up threads in taskqueue_start_threads create them
sam [Wed, 24 May 2006 22:11:07 +0000 (22:11 +0000)]
When starting up threads in taskqueue_start_threads create them
stopped before adjusting their priority and setting them on the run
q so they cannot race for resources (pointed out by njl).

While here add a console printf on thread create fails; otherwise
noone may notice (e.g. return value is always 0 and caller has no
way to verify).

Reviewed by: jhb, scottl
MFC after: 2 weeks

18 years agoAdjust minimum iod threads from 4 to 0 -- since we compile the NFS
rwatson [Wed, 24 May 2006 21:04:46 +0000 (21:04 +0000)]
Adjust minimum iod threads from 4 to 0 -- since we compile the NFS
client into the kernel by default, and many users won't use NFS,
don't start an extra 4 kernel threads that are unused.  Once NFS
becomes active, it will start nfsiod's as it needs them.

We might consider mandating a minimum iod's equal to the number of
active NFS mounts (truncated to some value), which would force some
to remain available without having to create a new one if the file
system is mostly inactive.

PR: 70880
MFC after: 2 weeks
Prodded by: cel
Head nod: peter
Pointed out by: Joe <fbsd_user at a1poweruser dot com>