]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoCross-reference libmemstat(3), malloc(9), uma(9).
Robert Watson [Thu, 2 Nov 2006 19:53:57 +0000 (19:53 +0000)]
Cross-reference libmemstat(3), malloc(9), uma(9).

17 years agoFix typo.
Ceri Davies [Thu, 2 Nov 2006 19:10:05 +0000 (19:10 +0000)]
Fix typo.

17 years agoProperly htole16() PSM in sockaddr_l2cap
Maksim Yevmenkin [Thu, 2 Nov 2006 18:57:09 +0000 (18:57 +0000)]
Properly htole16() PSM in sockaddr_l2cap

MFC after: 3 days

17 years agoUnbreak compile with ELF_VERBOSE defined, and fix format warnings.
Ruslan Ermilov [Thu, 2 Nov 2006 17:52:43 +0000 (17:52 +0000)]
Unbreak compile with ELF_VERBOSE defined, and fix format warnings.

17 years agoUse the improved m_uiotombuf() function instead of home grown sosend_copyin()
Andre Oppermann [Thu, 2 Nov 2006 17:45:28 +0000 (17:45 +0000)]
Use the improved m_uiotombuf() function instead of home grown sosend_copyin()
to do the userland to kernel copying in sosend_generic() and sosend_dgram().

sosend_copyin() is retained for ZERO_COPY_SOCKETS which are not yet supported
by m_uiotombuf().

Benchmaring shows significant improvements (95% confidence):
 66% less cpu (or 2.9 times better) with new sosend vs. old sosend (non-TSO)
 65% less cpu (or 2.8 times better) with new sosend vs. old sosend (TSO)

(Sender AMD Opteron 852 (2.6GHz) with em(4) PCI-X-133 interface and receiver
DELL Poweredge SC1425 P-IV Xeon 3.2GHz with em(4) LOM connected back to back
at 1000Base-TX full duplex.)

Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 month

17 years agoRename m_getm() to m_getm2() and rewrite it to allocate up to page sized
Andre Oppermann [Thu, 2 Nov 2006 17:37:22 +0000 (17:37 +0000)]
Rename m_getm() to m_getm2() and rewrite it to allocate up to page sized
mbuf clusters.  Add a flags parameter to accept M_PKTHDR and M_EOR mbuf
chain flags.  Provide compatibility macro for m_getm() calling m_getm2()
with M_PKTHDR set.

Rewrite m_uiotombuf() to use m_getm2() for mbuf allocation and do the
uiomove() in a tight loop over the mbuf chain.  Add a flags parameter to
accept mbuf flags to be passed to m_getm2().  Adjust all callers for the
extra parameter.

Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 month

17 years agoRevert the last change. Masking only 2 MSBs of the virtual address
Ruslan Ermilov [Thu, 2 Nov 2006 17:28:38 +0000 (17:28 +0000)]
Revert the last change.  Masking only 2 MSBs of the virtual address
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE.  (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)

To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.

Discussed with: jhb

17 years agoRewrite kern_sendfile() to work in two loops, the inner which turns as many
Andre Oppermann [Thu, 2 Nov 2006 16:53:26 +0000 (16:53 +0000)]
Rewrite kern_sendfile() to work in two loops, the inner which turns as many
VM pages into mbufs as it can -- up to the free send socket buffer space.
The outer loop then drops the whole mbuf chain into the send socket buffer,
calls tcp_output() on it and then waits until 50% of the socket buffer are
free again to repeat the cycle. This way tcp_output() gets the full amount
of data to work with and can issue up to 64K sends for TSO to chop up in
the network adapter without using any CPU cycles. Thus it gets very efficient
especially with the readahead the VM and I/O system do.

The previous sendfile(2) code simply looped over the file, turned each 4K
page into an mbuf and sent it off. This had the effect that TSO could only
generate 2 packets per send instead of up to 44 at its maximum of 64K.

Add experimental SF_MNOWAIT flag to sendfile(2) to return ENOMEM instead of
sleeping on mbuf allocation failures.

Benchmarking shows significant improvements (95% confidence):
 45% less cpu (or 1.81 times better) with new sendfile vs. old sendfile (non-TSO)
 83% less cpu (or 5.7 times better) with new sendfile vs. old sendfile (TSO)

(Sender AMD Opteron 852 (2.6GHz) with em(4) PCI-X-133 interface and receiver
DELL Poweredge SC1425 P-IV Xeon 3.2GHz with em(4) LOM connected back to back
at 1000Base-TX full duplex.)

Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 month

