Commit Graph

149390 Commits

Author SHA1 Message Date
John Baldwin
e9d0cb1406 Remove the spx_usrreq.c mergeinfo from spx_reass.c. Future changes to
spx_usrreq.c won't be merged to spx_reass.c which is what this would help
with.

Approved by:	re (mergeinfo blanket), rwatson
2009-08-17 15:51:31 +00:00
John Hay
c49b5baa65 MFC: 196326
Fix parse() so that the partition to boot (load /boot/loader) from can
be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader

Reviewed by:	jhb
Approved by:	re (kib)
2009-08-17 15:39:47 +00:00
John Baldwin
08c347079c MFC: Purge mergeinfo in sys/ that is either empty or a subset of the parent
mergeinfo on sys/ itself.

Approved by:	re (mergeinfo blanket)
2009-08-17 14:42:41 +00:00
Scott Long
ae93ebed73 Merge files missed in r196285. SVN is simply horrible. Sorry for the
tree breakage.

Approved by:	re
2009-08-17 13:51:19 +00:00
John Baldwin
4c59d2b0b5 Stow my time machine and note that r196223 is an MFC of r196224.
Pointy hat to:	jhb
Approved by:	re (rwatson)
2009-08-17 13:51:03 +00:00
Konstantin Belousov
1d4dc8543f MFC r196318:
Correct accounting error when allocating a a page table page to implement
a user-space demotion.

Approved by:	re (rwatson)
2009-08-17 13:32:56 +00:00
Rui Paulo
f2d3e43377 MFC r196316:
Fix a typo in ifdef mesh support. This would make mesh unworkable if
  TDMA support was compiled out.

Approved by:	re (kib)
2009-08-17 13:00:32 +00:00
Pawel Jakub Dawidek
22f00f220a MFC r196311:
Correct typo in the previous commit.

Noticed by:	pluknet <pluknet@gmail.com>
Approved by:	re (kib, implicit)
2009-08-17 10:21:37 +00:00
Pawel Jakub Dawidek
1aefcd39f0 MFC r196309:
getcwd() (when __getcwd() fails) works by stating current directory, going up
(..), calling readdir and looking for previous directory inode.  In case of
.zfs/ directory this doesn't work, because .zfs/ is hidden by default, so it
won't be visible in readdir output.

Fix this by implementing VPTOCNP for snapshot directories, so __getcwd()
doesn't fail and getcwd() doesn't have to use readdir method.

This fixes /bin/pwd from within .zfs/snapshot/<name>/.

Suggested by:	kib
Approved by:	re (rwatson)
2009-08-17 10:02:31 +00:00
Pawel Jakub Dawidek
5adfc444cf MFC r196307:
Manage asynchronous vnode release just like Solaris.

Discussed with:	kmacy
Approved by:	re (kib)
2009-08-17 09:55:58 +00:00
Pawel Jakub Dawidek
860386c1a4 MFC r196305:
Fix receive when dataset has no / in its name.

Submitted by:	James R. Van Artsdalen <james-freebsd-current@jrv.org>
Approved by:	re (kib)
2009-08-17 09:42:34 +00:00
Pawel Jakub Dawidek
be7e2e42e1 MFC r196303:
- Reduce z_teardown_lock lock scope a bit.
- The error variable is int, not bool.
- Convert spaces to tabs where needed.

Approved by:	re (kib)
2009-08-17 09:30:31 +00:00
Pawel Jakub Dawidek
a64b735739 MFC r196301:
If z_buf is NULL, we should free znode immediately.

Noticed by:	avg
Approved by:	re (kib)
2009-08-17 09:27:10 +00:00
Pawel Jakub Dawidek
93be9449e4 MFC r196299:
- We need to recycle vnode instead of freeing znode.

Submitted by:	avg

- Add missing vnode interlock unlock.
- Remove redundant znode locking.

