Commit Graph

155349 Commits

Author SHA1 Message Date
Jeff Roberson
5305359514 - Round up the journal size to the block size so we don't confuse fsck.
Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>

 - Only require 256k of blocks per-cg when trying to allocate contiguous
   journal blocks.  The storage may not actually be contiguous but is at
   least within one cg.
 - When disabling SUJ leave SU enabled and report this to the user.  It
   is expected that users will upgrade SU filesystems to SUJ and want
   a similar downgrade path.
2010-05-18 01:45:28 +00:00
Rick Macklem
5ed9b96420 Add a sanity check for a negative args.fhsize to the experimental
NFS client.

MFC after:	5 days
2010-05-17 23:55:38 +00:00
John Baldwin
4d84f49da4 Prevent unloading a kld for a driver that has subinterfaces (vlan and/or
wlan interfaces) from being automatically reloaded via devd shutdown
event handlers.
- Revert part of my previous changes to call ifn_stop on subinterfaces
  when an interface is detached.  It is better to destroy the interfaces
  first so that an 'ifconfig foo0.blah down' doesn't result in ifconfig
  auto-loading if_foo.ko.  The ifconfig command will not be invoked if
  foo0.blah is gone when ifn_stop() is called.  Furthermore, it is not
  necessary to explicitly invoke ifn_stop() after the subinterface is
  destroyed as devd will already do that.
- Pass -n to ifconfig when destroying interfaces so that destroying a
  cloned interface does not kldload any drivers.

Reviewed by:	dougb
MFC after:	4 days
2010-05-17 19:51:34 +00:00
John Baldwin
6f359e2828 Ignore failures from removing multicast addresses from the parent (trunk)
interface when tearing down a vlan interface.  If a trunk interface is
detached, all of its multicast addresses are removed before the ifnet
departure eventhandlers are invoked.  This means that all of the multicast
addresses are removed before the vlan interfaces are removed which causes
the if_delmulti() calls in the vlan teardown to fail.

In the VLAN_ARRAY case, this left vlan interfaces referencing a no longer
valid parent interface.  In the !VLAN_ARRAY case, the eventhandler gets
stuck in an infinite loop retrying vlan_unconfig_locked() forever.  In
general the callers of vlan_unconfig_locked() do not expect nor handle
failure, so I believe it is safer to ignore the errors and tear down as
much of the vlan state as possible.

Silence from:	net@
MFC after:	4 days
2010-05-17 19:36:56 +00:00
Pawel Jakub Dawidek
c9a9640635 Use better type for siginfo (volatile sig_atomic_t instead of int).
Pointed out by:	jh
2010-05-17 19:13:49 +00:00
Ivan Voras
27ad5065fe Slightly improve wording. 2010-05-17 11:18:33 +00:00
Kai Wang
5dfab45b42 Removed ar(1)'s support for compressed archives. This change removes
ar(1)'s dependencies on compressor libraries -lz, -lbz2 and -llzma and
fixes building HEAD on some versions of FreeBSD[78]. Option -j and -z
is now accepted but ignored.

Compressed ar(1) archives are not useful without a ld(1) that can read
them. Also, the current ar(1) compression scheme prevents random
access of archive members and needs to be redesigned anyway.

Submitted by:	kientzle (original patch)
Reviewed by:	delphij
Discussed on:	-current mailing list
2010-05-17 09:37:59 +00:00
Xin LI
c8203b8a17 Fix build. 2010-05-17 07:06:54 +00:00
Alexander Motin
c4eb8f475a Make mvs_if.c to not be always linked statically into the kernel.
Link it same way as mvs.c.
2010-05-17 03:51:57 +00:00
Alan Cox
9ab6032f73 On entry to pmap_enter(), assert that the page is busy. While I'm
here, make the style of assertion used by pmap_enter() consistent
across all architectures.

On entry to pmap_remove_write(), assert that the page is neither
unmanaged nor fictitious, since we cannot remove write access to
either kind of page.