17 years agoFix ia64 build breakage.
Pawel Jakub Dawidek [Thu, 2 Nov 2006 16:24:18 +0000 (16:24 +0000)]
Fix ia64 build breakage.

17 years agoReplace the SEE ALSO xrefs with a more reasonable set stolen from POSIX.
Ruslan Ermilov [Thu, 2 Nov 2006 14:10:56 +0000 (14:10 +0000)]
Replace the SEE ALSO xrefs with a more reasonable set stolen from POSIX.

17 years agoOn trap while inside ddb, the trap handler calls kdb_reenter(), that
Konstantin Belousov [Thu, 2 Nov 2006 11:47:38 +0000 (11:47 +0000)]
On trap while inside ddb, the trap handler calls kdb_reenter(), that
longjmp to the default context. As result, "alltrace" command may
be prematurely terminated (without error message). This is happens,
for instance, when system is low on memory and referenced page in
kernel-mode thread stack is swapped out.

Protect "alltrace" against termination on trap by setting temporary
kdb_jmpbuf context.

Submitted by: Peter Holm

17 years agoBump .Dd for -f|-F.
Ceri Davies [Thu, 2 Nov 2006 10:44:02 +0000 (10:44 +0000)]
Bump .Dd for -f|-F.

17 years agoDocument Elf{32,64}_Lword. Keep the list of ELF types sorted.
Joseph Koshy [Thu, 2 Nov 2006 09:21:57 +0000 (09:21 +0000)]
Document Elf{32,64}_Lword.  Keep the list of ELF types sorted.

Describe the contents of the 'e_shnum' and 'e_shstrndx' fields when
using extended section numbering.

17 years ago- Use g_duplicate_bio() instead of g_clone_bio(), so there memory is
Pawel Jakub Dawidek [Thu, 2 Nov 2006 09:14:18 +0000 (09:14 +0000)]
- Use g_duplicate_bio() instead of g_clone_bio(), so there memory is
  allocated with M_WAITOK flag.
- Check 'buf' instead of 'error' so Prevent is not confused.

CID: 1562, 1563
Found by: Coverity Prevent analysis tool

17 years agoI want CPU number here.
Pawel Jakub Dawidek [Thu, 2 Nov 2006 09:01:34 +0000 (09:01 +0000)]
I want CPU number here.

Noticed by: ru

17 years agoDo not test all the conditions if the port is already forwarding. Also print a
Andrew Thompson [Thu, 2 Nov 2006 08:44:19 +0000 (08:44 +0000)]
Do not test all the conditions if the port is already forwarding. Also print a
debug message if the port is agreed as it is an important condition of the
protocol.

17 years agoFix a resource leak when the mbuf pointer changes.
Andrew Thompson [Thu, 2 Nov 2006 08:04:13 +0000 (08:04 +0000)]
Fix a resource leak when the mbuf pointer changes.

CID: 1564, 1565
Found by: Coverity Prevent (tm)

17 years agoo There is no securenets(5) man page, refer to ypserv(8).
Maxim Konovalov [Thu, 2 Nov 2006 07:36:33 +0000 (07:36 +0000)]
o There is no securenets(5) man page, refer to ypserv(8).

Obtained from: DragonFlyBSD
MFC after: 1 week

17 years agoFix "1 day ago", "yesterday" and similar relative-time phrases
Tim Kientzle [Thu, 2 Nov 2006 04:16:15 +0000 (04:16 +0000)]
Fix "1 day ago", "yesterday" and similar relative-time phrases
when parsing dates.

PR: bin/104934: bug in some date handling of bsdtar
Reported by: Herve Boulouis
MFC after: 3 days

17 years agoUse 2K Login f/w.
Matt Jacob [Thu, 2 Nov 2006 03:23:01 +0000 (03:23 +0000)]
Use 2K Login f/w.

17 years agoAdd 4Gb (24XX) support and lay the foundation for a lot of new stuff.
Matt Jacob [Thu, 2 Nov 2006 03:21:32 +0000 (03:21 +0000)]
Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.

17 years agoSync the EFI headers with version 1.10.14.62 of the Intel sample EFI
Marcel Moolenaar [Thu, 2 Nov 2006 02:42:48 +0000 (02:42 +0000)]
Sync the EFI headers with version 1.10.14.62 of the Intel sample EFI
implementation. This re-introduces C99 style comments that previously
were replaced by original C comments.

