Commit Graph

149222 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
48423f5d8f Be more precise how to get fsids - 'mount -v' doesn't show fsids unless is run
by root.

Approved by:	re (kib)
2009-08-17 07:38:47 +00:00
Scott Long
aa1214d9a2 Update the mptutil man page for FreeBSD 8.0
Approved by:	re
2009-08-17 06:15:44 +00:00
Scott Long
b1f3db024c Update the man page for manual section 8
Approved by:	re
2009-08-17 06:15:08 +00:00
Scott Long
d78c3fa1d3 Update the man page for FreeBSD 8.0
Approved by:	re
2009-08-17 06:11:30 +00:00
Scott Long
3c6bf4efb9 Move mfiutil.1 to mfiutil.8 for consistency. Remove superfulous README.
Approved by:	re
2009-08-17 06:05:55 +00:00
Marcel Moolenaar
cee5f0ca2d Emit a proper error message instead of dumping core when 1)
GEOM_PART does not exist in the kernel, and 2) the GEOM in
question does not exist.
Additionally abort in case of programming errors that result
in neither the class nor geom not being present in the gctl
request.

Submitted by:	"Andrey V. Elsukov" <bu7cher@yandex.ru>
Approved by:	re (kib)
2009-08-16 21:27:35 +00:00
Ed Schouten
f6b3749db3 Fix small style regression introduced by the MPSAFE newbus code.
Approved by:	re (rwatson)
2009-08-16 19:55:53 +00:00
Andrew Thompson
532b195250 Change the usb workers from kernel processes to threads, this is mostly a
cosmetic change to reduce cruft in the proc table.

Also change the idle wait message to `-` like how taskqueues are.

Reviewed by:	julian
Approved by:	re (kib)
2009-08-16 14:13:55 +00:00
Rink Springer
ab1a777e91 Prevent sysinstall from needlessly waiting for confirmation when using an USB
device in non-interactive mode.

If there are no USB devices, sysinstall gives an error messages, and if there
is >1, it'll ask which one is to be used. This change allows a non-interactive
install from USB media to succeed without any user interaction if there is
exactly one USB disk device in the system it can use.

Submitted by:	Daniel O'Connor < doconnorat gsoft dot com dot au >
Reviewed by:	randi
Approved by:	re (rwatson)
2009-08-16 10:11:33 +00:00
Marcel Moolenaar
538e86713d Fix misalignment in nvpair_native_embedded() caused by the compiler
replacing the bzero(). See also revision 195627, which fixed the
misalignment in nvpair_native_embedded_array().

Approved by:	re (kensmith)
2009-08-16 01:48:46 +00:00
Marcel Moolenaar
97e84697ae Decouple ACPI CPU Ids from FreeBSD's cpuid. The ACPI Ids can be
sparse, which causes a kernel assert.

Approved by:	re (kensmith)
2009-08-16 01:43:08 +00:00
Robert Watson
a38fdf2946 Rather than fix questionable ifnet list locking in the implementation of
the kern.polling.enable sysctl, remove the sysctl.  It has been deprecated
since FreeBSD 6 in favour of per-ifnet polling flags.

Reviewed by:	luigi
Approved by:	re (kib)
2009-08-15 23:07:43 +00:00
Robert Watson
d931ea0961 Remove unused if_rawoutput() macro; it has been unused since at least
FreeBSD 2.

Approved by:	re (kib)
2009-08-15 22:26:26 +00:00
Michael Tuexen
810ec53688 * Fix a bug where PR-SCTP settings are ignore when using implicit
association setup.
* Fix a bug where message with illegal stream ids are not deleted.
* Fix a crash when reporting back unsent messages from the send_queue.
* Fix a bug related to INIT retransmission when the socket is already
  closed.
* Fix a bug where associations were stalled when partial delivery API
  was enabled.
* Fix a bug where the receive buffer size was smaller than the
  partial_delivery_point.

Approved by: re, rrs (mentor)
MFC after: One day.
2009-08-15 21:10:52 +00:00
Attilio Rao
68a5590836 Port recent IPI enhachements to en:
* Introduce the ipi_nmi_handler() function for the Xen infrastructure
* Fixup adeguately the ipi sender functions

Approved by:	re (kib)
2009-08-15 18:37:06 +00:00
Giorgos Keramidas
bc5980cb6c iostat: add a bit of space between tty in/out columns
The columns for tty input and output may bump against each other
if the tty output needs more than 5 columns.  Add a bit of space
that pushes everything 1 column to the right, but also avoids the
problem.