With the push down of the page queues lock, pmap_remove_write() cannot
condition its behavior on the state of the PG_WRITEABLE flag if the
page is busy.  Assert that the object containing the page is locked.
This allows us to know that the page will neither become busy nor will
PG_WRITEABLE be set on it while pmap_remove_write() is running.

Correct a long-standing bug in vm_page_cowsetup().  We cannot possibly
do copy-on-write-based zero-copy transmit on unmanaged or fictitious
pages, so don't even try.  Previously, the call to pmap_remove_write()
would have failed silently.
2010-05-16 23:45:10 +00:00
Nathan Whitehorn
0532c3a5a5 Teach gpart about bootcode on APM. 2010-05-16 22:21:33 +00:00
Nathan Whitehorn
4a26780b9a Pull OF_quiesce() out of the MI Open Firmware layer and entirely into
PPC ofw_machdep.c, in recognition of its state as a machine specific hack.

Requested by:	marius
2010-05-16 22:01:43 +00:00
Kip Macy
83e711ec14 allocate ipv6 flows from the ipv6 flow zone
reported by: rrs@

MFC after:	3 days
2010-05-16 21:48:39 +00:00
Pawel Jakub Dawidek
f09bc09332 On SIGINFO print current values on stderr. 2010-05-16 21:06:26 +00:00
Tim Kientzle
fd4cf0607f Reorganize slightly in preparation for making lzma and bz2 support conditional. 2010-05-16 20:43:17 +00:00
Nathan Whitehorn
97af4af5b0 It is not necessary (and in some cases harmful) to hardcode ata_kauai's
IRQ to 39 on K2 devices, as well as Shasta ones.

Reported by:	Andreas Tobler
2010-05-16 20:31:31 +00:00
Nathan Whitehorn
bf17422a43 Enable smu(4) to report fan speeds on late-model Powermac G5s. 2010-05-16 19:57:38 +00:00
Pawel Jakub Dawidek
2b3d97b81d Fix userland build by making io_task available only for the kernel and by
providing taskq_dispatch_safe() macro.

MFC after:	1 week
2010-05-16 19:44:08 +00:00
Randall Stewart
4542827d4d This pushes all of JC's patches that I have in place. I
am now able to run 32 cores ok.. but I still will hang
on buildworld with a NFS problem. I suspect I am missing
a patch for the netlogic rge driver.

JC check and see if I am missing anything except your
core-mask changes

Obtained from:	JC
2010-05-16 19:43:48 +00:00
Alan Cox
a4bc2c8929 Correct an error of omission in r202897: Now that amd64 uses the direct map
to access the message buffer, we must explicitly request that the underlying
physical pages are included in a crash dump.

Reported by:	Benjamin Kaduk
2010-05-16 19:25:56 +00:00
Nathan Whitehorn
4dea0435b5 Relocate interrupt sense setting for K2 SATA from the ATA driver to the
OFW PCI layer and read the sense directly from the device tree instead
of guessing.

MFC after:	1 week
2010-05-16 17:55:09 +00:00
Randall Stewart
f751743351 This adds back the Iterator to the sctp
code base. We now properly have ONE thread
that services all VNET's. Also we purge out
the old timer based iterator code which had
multiple LOR's and other issues.

MFC after:	3 days
2010-05-16 17:03:56 +00:00
Alan Cox
a1a95cd608 Add a comment about the proper use of vm_object_page_remove().
MFC after:	1 week
2010-05-16 16:54:05 +00:00
Nathan Whitehorn
79bf3fcd18 On PowerMac11,2 and (presumably) PowerMac12,1, we need to quiesce the
firmware in order to take over control of the SMU. Without doing this,
the firmware background process doing fan control will run amok as we
take over the system and crash the management chip.

This is limited to these two machines because our kernel is heavily
dependent on firmware accesses, and so quiescing firmware can cause
nasty problems.
2010-05-16 15:56:59 +00:00
Nathan Whitehorn
c59bb3ff62 On SMP G5 systems, sometimes the power-mode-data property is only found
on CPU 0, so look there if it is not otherwise available.
2010-05-16 15:21:13 +00:00
Nathan Whitehorn
ca2c19312e Add support for the U4 PCI-Express bridge chipset used in late-generation
Powermac G5 systems. MSI and several other things are not presently
supported.