17 years agoExtend struct devdesc with a unit field, called d_unit. Promote the
Marcel Moolenaar [Thu, 2 Nov 2006 01:23:18 +0000 (01:23 +0000)]
Extend struct devdesc with a unit field, called d_unit. Promote the
device (kind) specific unit field to the common field. This change
allows a future version of libefi to work without requiring anything
more than what is defined in struct devdesc and as such makes it
possible to compile said version of libefi for different platforms
without requiring that those platforms have identical derivatives
of struct devdesc.

17 years ago2nd and final commit that moves us to CAM_NEW_TRAN_CODE
Matt Jacob [Thu, 2 Nov 2006 00:54:38 +0000 (00:54 +0000)]
2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.

17 years agoIf the port is agreed or edge then allow it go go straight to forwarding rather
Andrew Thompson [Thu, 2 Nov 2006 00:39:36 +0000 (00:39 +0000)]
If the port is agreed or edge then allow it go go straight to forwarding rather
than waiting another tick (1s) for the states to be checked again.

17 years agoGrr, fix one more build breakage.
Pawel Jakub Dawidek [Thu, 2 Nov 2006 00:37:39 +0000 (00:37 +0000)]
Grr, fix one more build breakage.

17 years agoDon't unconditionally compile-in the bcache code. It's only used on
Marcel Moolenaar [Thu, 2 Nov 2006 00:26:45 +0000 (00:26 +0000)]
Don't unconditionally compile-in the bcache code. It's only used on
i386/amd64 and pc98. Remove useless calls to bcache_init() from the
ia64 and sparc64 loaders, as well as from the OFW common code.

17 years agoRemove <sys/types.h>; including both <sys/param.h> and <sys/types.h>
Marius Strobl [Thu, 2 Nov 2006 00:05:15 +0000 (00:05 +0000)]
Remove <sys/types.h>; including both <sys/param.h> and <sys/types.h>
violates style(9).

17 years agoo Make sure to clear f->f_devdata if d_dev->dv_open() fails. It
Marcel Moolenaar [Thu, 2 Nov 2006 00:02:22 +0000 (00:02 +0000)]
o  Make sure to clear f->f_devdata if d_dev->dv_open() fails. It
   would otherwise cause devclose() to free() the memory again.
o  Refactor devopen() so that it's more readable.

17 years ago- In sunkbd_probe_keyboard() don't bother to determine the keyboard layout
Marius Strobl [Thu, 2 Nov 2006 00:01:15 +0000 (00:01 +0000)]
- In sunkbd_probe_keyboard() don't bother to determine the keyboard layout
  as we have no use for that info. Instead let this function return the
  keyboard ID and verify at its invocation in sunkbd_configure() that we're
  talking to a Sun type 4/5/6 keyboard, i.e. a keyboard supported by this
  driver.
- Add an option SUNKBD_EMULATE_ATKBD whose code is based on the respective
  code in ukbd(4) and like UKBD_EMULATE_ATSCANCODE causes this driver to
  emit AT keyboard/KB_101 compatible scan codes in K_RAW mode as assumed by
  kbdmux(4). Unlike UKBD_EMULATE_ATSCANCODE, SUNKBD_EMULATE_ATKBD also
  triggers the use of AT keyboard maps and thus allows to use the map files
  in share/syscons/keymaps with this driver at the cost of an additional
  translation (in ukbd(4) this just is the way of operation).
- Implement an option SUNKBD_DFLT_KEYMAP, which like the equivalent options
  of the other keyboard drivers allows to specify the default in-kernel
  keyboard map. For obvious reasons this made to only work when also using
  SUNKBD_EMULATE_ATKBD.
- Implement sunkbd_check(), sunkbd_check_char() and sunkbd_clear_state(),
  which are also required for interoperability with kbdmux(4).
- Implement K_CODE mode and FreeBSD keypad compose.
- As a minor hack define KBD_DFLT_KEYMAP also in the !SUNKBD_EMULATE_ATKBD
  case so we can obtain fkey_tab from <dev/kbd/kbdtables.h> rather than
  having to duplicate it and #ifdef some more code.
- Don't use the TX-buffer for writing the two command bytes for setting the
  keyboard LEDs as this consequently requires a hardware FIFO that is at
  least two bytes in depth, which the NMOS-variant of the Zilog SCCs doesn't
  have. Thus use an inlined version of uart_putc() to consecutively write
  the command bytes (a cleaner approach would be to do this via the soft
  interrupt handler but that variant wouldn't work while in ddb(4)). [1]
- Fix some minor style(9) bugs.

PR: 90316 [1]
Reviewed by: marcel [1]

17 years agoDocument MNT_GJOURNAL option.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 23:40:44 +0000 (23:40 +0000)]
Document MNT_GJOURNAL option.