Approved by:	re (kib)
2009-08-17 09:23:27 +00:00
Pawel Jakub Dawidek
f0fb1d62c7 MFC r196297:
Fix panic in zfs recv code. The last vnode (mountpoint's vnode) can have
0 usecount.

Reported by:	Thomas Backman <serenity@exscape.org>
Approved by:	re (kib)
2009-08-17 09:14:58 +00:00
Pawel Jakub Dawidek
e43f173602 MFC r196295:
Remove OpenSolaris taskq port (it performs very poorly in our kernel) and
replace it with wrappers around our taskqueue(9).
To make it possible implement taskqueue_member() function which returns 1
if the given thread was created by the given taskqueue.

Approved by:	re (kib)
2009-08-17 09:03:47 +00:00
Pawel Jakub Dawidek
ea5f504fed MFC r196293:
Because taskqueue_run() can drop tq_mutex, we need to check if the
TQ_FLAGS_ACTIVE flag wasn't removed in the meantime, which means we missed a
wakeup.

Approved by:	re (kib)
2009-08-17 08:46:47 +00:00
Pawel Jakub Dawidek
4aae820003 MFC r196291:
- Fix a race where /dev/zfs control device is created before ZFS is fully
  initialized. Also destroy /dev/zfs before doing other deinitializations.
- Initialization through taskq is no longer needed and there is a race
  where one of the zpool/zfs command loads zfs.ko and tries to do some work
  immediately, but /dev/zfs is not there yet.

Reported by:	pav
Approved by:	re (kib)
2009-08-17 08:38:41 +00:00
Pawel Jakub Dawidek
9e813d55e3 MFC r196289:
Remove files that are no longer used.

Discussed with:	kmacy
Approved by:	re (kib)
2009-08-17 08:09:46 +00:00
Pawel Jakub Dawidek
424c75bfe1 MFC r196287:
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:46:55 +00:00
Scott Long
53e7499383 Merge mptutil
Approved by:	re
2009-08-17 07:30:08 +00:00
Scott Long
42eeb00e0b Merge mfiutil
Approved by:	re
2009-08-17 07:25:12 +00:00
Scott Long
91fa948790 Merge r196200. Add firmware definitions needed by mfiutil
Approved by:	re
2009-08-17 06:21:22 +00:00
Marcel Moolenaar
75f5a2286d MFC change 196278:
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.

Approved by:	re (kib)
2009-08-16 21:32:12 +00:00
Ed Schouten
336b627671 MFC r196276:
Fix small style regression introduced by the MPSAFE newbus code.

Approved by:	re (rwatson)
2009-08-16 20:33:16 +00:00
Andrew Thompson
a8ff174941 MFC r196274
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:17:47 +00:00
Rink Springer
1e2c2ea509 MFC r196272
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:25:58 +00:00
Marcel Moolenaar
7ea9d2977c MFC revision 196269:
Fix misalignment in nvpair_native_embedded() caused by the compiler
replacing the bzero().

Approved by:	re (kensmith)
2009-08-16 02:21:24 +00:00
Marcel Moolenaar
fd77c45934 MFC rev 196268:
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 02:12:13 +00:00
Michael Tuexen
ca007251f2 MFC r196260.
* 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)
2009-08-15 21:37:16 +00:00
Attilio Rao
168346d043 MFC r196256:
Fixup the Xen support in order to match newly introduced enhacements for
IPIs.

Approved by:	re (kib)
2009-08-15 18:56:56 +00:00
Giorgos Keramidas
ae131b7499 MFC 196254 - 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 18:03:34 +00:00
Dima Panov
1ffdef9f28 MFC calendar.freebsd
Approved by:	re (rwatson) miwi (mentor)
2009-08-15 16:04:36 +00:00
Stanislav Sedov
3a68500f53 - Merge r196246:
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:18:29 +00:00
Stanislav Sedov
81fda6adf0 - Merge r196244:
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 multiplica

Approved by:	re (kib)
2009-08-15 15:12:46 +00:00
Edward Tomasz Napierala
09c0ee2663 MFC c196242: Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4)
and mfi(4).

Approved by:	re (rwatson)
2009-08-15 11:52:40 +00:00
Qing Li
6e12c67559 MFC 196234
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-15 00:04:12 +00:00
Marko Zec
d326ff4914 MFC r196230:
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)

Approved by:	re (rwatson)
2009-08-14 23:05:10 +00:00
Marko Zec
0e9c71019b MFC r196229:
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)

Approved by:	re (rwatson)
2009-08-14 23:01:21 +00:00
Marko Zec
857e561523 MFC r196228:
Make VNET_DEBUG a standalone compile-time option, i.e. decouple it from
  INVARIANTS.

  Reviewed by:  bz
  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-14 22:55:54 +00:00
Bjoern A. Zeeb
21845eba48 MFC r196226:
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:50:47 +00:00
John Baldwin
7612087747 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 20:57:21 +00:00
John Baldwin
0230cd8e86 MFC 196221:
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:42:40 +00:00
John Baldwin
9ec17fb2fd MFC: 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:09:31 +00:00
Remko Lodder
c5047621f0 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

Approved by:	re (rwatson), imp (mentor, implicit)
2009-08-14 19:30:59 +00:00
Colin Percival
a429f76be7 Merge r196213 to stable/8.
Approved by:	re (rwatson)
2009-08-14 13:26:50 +00:00
Konstantin Belousov
8c5a788279 MFC r196206:
Take the number of allocated freeblks into consideration for
softdep_slowdown(), to prevent kernel memory exhaustioni on
mass-truncation.

Approved by:	re (rwatson)
2009-08-14 11:22:09 +00:00
Konstantin Belousov
b5d2abe26f MFC r196205:
In nfs_upgrade_vnlock(), assert that the vnode is locked.
When downgrading, pass LK_RETRY to the vn_lock(), since otherwise
vn_lock() unlocks the doomed vnode, causing extra unlock.

Approved by:	re (rwatson)
2009-08-14 11:17:34 +00:00
Konstantin Belousov
b60a1fa9a5 MFC r196204:
Add the address of the lock to the KTR_LOCK trace.

Approved by:	re (rwatson)
2009-08-14 11:13:06 +00:00
Konstantin Belousov
106c3802ff MFC r196203:
Correctly handle unlock for !MAKEENTRY case.

Approved by:	re (rwatson)
2009-08-14 11:06:58 +00:00