The U3/U4 internal device support portions of this change were contributed
by Andreas Tobler.

MFC after:	1 week
2010-05-16 15:18:25 +00:00
Pawel Jakub Dawidek
ed3c664257 Allow to configure UMA usage for ZIO data via loader and turn it on by
default for amd64. On i386 I saw performance degradation when UMA was used,
but for amd64 it should help.

MFC after:	3 days
2010-05-16 15:14:59 +00:00
Pawel Jakub Dawidek
cfb3e98d37 Add task structure to zio and use it instead of allocating one.
This eliminates the only place where we can sleep when calling zio_interrupt().
As a side-effect this can actually improve performance a little as we
allocate one less thing for every I/O.

Prodded by:	kib
MFC after:	1 week
2010-05-16 15:12:34 +00:00
Marius Strobl
ffce828c8c Add the ofw_bus_if.h dependency introduced with r207585. 2010-05-16 12:39:17 +00:00
Pawel Jakub Dawidek
ea478cb1da The whole point of having dedicated worker thread for each leaf VDEV was to
avoid calling zio_interrupt() from geom_up thread context. It turns out that
when provider is forcibly removed from the system and we kill worker thread
there can still be some ZIOs pending. To complete pending ZIOs when there is
no worker thread anymore we still have to call zio_interrupt() from geom_up
context. To avoid this race just remove use of worker threads altogether.
This should be more or less fine, because I also thought that zio_interrupt()
does more work, but it only makes small UMA allocation with M_WAITOK.
It also saves one context switch per I/O request.

PR:		kern/145339
Reported by:	Alex Bakhtin <Alex.Bakhtin@gmail.com>
MFC after:	1 week
2010-05-16 11:56:42 +00:00
Kevin Lo
73d6722d27 Use setresuid/setresgid to drop privileges 2010-05-16 08:03:24 +00:00
Martin Matuska
ee56d88b76 Fix deadlock between zfs_dirent_lock and zfs_rmdir
OpenSolaris onnv revision:	11321:506b7043a14c

Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6847615)
MFC after:	3 days
2010-05-16 07:46:03 +00:00
Martin Matuska
db708a6e2c Fix perfomance problem with ZFS prefetch caching [1]
Add statistics for ZFS prefetch (sysctl kstat.zfs.misc.zfetchstats)

Partial import of OpenSolaris onnv revision 10474:0e96dd3b905a

Reported by:	jhell@dataix.net (private e-mail) [1]
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6859997, 6868951)
MFC after:	3 days
2010-05-16 07:16:28 +00:00
Matt Jacob
a6119ff634 Correct compilation error introduced in last commit.
X-MFC:		208119
MFC after:      1 week
Sponsored By:   Panasas
Pointy Hat to:	Me
Noticed by:	Rob
2010-05-16 06:40:05 +00:00
Konstantin Belousov
de082cd17a Disable bypass for the vop_advlockpurge(). The vop is called after
vop_revoke(), the v_data is already destroyed.

Reported and tested by:	ed
2010-05-16 05:00:29 +00:00
Weongyo Jeong
f5101b5382 - fixes a bug that it didn't initialize the ratectl after association;
so ni_txrate returned 0 which is a invalid result.
- The fourth argument of ieee80211_ratectl_tx_complete() could be not
  NULL.

Reported by:	Gustau P?rez <gperez at entel.upc.edu>
Tested by:	Gustau P?rez <gperez at entel.upc.edu>,
		Ian FREISLICH <ianf at clue.co.za>
MFC after:	3 days
2010-05-15 21:18:15 +00:00
Matt Jacob
427fa8f9fe Whap. Hook up some wires that were forgotten a few months ago and restore
the zombie device timeout code and the loop down time code and the fabric
hysteresis code.
MFC after:	1 week
Sponsored By:	Panasas
2010-05-15 20:26:10 +00:00
Marius Strobl
876ab8b5e4 Fix a mismerge in r206001.
PR:		146614
Approved by:	jfv (implicit)
MFC afer:	3 days
2010-05-15 19:46:16 +00:00
Jilles Tjoelker
18bd63b7c5 Change the commented msgs examples in profile/csh.login from -f to -q.
Starting something that wants input on login seems strange and can be
dangerous. In some configurations, causing output can be bad, but it is not
as dangerous.