17 years agoNow, that we have gjournal in the tree add possibility to configure
Pawel Jakub Dawidek [Wed, 1 Nov 2006 22:51:49 +0000 (22:51 +0000)]
Now, that we have gjournal in the tree add possibility to configure
gmirror and graid3 in a way that it is not resynchronized after a
power failure or system crash.
It is safe when gjournal is running on top of gmirror/graid3.

17 years agoG_TYPE_NONE was replaced with G_TYPE_BOOL.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 22:28:11 +0000 (22:28 +0000)]
G_TYPE_NONE was replaced with G_TYPE_BOOL.

17 years agoChange spaces to tabs where needed.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 22:16:53 +0000 (22:16 +0000)]
Change spaces to tabs where needed.

17 years agoSpaces to tabs. (I shouldn't copy and paste from diff output to a terminal)
John Birrell [Wed, 1 Nov 2006 21:33:17 +0000 (21:33 +0000)]
Spaces to tabs. (I shouldn't copy and paste from diff output to a terminal)

Noticed by: pjd

17 years agoStyle nits.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 18:59:06 +0000 (18:59 +0000)]
Style nits.

17 years agoFix md(4) panic which occurs when I/O request different than
Pawel Jakub Dawidek [Wed, 1 Nov 2006 18:56:18 +0000 (18:56 +0000)]
Fix md(4) panic which occurs when I/O request different than
BIO_READ/BIO_WRITE is sent to vnode-backed provider (BIO_DELETE or
BIO_FLUSH).

Reported by: ceri

Add support for BIO_FLUSH to vnode-backed md(4) devices based on
VOP_FSYNC().

17 years agoFix compile botch in the last panic botch fix. :(
John Baldwin [Wed, 1 Nov 2006 18:24:12 +0000 (18:24 +0000)]
Fix compile botch in the last panic botch fix. :(

Pointy hat: jhb
Reported by: brueffer

17 years agoRemove the atkbd(4), atkbdc(4) and psm(4) hints. In theory they can be
Marius Strobl [Wed, 1 Nov 2006 18:17:53 +0000 (18:17 +0000)]
Remove the atkbd(4), atkbdc(4) and psm(4) hints. In theory they can be
used on sparc64 but that would be totally wrong in practice.

17 years agoIncrement nb_allocated while holding the pt_mtx lock to avoid races.
John Baldwin [Wed, 1 Nov 2006 16:50:13 +0000 (16:50 +0000)]
Increment nb_allocated while holding the pt_mtx lock to avoid races.

17 years agoComment and style tweak.
John Baldwin [Wed, 1 Nov 2006 16:48:33 +0000 (16:48 +0000)]
Comment and style tweak.

17 years agoSkip disabled CPU, because after we sched_bind() to a disabled CPU,
Pawel Jakub Dawidek [Wed, 1 Nov 2006 16:05:06 +0000 (16:05 +0000)]
Skip disabled CPU, because after we sched_bind() to a disabled CPU,
we won't be able to exit from the thread.

Function g_eli_cpu_is_disabled() stoled from kern_pmc.c.

PR: 104669
Reported by: Nikolay Mirin <nik@optim.com.ru>
MFC after: 1 week

17 years agoFix botch in last commit (I tested on 6.x which doesn't have TSO):
John Baldwin [Wed, 1 Nov 2006 15:36:47 +0000 (15:36 +0000)]
Fix botch in last commit (I tested on 6.x which doesn't have TSO):
- Test the mac_type rather than if_hwassist (since ifp doesn't exist yet)
  to determine if the adapter supports TSO and thus to change the sizes
  for the bus_dma tag.

Reviewed by: glebius

17 years agoForgot to remove this line.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 14:09:59 +0000 (14:09 +0000)]
Forgot to remove this line.

Reported by: maxim

17 years agoAquire Giant in the softdep_flush for clear_remove() and clear_inodedeps()
Konstantin Belousov [Wed, 1 Nov 2006 13:48:44 +0000 (13:48 +0000)]
Aquire Giant in the softdep_flush for clear_remove() and clear_inodedeps()
processing when QUOTA is set.

Reported and tested by: Peter Holm
Reviewed by: tegge
MFC after: 3 days

17 years agoBetter English.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 12:44:28 +0000 (12:44 +0000)]
Better English.

Submitted by: ru

17 years ago- Document two new function g_alloc_bio() and g_duplicate_bio().
Pawel Jakub Dawidek [Wed, 1 Nov 2006 12:42:14 +0000 (12:42 +0000)]
- Document two new function g_alloc_bio() and g_duplicate_bio().
- Bump modification date.
- Update copyright years.

17 years agoDo not include both <sys/types.h> and <sys/param.h>, it is a style bug as
Olivier Houchard [Wed, 1 Nov 2006 12:41:43 +0000 (12:41 +0000)]
Do not include both <sys/types.h> and <sys/param.h>, it is a style bug as
sys/types.h is included in sys/param.h, so instead just move the
#include <sys/param.h> before the headers that need it.

Spotted out by: bde

17 years agoDocument BIO_FLUSH request.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 12:34:35 +0000 (12:34 +0000)]
Document BIO_FLUSH request.

17 years agoAdd BIO_FLUSH support to GSHSEC class.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 12:30:51 +0000 (12:30 +0000)]
Add BIO_FLUSH support to GSHSEC class.

17 years agoAdd BIO_FLUSH support to GPT class.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 12:29:49 +0000 (12:29 +0000)]
Add BIO_FLUSH support to GPT class.

17 years agoFix vim syntax highlighting. Vim complained about the (comment). The syntax
Philip Paeps [Wed, 1 Nov 2006 12:13:08 +0000 (12:13 +0000)]
Fix vim syntax highlighting.  Vim complained about the (comment).  The syntax
file is also called "sendpr", not "send-pr".

17 years agoFix -fstrict-aliasing warning.
Ruslan Ermilov [Wed, 1 Nov 2006 10:56:33 +0000 (10:56 +0000)]
Fix -fstrict-aliasing warning.

17 years agoUpdate the code to the current sync(2) version:
Pawel Jakub Dawidek [Wed, 1 Nov 2006 09:37:11 +0000 (09:37 +0000)]
Update the code to the current sync(2) version:
- Do not modify mnt_flag without mount interlock held.
- Do not touch MNT_ASYNC flag, as this can lead to a race with nmount(2).

Pointed out by: tegge
Reviewed by: tegge

17 years agoFix powerpc build.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 09:22:33 +0000 (09:22 +0000)]
Fix powerpc build.

