]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
14 years agoUpdate for RELENG_8.
kensmith [Sun, 23 Aug 2009 06:33:42 +0000 (06:33 +0000)]
Update for RELENG_8.

Reminded by: dougb
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoReady for 8.0-BETA3 builds.
kensmith [Fri, 21 Aug 2009 17:40:24 +0000 (17:40 +0000)]
Ready for 8.0-BETA3 builds.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196423
julian [Fri, 21 Aug 2009 11:23:29 +0000 (11:23 +0000)]
MFC r196423
  Fix ipfw's initialization functions to get the correct order of evaluation
  to allow vnet and non vnet operation. Move some functions from ip_fw_pfil.c
  to ip_fw2.c and mode to mostly using the SYSINIT and VNET_SYSINIT handlers
  instead of the modevent handler. Correct some spelling errors in comments
  in the affected code. Note this bug fixes a crash in NON VIMAGE kernels when
  ipfw is unloaded.

  This patch is a minimal patch for 8.0
  I have a much larger patch that actually fixes the underlying problems
  that will be applied after 8.0

Reviewed by: zec@, rwatson@, bz@(earlier version)
Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196424 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196421:
zec [Fri, 21 Aug 2009 11:17:25 +0000 (11:17 +0000)]
MFC r196421:

  Bugfix: all requests for creating vnets via vimage -c were always
  reported as failures, even if the actual library / system call
  would succeed, because error message would be reported if the return
  value from jail_setv() call was >= 0, and if not, then if that same
  value was < 0, i.e. always.  The correct behavior is to abort (only)
  if jail_setv() returns < 0.

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

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196419:
julian [Fri, 21 Aug 2009 10:05:26 +0000 (10:05 +0000)]
MFC r196419:
  Don't allow access to the internals until it has all been set up.
  Specifically, not until the per-vnet parts have been set up.