Approved by:	re (rwatson)
2009-08-15 17:57:21 +00:00
Dima Panov
5ad0a62fe0 Add my birthday
Approved by:	re (rwatson) miwi (mentor)
2009-08-15 15:40:30 +00:00
Stanislav Sedov
2dc8b759bd - Proprely intialize UART parameters at probe stage, so uart(4)
will initialize the FIFO memory correctly on attach.  Before
  that this values was intialized in only in at91_usart_bus_attach
  which is called after the uart(4) memory allocation happens.

Approved by:	re (kib)
MFC after:	1 week
2009-08-15 15:15:20 +00:00
Stanislav Sedov
67c601d5f6 - Avoid overflowing the swap size counters in human-readable mode
by introducing the new CONVERT_BLOCKS macro which operates on
  sizes already converted to number of blocks.  With this macro
  it is not longer needed to perform needless multiplication by
  blocksize just to divide on it later in CONVERT macro.

Approved by:	re (kib)
MFC after:	1 week
2009-08-15 14:39:33 +00:00
Edward Tomasz Napierala
70ff501c96 Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4) and mfi(4).
Approved by:	re (rwatson)
2009-08-15 11:47:05 +00:00
Qing Li
3ef5e21d01 In function ip_output(), the cached route is flushed when there is a
mismatch between the cached entry and the intended destination. The
cached rtentry{} is flushed but the associated llentry{} is not. This
causes the wrong destination MAC address being used in the output
packets. The fix is to flush the llentry{} when rtentry{} is cleared.

Reviewed by:	kmacy, rwatson
Approved by:	re
2009-08-14 23:44:59 +00:00
Marko Zec
9abb486279 Appease VNET_DEBUG - in if_vmove we temporarily switch i.e.
recurse from one vnet to another which is OK, so no need
to flood the console with warnings here.

Approved by:	re (rwatson), julian (mentor)
2009-08-14 22:46:45 +00:00
Marko Zec
f92ae4d706 SCTP is not yet compatible with options VIMAGE kernels although it compiles
with VIMAGE defined, so explicitly disallow building such kernels.

Reviewed by:	rrs
Approved by:	re (rwatson), julian (mentor)
2009-08-14 22:43:25 +00:00
Marko Zec
67addcde86 Make VNET_DEBUG a standalone compile-time option, i.e. decouple it from
INVARIANTS.

Reviewed by:	bz
Approved by:	re (rwatson), julian (mentor)
2009-08-14 22:41:39 +00:00
Bjoern A. Zeeb
8d518523cc Add a new macro to test that a variable could be loaded atomically.
Check that the given variable is at most uintptr_t in size and that
it is aligned.

Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate
      alignment -- however, the function of ALIGN() is to guarantee
      alignment, and therefore may lead to stronger alignment
      enforcement than necessary for types that are smaller than
      sizeof(uintptr_t).

Add checks to mtx, rw and sx locks init functions to detect possible
breakage. This was used during debugging of the problem fixed with
r196118 where a pointer was on an un-aligned address in the dpcpu area.

In collaboration with:	rwatson
Reviewed by:		rwatson
Approved by:		re (kib)
2009-08-14 21:46:54 +00:00
John Baldwin
21157ad3b1 Adjust the handling of the local APIC PMC interrupt vector:
- Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc()
  routines in the local APIC code that the hwpmc(4) driver can use to
  manage the local APIC PMC interrupt vector.
- Do not enable the local APIC PMC interrupt vector by default when
  HWPMC_HOOKS is enabled.  Instead, the hwpmc(4) driver explicitly
  enables the interrupt when it is succesfully initialized and disables
  the interrupt when it is unloaded.  This avoids enabling the interrupt
  on unsupported CPUs which may result in spurious NMIs.

Reported by:	rnoland
Reviewed by:	jkoshy
Approved by:	re (kib)
MFC after:	2 weeks
2009-08-14 21:05:08 +00:00
John Baldwin
b03ddec95f Add the ability to build a release from an SVN checkout instead of a CVS
checkout.  If SVNROOT is specified, then the source tree will be checked
out from that SVN repository instead of using CVS.  ports and docs still
use CVS.  If SVNROOT is not specified, then the source tree will be checked
out using CVS.  An explicit SVN branch can be specified using SVNBRANCH
(e.g. SVNBRANCH=stable/8).  If SVNBRANCH is not set but RELEASETAG is set
to a CVS branch (such as RELENG_8) the appropriate SVN branch will be
inferred from the CVS branch using svnbranch.awk.

Note that there are still several open questions about using SVN instead
of CVS in the release process.  However, this does enable one to build a
release from an SVN repository if needed.

Approved by:	re (kensmith)
2009-08-14 20:35:42 +00:00
John Baldwin
e70dd3b105 Purge mergeinfo from files that were temporarily renamed while USB2 was
imported into the tree alongside USB.