Reported by: Peter Grehan <grehan@freebsd.org>

17 years agoBring in support for the Rapid Spanning Tree Protocol (802.1w).
Andrew Thompson [Wed, 1 Nov 2006 09:07:47 +0000 (09:07 +0000)]
Bring in support for the Rapid Spanning Tree Protocol (802.1w).

RSTP provides faster spanning tree convergence, the protocol will exchange
information with neighboring switches to quickly transition to forwarding
without creating loops. The code will default to RSTP mode but will downgrade
any port connected to a legacy STP network so is fully backward compatible.

Reviewed by: syrinx
Tested by: syrinx

17 years agoWhen building an upgraded make, don't worry about processing it for
John Birrell [Wed, 1 Nov 2006 09:05:40 +0000 (09:05 +0000)]
When building an upgraded make, don't worry about processing it for
use with DTrace because the normal buildworld will do that when the
tools are built.

17 years agoAdd a build option to support WITH_CDDL and WITHOUT_CDDL, defaulting
John Birrell [Wed, 1 Nov 2006 09:02:11 +0000 (09:02 +0000)]
Add a build option to support WITH_CDDL and WITHOUT_CDDL, defaulting
to WITH_CDDL.

This option enables building code that is licensed under Sun's CDDL.
The DTrace code is licensed that way, so by default it will get built
unless the WITHOUT_CDDL option is used.

There is another build toggle, NO_CTF, which turns off execution of
ctfconvert and ctfmerge in sys.mk, but this can't be implemented as
WITH_/WITHOUT because bsd.own.mk isn't included in all Makefiles and
sys.mk is included automatically by make.

17 years agoAdd the trap-trace function for the hypervisor.
John Birrell [Wed, 1 Nov 2006 08:14:14 +0000 (08:14 +0000)]
Add the trap-trace function for the hypervisor.

17 years agoo OpenBSD 4.0 added.
Maxim Konovalov [Wed, 1 Nov 2006 04:56:35 +0000 (04:56 +0000)]
o OpenBSD 4.0 added.