Submitted by: kmacy@
Reviewed by: julian@, zec@
Approved by: re(rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196417:
jhb [Fri, 21 Aug 2009 03:14:39 +0000 (03:14 +0000)]
MFC 196417:
This patch fixes two bugs in sglist(9) and improves robustness of the API via
better semantics if a request to append an address range to an existing list
fails.
- When cloning an sglist, properly set the length in the new sglist instead of
  leaving the new list empty.
- Properly compute the amount of data added to an sglist via
  _sglist_append_buf().  This allows sglist_consume_uio() to properly update
  uio_resid.
- When a request to append an address range to a scatter/gather list fails,
  restore the sglist to the state it had at the start of the function call
  instead of resetting it to an empty list.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196415:
kensmith [Fri, 21 Aug 2009 01:12:06 +0000 (01:12 +0000)]
MFC r196415:
Fix a boot hang for hptrr(4) caused by changes introduced in r195534.
It is necessary to make sure cpi->transport is set for xpt_scan_bus() to
work properly.

Submitted by: Bernhard Schmidt (scb+freebsd-current <at> techwires
              <dot> net)
Reviewed by:  scottl
Approved by:  re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev 196410 - deal with 'ticks' going negative after 24 days of uptime
peter [Thu, 20 Aug 2009 23:07:53 +0000 (23:07 +0000)]
MFC rev 196410 - deal with 'ticks' going negative after 24 days of uptime
with the default 1000hz clock in the timewait expiration code.

Approved by:    re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196414 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r196412
jkim [Thu, 20 Aug 2009 23:04:21 +0000 (23:04 +0000)]
MFC: r196412

Check whether the SMBIOS reports reasonable amount of memory.  If it is
less than "avail memory", fall back to Maxmem to avoid user confusion.
We use SMBIOS information to display "real memory" since r190599 but
some broken SMBIOS implementation reported only half of actual memory.

Tested by: bz
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196409:
zec [Thu, 20 Aug 2009 22:56:29 +0000 (22:56 +0000)]
MFC r196409:

  vimage(8) is a legacy CLI interface for managing jails associated with
  network stack instances, which is provided for compatibility with
  older applications.  This change brings it back to life in a followup
  to the initial conversion of vimage to use the new jail(4)
  userland-kernel API:

  - when creating vimages via "vimage -c", by default turn on a few
  options expected by legacy applications, such as allow operations on
  raw sockets, FS mounts etc, and allow jail-related parameters to be
  optionally configured.

  - introduce the "-m" modifier which allows for configuring jail
  parameters of existing vimages / vnet-jails.

  - make "vimage name command ..." actually work.

  - when reassigning ifnets to vnets using "vimage -i", attempt to rename
  the ifnet as "ethXXX" on arrival in the target vnet.  Several legacy
  applications are known to depend heavily on such behavior.

  - vimage -l lists only jails associated with vnets.  The output is
  sorted using vimage / jail names as keys.

  - vimage -l by default searches only the current level in the jail
  hierarchy.  Recursive listing can be requested via -r switch.

  - vimage -l by default prints only jail names on each line, making
  such output suitable for pipelining to other commands.  More verbose
  output can be obtained via -v switch, and even more jail specific
  information will be displayed if -j switch is turned on.

  - there's no need to build vimage as statically linked, so update the
  Makefile accordingly.

  - update the vimage.8 man page.

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

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r196267 from head to stable/8:
rwatson [Thu, 20 Aug 2009 21:29:49 +0000 (21:29 +0000)]
Merge r196267 from head to stable/8:

  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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r196263 from head to stable/8:
rwatson [Thu, 20 Aug 2009 21:14:52 +0000 (21:14 +0000)]
Merge r196263 from head to stable/8:

  Remove unused if_rawoutput() macro; it has been unused since at least
  FreeBSD 2.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196404:
jhb [Thu, 20 Aug 2009 20:53:36 +0000 (20:53 +0000)]
MFC 196404:
Change the 'resid' parameter to sglist_consume_uio() from an int to a
size_t to match the recent type change of the uio_resid member of struct
uio.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196403: Temporarily revert the new-bus locking for 8.0 release.
jhb [Thu, 20 Aug 2009 20:23:28 +0000 (20:23 +0000)]
MFC 196403: Temporarily revert the new-bus locking for 8.0 release.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196399: fstat: fix fsid comparison when executed on systems with 64-bit long
avg [Thu, 20 Aug 2009 11:04:31 +0000 (11:04 +0000)]
MFC 196399: fstat: fix fsid comparison when executed on systems with 64-bit long

This affects only fstat on zfs and devfs, only on 64-bit systems
and only when fsid is greater than 2^31 - 1.
When fstat examines a file via stat(2) it takes uint32_t st_dev
and assigns to (signed) (64-bit) long fsid, this results in
a positive value.
When fstat examines opened files it takes int32_t f_fsid.val[0]
and assigns to (signed) (64-bit) long fsid, this results in
a negative value.
So, while initially st_dev and f_fsid.val[0] have the same bit
values they get promoted to different 64-bit values because
of the signed-vs-unsigned difference.

A fix is to use "more natural" positive numbers by introducing
intermediate unsigned cast for f_fsid.val[0].

Reviewed by:    jhb, lulf
Approved by:    re (kib)
MFC after:      1 week (to stable/7)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196397 from head:
will [Thu, 20 Aug 2009 02:49:43 +0000 (02:49 +0000)]
MFC r196397 from head:

  Fix CARP memory leaks on carp_if's malloc'd using M_CARP.  This occurs when
  CARP tries to free them using M_IFADDR after the last address for a virtual
  host is removed and when detaching from the parent interface.

Approved by: re (kib), ken (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196395:
pjd [Thu, 20 Aug 2009 00:08:58 +0000 (00:08 +0000)]
MFC r196395:

Our libc doesn't implement control method for XDR (only kernel does) and it
will always return failure. Fix this by bringing userland implementation of
xdrmem_control() back. This allow 'zpool import' to work again.

Reported by: Thomas Backman <serenity@exscape.org>
Reviewed by: kmacy
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196392:
simon [Wed, 19 Aug 2009 21:01:32 +0000 (21:01 +0000)]
MFC 196392:

  Add support for backing up the old kernel when installing a new kernel
  using freebsd-update.  This applies to using freebsd-update in "upgrade
  mode" and normal freebsd-update on a security branch.

  The backup kernel will be written to /boot/kernel.old, if the directory
  does not exist, or the directory was created by freebsd-update in a
  previous backup.  Otherwise freebsd-update will generate a new directory
  name for use by the backup.  By default symbol files are not backed up
  to save diskspace and avoid filling up the root partition.

  This feature is fully configurable in the freebsd-update config file,
  but defaults to enabled.

  Reviewed by: cperciva

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196390:
ed [Wed, 19 Aug 2009 20:44:22 +0000 (20:44 +0000)]
MFC r196390:

  Make the MacBookPro3,1 hardware boot again.

  Tested by:    Patrick Lamaiziere <patfbsd davenulle org>
  Approved by:  re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196391 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago This change fixes a comment and addresses a complaint by kib@ by
kmacy [Wed, 19 Aug 2009 20:17:36 +0000 (20:17 +0000)]
 This change fixes a comment and addresses a complaint by kib@ by
 moving a frequently executed flowtable syslog statement from being
 conditional on bootverbose to conditional on a per-vnet flowtable
 sysctl.

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/8@196389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196386:
delphij [Wed, 19 Aug 2009 18:08:50 +0000 (18:08 +0000)]
MFC r196386:

Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
Without this changeset there will be no way to prevent these NICs from
sending ARP, which is harmful in server farms that is configured as
"Direct Server Return" behind a load balancer.

A better fix would remove the whole hack completely but it would be
later than 8.0-RELEASE.

Reviewed by: jfv, yongari
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196382:
jhb [Wed, 19 Aug 2009 17:45:58 +0000 (17:45 +0000)]
MFC 196382:
Explicitly line up the CPU state labels with the calculated starting column
that takes into account the width of the largest CPU ID.  On systems with
> 10 CPUs the labels for the first 10 CPUs were not lined up properly
otherwise.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC change 196383:
marcel [Wed, 19 Aug 2009 16:40:45 +0000 (16:40 +0000)]
MFC change 196383:
 Remove the dependency on the kernel -- in particular the gctl request to
 the GEOM_BSD class -- to translate the absolute offsets in the label to
 relative ones. This makes bslabel(8) work correctly with GEOM_PART and
 also when the BSD label is nested under arbitrary partitioning schemes.

Inspired by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196380
raj [Wed, 19 Aug 2009 14:48:59 +0000 (14:48 +0000)]
MFC r196380

Fix USB cache sync operations for platforms with non-coherent DMA.

- usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,
  so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
  cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
  the low level bus dma sync operation is implementation dependent and we
  cannot assume the required order of operations to be guaranteed.

- usb_pc_cpu_flush() is called before writing to a device, so
  BUS_DMASYNC_PREWRITE should be used.

Submitted by: Grzegorz Bernacki
Reviewed by: HPS, arm@, usb@ ML
Tested by: HPS, Mike Tancsa
Approved by: re (kib)
Obtained from: Semihalf

git-svn-id: svn://svn.freebsd.org/base/stable/8@196381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196378:
ed [Wed, 19 Aug 2009 14:38:43 +0000 (14:38 +0000)]
MFC r196378:

  Small changes to the warning message generated by pty(4):

  - Only print the warning once, instead of filling up the screen.
  - Use the word "legacy" for the pty_warningcnt description, to prevent
    confusion.
  - Use log() instead of printf().

  Discussed with: rwatson, jhb
  Approved by:    re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix a bug in the handling of unreliable messages which
tuexen [Wed, 19 Aug 2009 12:12:51 +0000 (12:12 +0000)]
Fix a bug in the handling of unreliable messages which
results in stalled associations.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Make note of the update of tzdata from 2008h to 2009j
edwin [Wed, 19 Aug 2009 03:58:12 +0000 (03:58 +0000)]
- Make note of the update of tzdata from 2008h to 2009j
- Make note of the update of tzcode from 2004a to 2009h
  Add an extra alert that people who update via source or via
  freebsd-update will have to run the tzsetup(8) utility.

Approved by: re (Kostik)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196372:
mlaier [Wed, 19 Aug 2009 00:17:00 +0000 (00:17 +0000)]
MFC r196372:
  If we cannot immediately get the pf_consistency_lock in the purge thread,
  restart the scan after acquiring the lock the hard way.  Otherwise we
  might end up with a dead reference.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- MFC r196370.
stas [Tue, 18 Aug 2009 21:13:00 +0000 (21:13 +0000)]
- MFC r196370.
  Do not try to reevaluate current RX production index on each
  loop iteration as it can be updated by the card while we
  process the RX ring forcing us to process RX descriptors
  for which DMA synchronisation operation has not been
  performed.  This fixes the bug when bge(4) drops packets
  under high load.

Discussed with: yongari, marius
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196368
kmacy [Tue, 18 Aug 2009 20:39:35 +0000 (20:39 +0000)]
MFC 196368
  - change the interface to flowtable_lookup so that we don't rely on
    the mbuf for obtaining the fib index
  - check that a cached flow corresponds to the same fib index as the
    packet for which we are doing the lookup
  - at interface detach time flush any flows referencing stale rtentrys
    associated with the interface that is going away (fixes reported
    panics)
  - reduce the time between cleans in case the cleaner is running at
    the time the eventhandler is called and the wakeup is missed less
    time will elapse before the eventhandler returns
  - separate per-vnet initialization from global initialization
    (pointed out by jeli@)

Reviewed by: sam@
Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/8@196369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196366:
yongari [Tue, 18 Aug 2009 20:25:02 +0000 (20:25 +0000)]
MFC r196366:
  Backout r193289. r193289 restored page select bits to previous
  value instead of blindly resetting it to 0. However, it seems page
  select bits of some 88E1116 PHY is initialized to invalid one such
  that restoring page select bits after programming broke MII
  register access. The correct solution would be reset page select
  bits to 0 in PHY attach stage but it would require more testing.
  Since we're in BETA stage such a change would be dangerous so just
  back it out.
  This change should fix nfe(4) breakage on NVIDIA MCP55.

  Reported by: Ryan Rogers < webmaster <> doghouserepair dot com >
Sam Fourman Jr. < sfourman <> gmail dot com >
  Tested by: Ryan Rogers < webmaster <> doghouserepair dot com >
Sam Fourman Jr. < sfourman <> gmail dot com >
  Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix a panic when using one-to-one style sockets in non-blocking
tuexen [Tue, 18 Aug 2009 20:06:00 +0000 (20:06 +0000)]
Fix a panic when using one-to-one style sockets in non-blocking
mode and there is no listening server.
PR: 137795
Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196358:
pjd [Tue, 18 Aug 2009 14:00:25 +0000 (14:00 +0000)]
MFC r196358:

Remove unused taskqueue_find() function.

Reviewed by: dfr
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev 196356:
trhodes [Tue, 18 Aug 2009 13:51:51 +0000 (13:51 +0000)]
MFC rev 196356:

  Document MAKE_DVD and xref svn in ports.

  Approved by: re@ (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196357 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix copy/paste bug, that requests data read during ATA device probe sequence
mav [Tue, 18 Aug 2009 09:36:25 +0000 (09:36 +0000)]
Fix copy/paste bug, that requests data read during ATA device probe sequence
for ATA_SETFEATURES/ATA_SF_SETXFER command which by definition transfers no
data. Most of controllers are irrelevant to this bug, but some nVidia's
doesn't.

Tested on:      current@
Approved by:    re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196352:
mav [Tue, 18 Aug 2009 09:31:00 +0000 (09:31 +0000)]
MFC r196352:
Fix iSCSI initiator and vpo driver operation, broken by CAM changes.

Reviewed by: scottl, Danny Braniss
Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago fix netboot issue by disabling flowtable lookups until initialization has been run
kmacy [Mon, 17 Aug 2009 20:06:00 +0000 (20:06 +0000)]
 fix netboot issue by disabling flowtable lookups until initialization has been run
 + mergeinfo garbage

Reviewed by: rwatson@
Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/8@196344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoPropogate the mergeinfo for 196200 up to sys/.
jhb [Mon, 17 Aug 2009 19:10:23 +0000 (19:10 +0000)]
Propogate the mergeinfo for 196200 up to sys/.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196332:
rmacklem [Mon, 17 Aug 2009 18:11:50 +0000 (18:11 +0000)]
MFC r196332:
Apply the same patch as r196205 for nfs_upgrade_lock() and
nfs_downgrade_lock() to the experimental nfs client.

Approved by: re (kensmith), kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196341 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196337: Document the newly added SVNCMDARGS, SVNROOT, and SVNBRANCH
jhb [Mon, 17 Aug 2009 17:13:17 +0000 (17:13 +0000)]
MFC 196337: Document the newly added SVNCMDARGS, SVNROOT, and SVNBRANCH
variables.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196334:
attilio [Mon, 17 Aug 2009 16:33:53 +0000 (16:33 +0000)]
MFC r196334:

* Change the scope of the ASSERT_ATOMIC_LOAD() from a generic check to
  a pointer-fetching specific operation check. Consequently, rename the
  operation ASSERT_ATOMIC_LOAD_PTR().
* Fix the implementation of ASSERT_ATOMIC_LOAD_PTR() by checking
  directly alignment on the word boundry, for all the given specific
  architectures. That's a bit too strict for some common case, but it
  assures safety.
* Add a comment explaining the scope of the macro
* Add a new stub in the lockmgr specific implementation

Tested by: marcel (initial version), marius
Reviewed by: rwatson, jhb (comment specific review)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev 196333:
marcel [Mon, 17 Aug 2009 16:24:50 +0000 (16:24 +0000)]
MFC rev 196333:
The start of the EFI GPT partition in the PMBR can always be represented
by CHS addressing. Don't define these fields as 0xff, but rather define
them correctly. This prevents boot problems on PCs where GPT is being
used.

PR:             115406
Submitted by:   Kent Hauser <kent@khauser.net>
Approved by:    re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoRemove the spx_usrreq.c mergeinfo from spx_reass.c. Future changes to
jhb [Mon, 17 Aug 2009 15:51:31 +0000 (15:51 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/8@196331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Remove self-referential mergeinfo from xen/netfront and xen/xenpci that
jhb [Mon, 17 Aug 2009 15:42:55 +0000 (15:42 +0000)]
- Remove self-referential mergeinfo from xen/netfront and xen/xenpci that
  claims those directories were merged into themselves.
- Remove mergeinfo on xen/xenpci that claims the stable/7 xenpci was merged
  into head.

Approved by: re (mergeinfo blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: 196326
jhay [Mon, 17 Aug 2009 15:39:47 +0000 (15:39 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196328 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: Remove bogus mergeinfo claiming that change 185357 from head/sys was
jhb [Mon, 17 Aug 2009 14:53:59 +0000 (14:53 +0000)]
MFC: Remove bogus mergeinfo claiming that change 185357 from head/sys was
merged into head/sys/dev/ata.

Approved by: re (mergeinfo blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: Purge mergeinfo in sys/ that is either empty or a subset of the parent
jhb [Mon, 17 Aug 2009 14:42:41 +0000 (14:42 +0000)]
MFC: Purge mergeinfo in sys/ that is either empty or a subset of the parent
mergeinfo on sys/ itself.

Approved by: re (mergeinfo blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge files missed in r196285. SVN is simply horrible. Sorry for the
scottl [Mon, 17 Aug 2009 13:51:19 +0000 (13:51 +0000)]
Merge files missed in r196285.  SVN is simply horrible.  Sorry for the
tree breakage.

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@196321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoStow my time machine and note that r196223 is an MFC of r196224.
jhb [Mon, 17 Aug 2009 13:51:03 +0000 (13:51 +0000)]
Stow my time machine and note that r196223 is an MFC of r196224.

Pointy hat to: jhb
Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196318:
kib [Mon, 17 Aug 2009 13:32:56 +0000 (13:32 +0000)]
MFC r196318:
Correct accounting error when allocating a a page table page to implement
a user-space demotion.

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196316:
rpaulo [Mon, 17 Aug 2009 13:00:32 +0000 (13:00 +0000)]
MFC r196316:
  Fix a typo in ifdef mesh support. This would make mesh unworkable if
  TDMA support was compiled out.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196317 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196311:
pjd [Mon, 17 Aug 2009 10:21:37 +0000 (10:21 +0000)]
MFC r196311:

Correct typo in the previous commit.

Noticed by: pluknet <pluknet@gmail.com>
Approved by: re (kib, implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196309:
pjd [Mon, 17 Aug 2009 10:02:31 +0000 (10:02 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196307:
pjd [Mon, 17 Aug 2009 09:55:58 +0000 (09:55 +0000)]
MFC r196307:

Manage asynchronous vnode release just like Solaris.

Discussed with: kmacy
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196308 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196305:
pjd [Mon, 17 Aug 2009 09:42:34 +0000 (09:42 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196306 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196303:
pjd [Mon, 17 Aug 2009 09:30:31 +0000 (09:30 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196301:
pjd [Mon, 17 Aug 2009 09:27:10 +0000 (09:27 +0000)]
MFC r196301:

If z_buf is NULL, we should free znode immediately.

Noticed by: avg
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196299:
pjd [Mon, 17 Aug 2009 09:23:27 +0000 (09:23 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196297:
pjd [Mon, 17 Aug 2009 09:14:58 +0000 (09:14 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196295:
pjd [Mon, 17 Aug 2009 09:03:47 +0000 (09:03 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196293:
pjd [Mon, 17 Aug 2009 08:46:47 +0000 (08:46 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196291:
pjd [Mon, 17 Aug 2009 08:38:41 +0000 (08:38 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196289:
pjd [Mon, 17 Aug 2009 08:09:46 +0000 (08:09 +0000)]
MFC r196289:

Remove files that are no longer used.

Discussed with: kmacy
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196287:
pjd [Mon, 17 Aug 2009 07:46:55 +0000 (07:46 +0000)]
MFC r196287:

Be more precise how to get fsids - 'mount -v' doesn't show fsids unless is run
by root.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge mptutil
scottl [Mon, 17 Aug 2009 07:30:08 +0000 (07:30 +0000)]
Merge mptutil

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@196286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge mfiutil
scottl [Mon, 17 Aug 2009 07:25:12 +0000 (07:25 +0000)]
Merge mfiutil

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@196285 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r196200. Add firmware definitions needed by mfiutil
scottl [Mon, 17 Aug 2009 06:21:22 +0000 (06:21 +0000)]
Merge r196200.  Add firmware definitions needed by mfiutil

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@196284 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC change 196278:
marcel [Sun, 16 Aug 2009 21:32:12 +0000 (21:32 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196279 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196276:
ed [Sun, 16 Aug 2009 20:33:16 +0000 (20:33 +0000)]
MFC r196276:

  Fix small style regression introduced by the MPSAFE newbus code.

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196274
thompsa [Sun, 16 Aug 2009 14:17:47 +0000 (14:17 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196272
rink [Sun, 16 Aug 2009 10:25:58 +0000 (10:25 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC revision 196269:
marcel [Sun, 16 Aug 2009 02:21:24 +0000 (02:21 +0000)]
MFC revision 196269:
Fix misalignment in nvpair_native_embedded() caused by the compiler
replacing the bzero().

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196271 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev 196268:
marcel [Sun, 16 Aug 2009 02:12:13 +0000 (02:12 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196260.
tuexen [Sat, 15 Aug 2009 21:37:16 +0000 (21:37 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196256:
attilio [Sat, 15 Aug 2009 18:56:56 +0000 (18:56 +0000)]
MFC r196256:
Fixup the Xen support in order to match newly introduced enhacements for
IPIs.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196254 - iostat: add a bit of space between tty in/out columns
keramida [Sat, 15 Aug 2009 18:03:34 +0000 (18:03 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC calendar.freebsd
fluffy [Sat, 15 Aug 2009 16:04:36 +0000 (16:04 +0000)]
MFC calendar.freebsd

Approved by: re (rwatson) miwi (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196252 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Merge r196246:
stas [Sat, 15 Aug 2009 15:18:29 +0000 (15:18 +0000)]
- 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

git-svn-id: svn://svn.freebsd.org/base/stable/8@196247 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Merge r196244:
stas [Sat, 15 Aug 2009 15:12:46 +0000 (15:12 +0000)]
- 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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC c196242: Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4)
trasz [Sat, 15 Aug 2009 11:52:40 +0000 (11:52 +0000)]
MFC c196242: Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4)
and mfi(4).

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196234
qingli [Sat, 15 Aug 2009 00:04:12 +0000 (00:04 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/8@196235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196230:
zec [Fri, 14 Aug 2009 23:05:10 +0000 (23:05 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196229:
zec [Fri, 14 Aug 2009 23:01:21 +0000 (23:01 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196228:
zec [Fri, 14 Aug 2009 22:55:54 +0000 (22:55 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196226:
bz [Fri, 14 Aug 2009 21:50:47 +0000 (21:50 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196227 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdjust the handling of the local APIC PMC interrupt vector:
jhb [Fri, 14 Aug 2009 20:57:21 +0000 (20:57 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/8@196223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196221:
jhb [Fri, 14 Aug 2009 20:42:40 +0000 (20:42 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: Purge mergeinfo from files that were temporarily renamed while USB2 was
jhb [Fri, 14 Aug 2009 20:09:31 +0000 (20:09 +0000)]
MFC: Purge mergeinfo from files that were temporarily renamed while USB2 was
imported into the tree alongside USB.

Approved by: re (mergeinfo blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196220 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago Remove bogus char cast.
remko [Fri, 14 Aug 2009 19:30:59 +0000 (19:30 +0000)]
 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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196217 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r196213 to stable/8.
cperciva [Fri, 14 Aug 2009 13:26:50 +0000 (13:26 +0000)]
Merge r196213 to stable/8.

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196214 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196206:
kib [Fri, 14 Aug 2009 11:22:09 +0000 (11:22 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196210 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196205:
kib [Fri, 14 Aug 2009 11:17:34 +0000 (11:17 +0000)]
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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196204:
kib [Fri, 14 Aug 2009 11:13:06 +0000 (11:13 +0000)]
MFC r196204:
Add the address of the lock to the KTR_LOCK trace.

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196203:
kib [Fri, 14 Aug 2009 11:06:58 +0000 (11:06 +0000)]
MFC r196203:
Correctly handle unlock for !MAKEENTRY case.

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196207 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC of r196201
julian [Fri, 14 Aug 2009 10:25:14 +0000 (10:25 +0000)]
MFC of r196201
  URL: http://svn.freebsd.org/changeset/base/196201

  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).

p.s. What's up with all the properties changing? It is a fresh checkout.

Reviewed by: brooks
Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196196:
attilio [Thu, 13 Aug 2009 17:54:11 +0000 (17:54 +0000)]
MFC r196196:

* 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.
* Add 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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196193:
raj [Thu, 13 Aug 2009 16:01:19 +0000 (16:01 +0000)]
MFC r196193:
Use correct wbinv operation in pmap_l2cache_wbinv_range().

Submitted by: Michal Hajduk
Reviewed by: stas
Approved by: re (kib)
Obtained from: Semihalf

git-svn-id: svn://svn.freebsd.org/base/stable/8@196194 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r196123 from head to stable/8:
rwatson [Thu, 13 Aug 2009 15:08:05 +0000 (15:08 +0000)]
Merge r196123 from head to stable/8:

  Update posix1e-related man pages, especially as relates to MAC, to more
  accurately reflect the last ten years of work.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196185:
bz [Thu, 13 Aug 2009 15:02:02 +0000 (15:02 +0000)]
MFC r196185:
  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)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r196122 from head to stable/8:
rwatson [Thu, 13 Aug 2009 15:01:50 +0000 (15:01 +0000)]
Merge r196122 from head to stable/8:

  Correctly audit real gids following changes to the audit record argument
  interface.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196187 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f