Approved by:	re (mergeinfo blanket)
2009-08-14 20:03:53 +00:00
Remko Lodder
eac295c9a0 Remove bogus char cast.
PR:		118014
Submitted by:	Gardner Bell <gbell72 at rogers dot com>
Approved by:	re (rwatson), imp (mentor, implicit)
MFC after:	immediate
2009-08-14 18:18:51 +00:00
Colin Percival
75a1f6cf5f Make sysinstall recognize /dev/ada* disk devices. The description string
"SATA disk device" reflects the current state of /dev/ada*; this may be
changed in the future if other drive types start appearing as /dev/ada*.

Submitted by:	randi
Details about what disks can appear as /dev/ada* supplied by: scottl
Approved by:	re (rwatson)
2009-08-14 13:24:44 +00:00
Scott Long
fc58801ccc Add mptutil, a basic utility for managing MPT SCSI/SATA/SAS controllers.
Drive and controller status can be reported, basic attributes changed,
and arrays and spares can be created and deleted.

Approved by:	re
Obtained from:	Yahoo! Inc.
2009-08-14 13:13:12 +00:00
Scott Long
6d600732eb Fix is 32bit bug missed in testing.
Approved by:	re
2009-08-14 12:30:10 +00:00
Konstantin Belousov
165a3b418f When a UFS node is truncated to the zero length, e.g. by explicit
truncate(2) call, or by being removed or truncated on open, either
new softupdate freeblks structure is allocated to track the freed
blocks of the node, or truncation is done syncronously when too many SU
dependencies are accumulated. The decision does not take into account
the allocated freeblks dependencies, allowing workloads that do huge
amount of truncations to exhaust the kernel memory.

Take the number of allocated freeblks into consideration for
softdep_slowdown().

Reported by:	pluknet gmail com
Diagnosed and tested by:	pho
Approved by:	re (rwatson)
MFC after:	1 month
2009-08-14 11:00:38 +00:00
Konstantin Belousov
48bd6d4a49 In nfs_upgrade_vnlock(), assert that the vnode is locked. It is for all
pathes, as far as I see and testing seems to confirm it. Comparision of
old_lock with LK_SHARED make sense only if vnode is locked by current
thread.

When downgrading, pass LK_RETRY to the vn_lock(), since otherwise
vn_lock() unlocks the doomed vnode, causing extra unlock.

Reported and tested by:	pho
Approved by:	re (rwatson)
MFC after:	3 weeks
2009-08-14 10:59:17 +00:00
Konstantin Belousov
aabd624cf4 Add the address of the lock to the KTR_LOCK trace.
Tested by:	pho
Approved by:	re (rwatson)
2009-08-14 10:57:57 +00:00
Konstantin Belousov
8f40845151 Correctly handle unlock for !MAKEENTRY case, after successfull attempt of
lock upgrade cache shall be unlocked from write.

Reported by:	Lucius Windschuh <lwindschuh googlemail com>
Reviewed by:	kan
Approved by:	re (rwatson)
2009-08-14 10:57:28 +00:00
Julian Elischer
72034f5548 Fix ipfw crash on uid or gid check.
Receiving any ip packet for which there is no existing socket will
crash if ipfw has a uid or gid test rule, as the uid/gid
of the non existent owner of said non existent socket is tested.
Brooks introduced this error as part of his >16 gids patch.
It appears to be a cut-n-paste error from similar code a few lines
before. The old code used the 'pcb' variable here, but in the
new code that switched the 'inp' variable, which is often NULL
and what is tested in the code further up. The rest of the multi-gid
patch for ipfw seems solid (and cleaner than previous code).

Reviewed by:	brooks
Approved by:	re (rwatson)
2009-08-14 10:09:45 +00:00
Scott Long
763fae7918 ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6
controllers.  Controller, array, and drive status can be checked, basic
attributes can be changed, and arrays and spares can be created and deleted.
Controller firmware can also be flashed.

This does not replace MegaCLI, found in ports, as that is officially sanctioned
and supported by LSI and includes vastly more functionality.  However, mfiutil
is open source and guaranteed to provide basic functionality, which can be
especially useful if you have a problem and can't get MegaCLI to work.