17 years agoAdd a cnputs() function to write a string to the console with
John Birrell [Wed, 1 Nov 2006 04:54:51 +0000 (04:54 +0000)]
Add a cnputs() function to write a string to the console with
a lock to prevent interspersed strings written from different CPUs
at the same time.

To avoid putting a buffer on the stack or having to malloc one,
space is incorporated in the per-cpu structure. The buffer
size if 128 bytes; chosen because it's the next power of 2 size
up from 80 characters.

String writes to the console are buffered up the end of the line
or until the buffer fills. Then the buffer is flushed to all
console devices.

Existing low level console output via cnputc() is unaffected by
this change. ithread calls to log() are also unaffected to avoid
blocking those threads.

A minor change to the behaviour in a panic situation is that
console output will still be buffered, but won't be written to
a tty as before. This should prevent interspersed panic output
as a number of CPUs panic before we end up single threaded
running ddb.

Reviewed by: scottl, jhb
MFC after: 2 weeks

17 years agoo Expand "Nov" to "November" in Dd macro, remove eol whitespace.
Maxim Konovalov [Wed, 1 Nov 2006 04:46:06 +0000 (04:46 +0000)]
o Expand "Nov" to "November" in Dd macro, remove eol whitespace.

17 years agoDocument the cdp for controlling CD power.
Kevin Lo [Wed, 1 Nov 2006 03:45:24 +0000 (03:45 +0000)]
Document the cdp for controlling CD power.

Approved by: cognet

17 years agoAdd error code EPERM.
David Xu [Wed, 1 Nov 2006 01:54:30 +0000 (01:54 +0000)]
Add error code EPERM.

Reviewed by: ru, deischen

17 years agoReworking of how to add ports.
Julian Elischer [Wed, 1 Nov 2006 01:25:51 +0000 (01:25 +0000)]
Reworking of how to add ports.

submitted by: Jean Milanez Melo

17 years agoRemove debugging code I accidentally committed.
Pawel Jakub Dawidek [Wed, 1 Nov 2006 01:19:13 +0000 (01:19 +0000)]
Remove debugging code I accidentally committed.

17 years agoWhitespace and style nits.
John Baldwin [Tue, 31 Oct 2006 22:36:49 +0000 (22:36 +0000)]
Whitespace and style nits.

17 years agoHook up gjournal bits to the build.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:22:30 +0000 (22:22 +0000)]
Hook up gjournal bits to the build.

Sponsored by: home.pl

17 years agoAdd Makefile for geom_journal kernel module.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:21:47 +0000 (22:21 +0000)]
Add Makefile for geom_journal kernel module.

Sponsored by: home.pl

17 years agoForgot to add file with gjournal specific fsck code.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:21:01 +0000 (22:21 +0000)]
Forgot to add file with gjournal specific fsck code.

Sponsored by: home.pl

17 years agoAdd fs_unrefs field to the super block structure.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:18:33 +0000 (22:18 +0000)]
Add fs_unrefs field to the super block structure.

Sponsored by: home.pl

17 years agoAdd recently added fs_unrefs field.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:15:59 +0000 (22:15 +0000)]
Add recently added fs_unrefs field.

Sponsored by: home.pl

17 years agoUpdate after function renames.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:07:29 +0000 (22:07 +0000)]
Update after function renames.

Sponsored by: home.pl

17 years agoImplements gjournal support. If file system has gjournal support enabled
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:06:56 +0000 (22:06 +0000)]
Implements gjournal support. If file system has gjournal support enabled
and -p flag was given perform fast file system checking (bascially only
garbage collecting of orphaned objects).

Rename bread() to blread() and bwrite() to blwrite() as we now link to
the libufs library, which also implement functions with that names.

Sponsored by: home.pl

17 years agoTeach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 22:02:24 +0000 (22:02 +0000)]
Teach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag.

Sponsored by: home.pl

17 years agoTeach mount(8) about MNT_GJOURNAL flag.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:54:51 +0000 (21:54 +0000)]
Teach mount(8) about MNT_GJOURNAL flag.
MNT_GJOURNAL flag is not a mount-time flag, but it is needed to show
'gjournal' option in mount(8) output.

Sponsored by: home.pl

17 years agoAdd -J flag to both newfs(8) and tunefs(8) which allows to enable gjournal
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:52:28 +0000 (21:52 +0000)]
Add -J flag to both newfs(8) and tunefs(8) which allows to enable gjournal
support.
I left -j flag for UFS journal implementation which we may gain at some
point.

Sponsored by: home.pl