I do not expect this msgs invocation to be uncommented often.

PR:		conf/96015
MFC after:	4 days
2010-05-15 17:49:56 +00:00
Poul-Henning Kamp
965df046e5 Apply a patch that has been lingering in my inbox for far too long:
On a soekris Net5501, if you do a watchdog -t 16, followed by a watchdog
-t 0 to disable the watchdog, and then after some time (16s) re-enable
the watchdog the box reboots immediatly. This prevents also to stop and
restart watchdogd(8).

This is because when you stop the watchdog, the timer is not stoped,
only the hard reset is disabled. So when the timer has elapsed, the C2
event of the timer is set.

But when the hard reset is re-enabled, the event is not cleared and the
box reboots.

The attached patch stops and resets the counter when the watchdog is
disabled and do not disable the hard reset of the timer (if the timer
has elapsed it's too late).

Submitted by:	 Patrick Lamaizière
2010-05-15 10:31:11 +00:00
Poul-Henning Kamp
c6bfb71a6f Do not attempt to render a logrecord with length byte, until we have
decompressed all the bytes required.
2010-05-15 08:57:16 +00:00
Jack F Vogel
46168c5453 Small changes preparing for MFC, need to conditionalize
the buf_ring_free call, and lem is missing the WOL change
put into em.
2010-05-14 22:18:34 +00:00
Jack F Vogel
245c81a9ea A few minor fixes:
- add a moderation value to the Link vector
   - allow disabling HW RSC on the 82599 if LRO
     is not enabled.
   - correct error in the stats code
   - change optic type on the 82598 DA device

Thanks to Andrew Boyer for the changes.
2010-05-14 22:00:37 +00:00
Matt Jacob
87e7f7be89 Yet another potential dereference of a dead provider.
Sponsored by:   Panasas
MFC after:	1 week
2010-05-14 21:27:39 +00:00
Bjoern A. Zeeb
793f71bf2e Fix an issue with the dynamic pcpu/vnet data allocators.
We cannot expect that modspace is the last entry in the linker
set and thus that modspace + possible extra space up to PAGE_SIZE
would be contiguous.  For the moment do not support more than
*_MODMIN space and ignore the extra space (*).

(*) We know how to get it back but it'll need testing.

Discussed with:	jeff, rwatson (briefly)
Reviewed by:	jeff
Sponsored by:	The FreeBSD Foundation
Sponsored by:	CK Software GmbH
MFC after:	4 days
2010-05-14 21:11:58 +00:00
Xin LI
881bfb7497 - Add versioned symbols to liblzma
- Use default SHLIB_MAJOR.

Approved by:	mm
X-MFC with:	lzma library MFC
2010-05-14 20:40:37 +00:00
Marius Strobl
d6d81b7386 Document the led(4) interface to the identification LEDs.
MFC after:	3 days
2010-05-14 20:11:30 +00:00
Marius Strobl
3eb0900b32 - Enable DMA write parity error interrupts on Schizo with a working
implementation.
- Revert the Sun Fire V890 WAR of r205254. Instead let schizo_pci_bus()
  only panic in case of fatal errors as the interrupt triggered by the
  error the firmware of these and also Sun Fire 280R with version 7
  Schizo caused may happen as late as using the HBA and not only prior
  to touching the PCI bus (in the former case the actual error still is
  fatal but we clear it before touching the PCI bus).
  While at it count and export non-fatal error interrupts via sysctl(9).
- Remove unnecessary locking from schizo_ue().
2010-05-14 20:00:21 +00:00
Doug Barton
eedb7f6041 Remove duplicate 2010-05-14 19:14:59 +00:00
Doug Barton
de2bfae478 Hide the creation and population of the temproot 2010-05-14 19:12:06 +00:00