Approved by:    re
Obtained from:  Yahoo! Inc.
2009-08-13 23:18:45 +00:00
Attilio Rao
dc6fbf6545 * Completely Remove the option STOP_NMI from the kernel. This option
has proven to have a good effect when entering KDB by using a NMI,
but it completely violates all the good rules about interrupts
disabled while holding a spinlock in other occasions.  This can be the
cause of deadlocks on events where a normal IPI_STOP is expected.
* Adds an new IPI called IPI_STOP_HARD on all the supported architectures.
This IPI is responsible for sending a stop message among CPUs using a
privileged channel when disponible. In other cases it just does match a
normal IPI_STOP.
Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64
architectures, while on the other has a normal IPI_STOP effect. It is
responsibility of maintainers to eventually implement an hard stop
when necessary and possible.
* Use the new IPI facility in order to implement a new userend SMP kernel
function called stop_cpus_hard(). That is specular to stop_cpu() but
it does use the privileged channel for the stopping facility.
* Let KDB use the newly introduced function stop_cpus_hard() and leave
stop_cpus() for all the other cases
* Disable interrupts on CPU0 when starting the process of APs suspension.
* Style cleanup and comments adding

This patch should fix the reboot/shutdown deadlocks many users are
constantly reporting on mailing lists.

Please don't forget to update your config file with the STOP_NMI
option removal

Reviewed by:	jhb
Tested by:	pho, bz, rink
Approved by:	re (kib)
2009-08-13 17:09:45 +00:00
Rafal Jaworowski
cbb3cb151c Use correct wbinv operation in pmap_l2cache_wbinv_range().
Submitted by:	Michal Hajduk
Reviewed by:	stas
Approved by:	re (kib)
Obtained from:	Semihalf
2009-08-13 15:56:09 +00:00
Bjoern A. Zeeb
87a61ebd4c Rather than replicating the maths from the kernel, use the
value the kernel calculated directly as we already read it
with struct vnet.  This will make kvm_vnet.c more resilent
in case of possible kernel changes.

Reviewed by:	rwatson
Approved by:	re (kib)
2009-08-13 14:59:04 +00:00
Edward Tomasz Napierala
abd370a36b Remove CDDL warning.
Approved by:	re (kib), core
2009-08-13 12:28:30 +00:00
Bjoern A. Zeeb
eb79e1c76e Make it possible to change the vnet sysctl variables on jails
with their own virtual network stack. Jails only inheriting a
network stack cannot change anything that cannot be changed from
within a prison.

Reviewed by:	rwatson, zec
Approved by:	re (kib)
2009-08-13 10:26:34 +00:00
Bjoern A. Zeeb
20b0cdb749 Put multiple instructions into a block when iterating; unbreaks
NET_RT_DUMP, which otherwise only returned information of AF_MAX.
This was broken in r193232 (save your time - my bug, my fix).

PR:		kern/137700
Reported by:	Larry Baird (lab gta.com)
Tested by:	Larry Baird (lab gta.com)
Reviewed by:	zec, lstewart, qing
Approved by:	re (kib)
2009-08-13 09:29:52 +00:00
Bjoern A. Zeeb
e7fba5c772 Start respecting WITHOUT_INET6.
Make regression/priv compile again after the multi-IP jail
changes.  Note that we are still using the legacy jail(2)
rather than the jail_set(2)/jail(3) syscall.
Add an IPv4,  and an IPv6 loopback address in case we compile
with INET6 enabled.

Make the priv_vfs_extattr_system compile on amd64 as well using the
proper length modifier to printf(3) for ssize_t.

Reviewed by:	rwatson
Approved by:	re (kib)
2009-08-13 09:11:47 +00:00
Dag-Erling Smørgrav
9517e86625 Update and remove CVS-specific items
Approved by:	re (kib)
2009-08-13 06:07:38 +00:00
Matt Jacob
5cc3786c64 Have at least *some* default WWN to fall back on,
otherwise Sun branded FC cards won't configure.

Reviewed by:	Ken, Scott
Approved by:	re
2009-08-13 01:17:26 +00:00
Sam Leffler
ab501dd65d Drain link state event changes posted during vap destroy. This is a
band-aid for the general problem that if_link_state_change can be
called between if_detach and if_free leaving a task queued that has
been free'd.

Spotted by:	thompsa
Reviewed by:	rwatson
Approved by:	re (rwatson)
2009-08-12 21:19:19 +00:00
Sam Leffler
692eebe092 First (early) draft of net80211 documentation. Note this is
focused on driver writers (as opposed to folks adding to net80211).

Reviewed by:	wkoszek
Approved by:	re (rwatson)
2009-08-12 21:03:16 +00:00
Qing Li
09b0354839 A piece of code was added to install a host route when an IPv6 interface
address is configured with a /128 prefix. This is no longer necessary due
to r192011. In fact that code conflicts with r192011. This patch removes
the host route installation when detecting the /128 prefix, and instead
let the code added by r192011 to install the loopback route for that IPv6
interface address.

Reviewed by:	bz
Approved by:	re
2009-08-12 19:15:26 +00:00