17 years agoAdd gjournal specific code to the UFS file system:
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:48:54 +0000 (21:48 +0000)]
Add gjournal specific code to the UFS file system:
- Add FS_GJOURNAL flag which enables gjournal support on a file system.
- Add cg_unrefs field to the cylinder group structure which holds
  number of unreferenced (orphaned) inodes in the given cylinder group.
- Add fs_unrefs field to the super block structure which holds
  total number of unreferenced (orphaned) inodes.
- When file or a directory is orphaned (last reference is removed, but
  object is still open), increase fs_unrefs and cg_unrefs fields,
  which is a hint for fsck in which cylinder groups looks for such
  (orphaned) objects.
- When file is last closed, decrease {fs,cg}_unrefs fields.
- Add VV_DELETED vnode flag which points at orphaned objects.

Sponsored by: home.pl

17 years agoFix buildworld.
Gleb Smirnoff [Tue, 31 Oct 2006 21:44:46 +0000 (21:44 +0000)]
Fix buildworld.

17 years agoAdd MNT_GJOURNAL flag which indicates, that file system has gjournal
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:38:51 +0000 (21:38 +0000)]
Add MNT_GJOURNAL flag which indicates, that file system has gjournal
support enabled.
Add mnt_gjprovider field which keeps gjournal provider's name on which
file system is placed on. This allows to not place file system on gjournal
directly and allows gjournal class to pair gjournal provider with file
system.

Sponsored by: home.pl

17 years agoAdd userland control utility for gjournal GEOM class.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:32:54 +0000 (21:32 +0000)]
Add userland control utility for gjournal GEOM class.

Sponsored by: home.pl

17 years agoAdd gjournal GEOM class (kernel side), which implements block level
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:31:00 +0000 (21:31 +0000)]
Add gjournal GEOM class (kernel side), which implements block level
journaling and can be tought about marking file system as clean before
doing journal switch, which easly allows to add journaling to file
systems that don't have this feature.

Sponsored by: home.pl

17 years agoImplement BIO_FLUSH handling by simply passing it down to the components.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:23:51 +0000 (21:23 +0000)]
Implement BIO_FLUSH handling by simply passing it down to the components.

Sponsored by: home.pl

17 years agoImplement cgwrite1(3) function which stored a given cylinder group on disk.
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:21:48 +0000 (21:21 +0000)]
Implement cgwrite1(3) function which stored a given cylinder group on disk.

Sponsored by: home.pl

17 years agoImplement BIO_FLUSH handling for da(4), amr(4), ata(4) and ataraid(4).
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:19:25 +0000 (21:19 +0000)]
Implement BIO_FLUSH handling for da(4), amr(4), ata(4) and ataraid(4).

Sponsored by: home.pl

17 years agoAdd a new disk flag - DISKFLAG_CANFLUSHCACHE, which indicates that the disk
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:12:43 +0000 (21:12 +0000)]
Add a new disk flag - DISKFLAG_CANFLUSHCACHE, which indicates that the disk
can handle BIO_FLUSH requests.

Sponsored by: home.pl

17 years agoAdd a new I/O request - BIO_FLUSH, which basically tells providers below to
Pawel Jakub Dawidek [Tue, 31 Oct 2006 21:11:21 +0000 (21:11 +0000)]
Add a new I/O request - BIO_FLUSH, which basically tells providers below to
flush their caches. For now will mostly be used by disks to flush their
write cache.

Sponsored by: home.pl

17 years agoremove gdbserver on ARCH i386 as we now install it again..
John-Mark Gurney [Tue, 31 Oct 2006 21:05:35 +0000 (21:05 +0000)]
remove gdbserver on ARCH i386 as we now install it again..

Submitted by: Pawel Worach

17 years agoMake EWOULDBLOCK a recoverable error so that the request is retransmitted.
Mohan Srinivasan [Tue, 31 Oct 2006 20:25:37 +0000 (20:25 +0000)]
Make EWOULDBLOCK a recoverable error so that the request is retransmitted.
This bug results in data corruption with NFS/TCP. Writes are silently dropped
on EWOULDBLOCK (because socket send buffer is full and sockbuf timer fires).

Reviewed by: ups@

17 years agoFix a typo resulting in truncated linux32 signal trampoline code copied
Konstantin Belousov [Tue, 31 Oct 2006 17:53:02 +0000 (17:53 +0000)]
Fix a typo resulting in truncated linux32 signal trampoline code copied
to the usermode. Usually, signal handler segfaulted on return.

Reviewed by: jhb
MFC after: 3 days

17 years agoAllocate receive and transmit data structures during attach() and free them
John Baldwin [Tue, 31 Oct 2006 17:21:14 +0000 (17:21 +0000)]
Allocate receive and transmit data structures during attach() and free them
during detach() similar to other NIC drivers rather than allocating them
during init() and freeing them during stop():
- Move creation of tx bus_dma tag amd maps and tx_buffer_area from
  em_setup_transmit_structures() to em_allocate_transmit_structures().
- Call em_allocate_xxx_structures() in em_attach().
- Only call em_free_xxx_structures() in em_detach().
- Change em_setup_xxx_structures() to free any existing tx or rx buffers
  and in the case of rx repopulate the ring with newer buffers.

Reviewed by: jfv

17 years ago- Use callout_init_mtx() to close various callout-related races.
John Baldwin [Tue, 31 Oct 2006 17:05:02 +0000 (17:05 +0000)]
- Use callout_init_mtx() to close various callout-related races.
- Drain the two timers in detach.
- Check IFF_DRV_RUNNING in the link task and bail w/o doing anything if
  it is clear.

Reviewed by: jfv, scottl

17 years agoRework the transmit register handling. In em_encap() store index of
Gleb Smirnoff [Tue, 31 Oct 2006 16:19:21 +0000 (16:19 +0000)]
Rework the transmit register handling. In em_encap() store index of
the EOP descriptor in the first descriptor of the packet. And then
in em_txeof() search for DD bits set only in the EOP descriptors,
embedding the cleanup of all packet's descriptors into inner loop.

This change is important for future chips, where DD bit is going
to be set only on the EOP descriptors.

Submitted by: jfv

17 years agoRemove unused softc pointer variable from the probe routine.
John Baldwin [Tue, 31 Oct 2006 16:13:38 +0000 (16:13 +0000)]
Remove unused softc pointer variable from the probe routine.

CID: 1560
Found by: Coverity Prevent (tm)

17 years agoMerge new vendor release - 6.2.9.
Gleb Smirnoff [Tue, 31 Oct 2006 15:00:14 +0000 (15:00 +0000)]
Merge new vendor release - 6.2.9.

Details:
o if_em.c changes:
  - Added several new PCI ids.
  - Check em_check_phy_reset_block() before doing SIOCSIFMEDIA ioctl.
  - Don't touch TARC registers, they are now handled in shared
    code in if_em_hw.c.
  - Move RDH and RDT setting to the end of
    em_initialize_receive_unit().
  - Declare em_read_pcie_cap_reg(), now empty.
o if_em_hw.c dropped in from vendor, then restored rev. 1.15.
o if_em_hw.h dropped in from vendor, then modified:
  - Added RX overrun interrupt flag to interrupt enable mask.
  - Remove declarations of em_io_read(), em_io_write().

Approved by: jfv

17 years agoBind to INADDR_ANY in the default configuration. This makes bsnmpd(1)
Hartmut Brandt [Tue, 31 Oct 2006 10:23:28 +0000 (10:23 +0000)]
Bind to INADDR_ANY in the default configuration. This makes bsnmpd(1)
automatically work on multi-homed hosts and without explicite specification
of the hostname in the config file.

Submitted by: jmg

17 years agoDefine a base OID for the FreeBSD version as returned in sysObjectID
Hartmut Brandt [Tue, 31 Oct 2006 10:09:10 +0000 (10:09 +0000)]
Define a base OID for the FreeBSD version as returned in sysObjectID
by bsnmpd(1). The actual OID is formed by appending the release numbers
to this base OID.

Idea by: phk

17 years agoThis commit was generated by cvs2svn to compensate for changes in r163820,
Hartmut Brandt [Tue, 31 Oct 2006 09:00:35 +0000 (09:00 +0000)]
This commit was generated by cvs2svn to compensate for changes in r163820,
which included commits to RCS files with non-trunk default branches.

17 years agoVendor patch: synthesize the initial value for sysObjectId from the value
Hartmut Brandt [Tue, 31 Oct 2006 09:00:35 +0000 (09:00 +0000)]
Vendor patch: synthesize the initial value for sysObjectId from the value
of uname -r in FreeBSD. This value can be overwritten in the configuration
file.

Suggested by: phk

17 years agoAvoid implict node generation in oids, people tell me a fair bit of
Poul-Henning Kamp [Tue, 31 Oct 2006 08:18:02 +0000 (08:18 +0000)]
Avoid implict node generation in oids, people tell me a fair bit of
SNMP software has trouble with them.