]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r231821:
pluknet [Mon, 20 Feb 2012 17:09:52 +0000 (17:09 +0000)]
MFC r231821:

 delete-old does not have delete-old-libs dependency.
 Reflect this in the comment.

PR: conf/163993
Submitted by: Eugen Konkov <kes-kes at yandex ru>

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

12 years agoMFC r231716
ken [Mon, 20 Feb 2012 16:50:16 +0000 (16:50 +0000)]
MFC r231716

  Set the max_lun field of the path inquiry CCB to 8.

  This allows LUNs greater than 0 to be probed.  It can be increased later if
  need be.

  This brings back SVN rev 224973, which was inadvertently removed with the
  import of the LSI driver.

  Reported by: dwhite

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

12 years agoMFC r231075:
kib [Mon, 20 Feb 2012 11:27:37 +0000 (11:27 +0000)]
MFC r231075:
Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local
thread flag to disable async i/o for current thread only. Use the
opportunity to move DOINGASYNC() macro into sys/vnode.h and
consistently use it through places which tested for MNTK_ASYNC.

MFC r231204:
Unbreak detection of the async mode for clustered writes after r231075.

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

12 years agoMFC r231862:
dougb [Mon, 20 Feb 2012 10:13:09 +0000 (10:13 +0000)]
MFC r231862:
Increase the default shutdown timer to 90 seconds. This will allow
certain systems that take a long time to shut down, without adversely
affecting things that shut down quickly. It's also 30 seconds less than
the default hard limit of 120 seconds in kern.init_shutdown_timeout.

PR: conf/109272
Submitted by: Radim Kolar SF.NET <hsn@sendmail.cz>

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

12 years agoMFC r231057:
dim [Sun, 19 Feb 2012 23:35:56 +0000 (23:35 +0000)]
MFC r231057:

Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

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

12 years agoMFC r230391, r230400, 231019:
andreast [Sun, 19 Feb 2012 08:58:31 +0000 (08:58 +0000)]
MFC r230391, r230400, 231019:

This commit adds profiling support for powerpc64. Now we can do application
profiling and kernel profiling. To enable kernel profiling one has to build
kgmon(8). I will enable the build once I managed to build and test powerpc
(32-bit) kernels with profiling support.

- add a powerpc64 PROF_PROLOGUE for _mcount.
- add macros to avoid adding the PROF_PROLOGUE in certain assembly entries.
- apply these macros where needed.
- add size information to the MCOUNT function.

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

12 years agoMFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and
rmh [Sun, 19 Feb 2012 07:44:38 +0000 (07:44 +0000)]
MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and
associated fixes.

Approved by: kib (mentor)

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

12 years agoMFC r231236: Acknowledge that jail_attach and jail_remove can return EPERM.
jamie [Sat, 18 Feb 2012 16:54:01 +0000 (16:54 +0000)]
MFC r231236: Acknowledge that jail_attach and jail_remove can return EPERM.

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

12 years agoMFC r231526:
kib [Sat, 18 Feb 2012 00:49:09 +0000 (00:49 +0000)]
MFC r231526:
Close a race due to dropping of the map lock between creating map entry
for a shared mapping and marking the entry for inheritance.

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

12 years agoMFC r231521:
kib [Sat, 18 Feb 2012 00:45:59 +0000 (00:45 +0000)]
MFC r231521:
The PTRACESTOP() macro is used only once. Inline the only use and remove
the macro.

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

12 years agoMFC 231672:
tuexen [Fri, 17 Feb 2012 10:54:09 +0000 (10:54 +0000)]
MFC 231672:

Fix a bug where the wrong protocol overhead was used. This can lead
to a deadlock of an association when an IPv6 socket was used to
communcate with IPv4 and an ICMPv4 fragmentation needed message
was received.
While there, simplify the code a bit.

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

12 years agoMFC r231443:
kib [Fri, 17 Feb 2012 10:39:28 +0000 (10:39 +0000)]
MFC r231443:
Add a test program for recently added ptrace(2) interfaces.

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

12 years agoMFC r231441:
kib [Fri, 17 Feb 2012 10:37:14 +0000 (10:37 +0000)]
MFC r231441:
In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
both 64bit and 32bit binaries, not for 64bit only.

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

12 years agoMFC r231320:
kib [Fri, 17 Feb 2012 10:27:58 +0000 (10:27 +0000)]
MFC r231320:
Mark the automatically attached child with PL_FLAG_CHILD in struct
lwpinfo flags, for PT_FOLLOWFORK auto-attachment.

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

12 years agoMFC r230934:
pluknet [Fri, 17 Feb 2012 06:26:11 +0000 (06:26 +0000)]
MFC r230934:

 Print the owner process for unix domain sockets when restricted to the
 specified files.

PR: bin/143962

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

12 years agoMove mergeinfo from r229831 from share/ to the individual directories
dougb [Fri, 17 Feb 2012 03:39:06 +0000 (03:39 +0000)]
Move mergeinfo from r229831 from share/ to the individual directories
in share/examples/.

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

12 years agoMFC r231743,r231837,r231839: Xen PV block interface enhancements
gibbs [Fri, 17 Feb 2012 01:45:49 +0000 (01:45 +0000)]
MFC r231743,r231837,r231839: Xen PV block interface enhancements

r231743
=======
Enhance documentation, improve interoperability, and fix defects in
FreeBSD's front and back Xen blkif interface drivers.

sys/dev/xen/blkfront/block.h:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
Replace FreeBSD specific multi-page ring impelementation with
support for both the Citrix and Amazon/RedHat versions of this
extension.

sys/dev/xen/blkfront/blkfront.c:
o Add a per-instance sysctl tree that exposes all negotiated
  transport parameters (ring pages, max number of requests,
  max request size, max number of segments).
o In blkfront_vdevice_to_unit() add a missing return statement
  so that we properly identify the unit number for high numbered
  xvd devices.

sys/dev/xen/blkback/blkback.c:
o Add static dtrace probes for several events in this driver.
o Defer connection shutdown processing until the front-end
  enters the closed state.  This avoids prematurely tearing
  down the connection when buggy front-ends transition to the
  closing state, even though the device is open and they
  veto the close request from the tool stack.
o Add nodes for maximum request size and the number of active
  ring pages to the exising, per-instance, sysctl tree.
o Miscelaneous style cleanup.

sys/xen/interface/io/blkif.h:
o Add extensive documentation of the XenStore nodes used to
  implement the blkif interface.
o Document the startup sequence between a front and back driver.
o Add structures and documenatation for the "discard" feature
  (AKA Trim).
o Cleanup some definitions related to FreeBSD's request
  number/size/segment-limit extension.

sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
sys/xen/xenbus/xenbusvar.h:
Add the convenience function xenbus_get_otherend_state() and
use it to simplify some logic in both block-front and block-back.

r231837
=======
sys/dev/xen/blkback/blkback.c:
Fix typo in a printf string: "specificed" -> "specified".

r231839
=======
Fix a bug in the calculation of the maximum I/O request size.
The previous code did not limit the I/O request size based on
the maximum number of segments supported by the back-end.  In
current practice, since the only back-end supporting chained
requests is the FreeBSD implementation, this limit was never
exceeded.

sys/dev/xen/blkfront/block.h:
Add two macros, XBF_SEGS_TO_SIZE() and XBF_SIZE_TO_SEGS(),
to centralize the logic of reserving a segment to deal with
non-page-aligned I/Os.

sys/dev/xen/blkfront/blkfront.c:
o When negotiating transfer parameters, limit the
  max_request_size we use and publish, if it is greater
  than the maximum, unaligned, I/O we can support with
  the number of segments advertised by the backend.
o Don't unilaterally reduce the I/O size published to
  the disk layer by a single page.  max_request_size
  is already properly limited in the transfer parameter
  negotiation code.
o Fix typos in printf strings:
"max_requests_segments" -> "max_request_segments"
"specificed" -> "specified"

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

12 years agoMFC r231745:
gibbs [Fri, 17 Feb 2012 01:23:58 +0000 (01:23 +0000)]
MFC r231745:

Limit the ST3146855LW U320 drive to 55 tags to avoid command timeouts
under load.

Submitted by: Gelson Borsoi

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

12 years agoMFC r231299:
eadler [Fri, 17 Feb 2012 00:55:26 +0000 (00:55 +0000)]
MFC r231299:
 - More accurately document what happens on error.

PR: docs/127908
Approved by: cperciva

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

12 years agoMFC r228274:
eadler [Thu, 16 Feb 2012 19:39:49 +0000 (19:39 +0000)]
MFC r228274:
 - Fix some uninitialized variables in pipe regression tests that result in failure.

PR: misc/161175
Approved by: cperciva

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

12 years agoMFC r231582:
kib [Thu, 16 Feb 2012 10:58:15 +0000 (10:58 +0000)]
MFC r231582:
Add missed EOL when die() was converted to use rtld_fdputstr() instead
of errx().

PR: bin/165075

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

12 years agoMFC r22990[45] and r229907-r229919:
eadler [Thu, 16 Feb 2012 05:01:09 +0000 (05:01 +0000)]
MFC r22990[45] and r229907-r229919:

- fix a variety of warnings produced by gcc46 when compiling world

Approved by (cperciva)

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

12 years agoMFC r231573:
emaste [Thu, 16 Feb 2012 00:46:11 +0000 (00:46 +0000)]
MFC r231573:

  Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"

  When performing a firmware upgrade via atacontrol[1] the subsequent
  command may time out producing the error message above.  When this
  happens the callout could still be active, and the system would then
  panic due to a destroyed semaphore.

  Instead, ensure that the callout is done first, via callout_drain.

  [1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html

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

12 years agoMFC r231667:
dougb [Wed, 15 Feb 2012 23:02:45 +0000 (23:02 +0000)]
MFC r231667:

Add new functionality to the force_depend method.

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

12 years agoMFC r231667:
dougb [Wed, 15 Feb 2012 22:59:15 +0000 (22:59 +0000)]
MFC r231667:

Fix various issues with the NFS and RPC related scripts.
Add new functionality to the force_depend method.

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

12 years agoMFC r229220: sh: Make various functions static.
jilles [Wed, 15 Feb 2012 22:45:57 +0000 (22:45 +0000)]
MFC r229220: sh: Make various functions static.

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

12 years agoMFC r226523: Fix some memory errors in *at() regression tests.
jilles [Wed, 15 Feb 2012 22:07:09 +0000 (22:07 +0000)]
MFC r226523: Fix some memory errors in *at() regression tests.

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

12 years agoMFC r228109: test: Add more testcases.
jilles [Wed, 15 Feb 2012 21:55:48 +0000 (21:55 +0000)]
MFC r228109: test: Add more testcases.

The new testcases pass even on old stable/7, but some other implementations
manage to get them wrong.

Also remove a few duplicate testcases.

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

12 years agoMFC r229219: sh: Remove unused function scopyn().
jilles [Wed, 15 Feb 2012 21:52:14 +0000 (21:52 +0000)]
MFC r229219: sh: Remove unused function scopyn().

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

12 years agoMFC r229742: sh: Avoid possible echo options in a testcase.
jilles [Wed, 15 Feb 2012 21:48:44 +0000 (21:48 +0000)]
MFC r229742: sh: Avoid possible echo options in a testcase.

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

12 years agoMFC r230512: sockstat: Also show sockets not associated with a descriptor.
jilles [Wed, 15 Feb 2012 21:03:26 +0000 (21:03 +0000)]
MFC r230512: sockstat: Also show sockets not associated with a descriptor.

Sockets not associated with a file descriptor include TCP TIME_WAIT states
and sockets created via the socket(9) API such as from rpc.lockd and the NFS
client.

PR: bin/164081

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

12 years agoMFC r229363
alc [Wed, 15 Feb 2012 18:15:26 +0000 (18:15 +0000)]
MFC r229363
  Don't pass VM_ALLOC_ZERO to vm_page_grab() in tmpfs_mappedwrite() and
  tmpfs_nocacheread().  It is both unnecessary and a pessimization.  It
  results in either the page being zeroed twice or zeroed first and then
  overwritten by an I/O operation.

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

12 years agoMFC r231092
ken [Wed, 15 Feb 2012 17:46:16 +0000 (17:46 +0000)]
MFC r231092

  r231092 | emaste | 2012-02-06 11:11:00 -0700 (Mon, 06 Feb 2012) | 4 lines

  Avoid panic from unlocking a not locked mutex (in some error cases).

  Reviewed by: ken@

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

12 years agoMFC r229997, r230033, and r230334
ken [Wed, 15 Feb 2012 17:28:09 +0000 (17:28 +0000)]
MFC r229997, r230033, and r230334

Bring the CAM Target Layer into stable/9.

  r230334 | ken | 2012-01-19 11:42:03 -0700 (Thu, 19 Jan 2012) | 19 lines

  Quiet some clang warnings when compiling CTL.

  ctl_error.c,
  ctl_error.h: Take out the ctl_sense_format enumeration, and use
   scsi_sense_data_type instead.

   Remove ctl_get_sense_format() and switch ctl_build_ua()
   over to using scsi_sense_data_type.

  ctl_backend_ramdisk.c,
  ctl_backend_block.c:
   Use C99 structure initializers instead of GNU initializers.

  ctl.c: Switch over to using the SCSI sense format enumeration
   instead of the CTL-specific enumeration.

  Submitted by: dim (partially)
  MFC after: 1 month

  r230033 | ken | 2012-01-12 15:08:33 -0700 (Thu, 12 Jan 2012) | 5 lines

  Silence some unnecessary verbosity.

  Reported by: mav
  MFC after: 1 month

  r229997 | ken | 2012-01-11 17:34:33 -0700 (Wed, 11 Jan 2012) | 170 lines

  Add the CAM Target Layer (CTL).

  CTL is a disk and processor device emulation subsystem originally written
  for Copan Systems under Linux starting in 2003.  It has been shipping in
  Copan (now SGI) products since 2005.

  It was ported to FreeBSD in 2008, and thanks to an agreement between SGI
  (who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is
  available under a BSD-style license.  The intent behind the agreement was
  that Spectra would work to get CTL into the FreeBSD tree.

  Some CTL features:

   - Disk and processor device emulation.
   - Tagged queueing
   - SCSI task attribute support (ordered, head of queue, simple tags)
   - SCSI implicit command ordering support.  (e.g. if a read follows a mode
     select, the read will be blocked until the mode select completes.)
   - Full task management support (abort, LUN reset, target reset, etc.)
   - Support for multiple ports
   - Support for multiple simultaneous initiators
   - Support for multiple simultaneous backing stores
   - Persistent reservation support
   - Mode sense/select support
   - Error injection support
   - High Availability support (1)
   - All I/O handled in-kernel, no userland context switch overhead.

  (1) HA Support is just an API stub, and needs much more to be fully
      functional.

  ctl.c: The core of CTL.  Command handlers and processing,
   character driver, and HA support are here.

  ctl.h: Basic function declarations and data structures.

  ctl_backend.c,
  ctl_backend.h: The basic CTL backend API.

  ctl_backend_block.c,
  ctl_backend_block.h: The block and file backend.  This allows for using
   a disk or a file as the backing store for a LUN.
   Multiple threads are started to do I/O to the
   backing device, primarily because the VFS API
   requires that to get any concurrency.

  ctl_backend_ramdisk.c: A "fake" ramdisk backend.  It only allocates a
   small amount of memory to act as a source and sink
   for reads and writes from an initiator.  Therefore
   it cannot be used for any real data, but it can be
   used to test for throughput.  It can also be used
   to test initiators' support for extremely large LUNs.

  ctl_cmd_table.c: This is a table with all 256 possible SCSI opcodes,
   and command handler functions defined for supported
   opcodes.

  ctl_debug.h: Debugging support.

  ctl_error.c,
  ctl_error.h: CTL-specific wrappers around the CAM sense building
   functions.

  ctl_frontend.c,
  ctl_frontend.h: These files define the basic CTL frontend port API.

  ctl_frontend_cam_sim.c: This is a CTL frontend port that is also a CAM SIM.
   This frontend allows for using CTL without any
   target-capable hardware.  So any LUNs you create in
   CTL are visible in CAM via this port.

  ctl_frontend_internal.c,
  ctl_frontend_internal.h:
   This is a frontend port written for Copan to do
   some system-specific tasks that required sending
   commands into CTL from inside the kernel.  This
   isn't entirely relevant to FreeBSD in general,
   but can perhaps be repurposed.

  ctl_ha.h: This is a stubbed-out High Availability API.  Much
   more is needed for full HA support.  See the
   comments in the header and the description of what
   is needed in the README.ctl.txt file for more
   details.

  ctl_io.h: This defines most of the core CTL I/O structures.
   union ctl_io is conceptually very similar to CAM's
   union ccb.

  ctl_ioctl.h: This defines all ioctls available through the CTL
   character device, and the data structures needed
   for those ioctls.

  ctl_mem_pool.c,
  ctl_mem_pool.h: Generic memory pool implementation used by the
   internal frontend.

  ctl_private.h: Private data structres (e.g. CTL softc) and
   function prototypes.  This also includes the SCSI
   vendor and product names used by CTL.

  ctl_scsi_all.c,
  ctl_scsi_all.h: CTL wrappers around CAM sense printing functions.

  ctl_ser_table.c: Command serialization table.  This defines what
   happens when one type of command is followed by
   another type of command.

  ctl_util.c,
  ctl_util.h: CTL utility functions, primarily designed to be
   used from userland.  See ctladm for the primary
   consumer of these functions.  These include CDB
   building functions.

  scsi_ctl.c: CAM target peripheral driver and CTL frontend port.
   This is the path into CTL for commands from
   target-capable hardware/SIMs.

  README.ctl.txt: CTL code features, roadmap, to-do list.

  usr.sbin/Makefile: Add ctladm.

  ctladm/Makefile,
  ctladm/ctladm.8,
  ctladm/ctladm.c,
  ctladm/ctladm.h,
  ctladm/util.c: ctladm(8) is the CTL management utility.
   It fills a role similar to camcontrol(8).
   It allow configuring LUNs, issuing commands,
   injecting errors and various other control
   functions.

  usr.bin/Makefile: Add ctlstat.

  ctlstat/Makefile
  ctlstat/ctlstat.8,
  ctlstat/ctlstat.c: ctlstat(8) fills a role similar to iostat(8).
   It reports I/O statistics for CTL.

  sys/conf/files: Add CTL files.

  sys/conf/NOTES: Add device ctl.

  sys/cam/scsi_all.h: To conform to more recent specs, the inquiry CDB
   length field is now 2 bytes long.

   Add several mode page definitions for CTL.

  sys/cam/scsi_all.c: Handle the new 2 byte inquiry length.

  sys/dev/ciss/ciss.c,
  sys/dev/ata/atapi-cam.c,
  sys/cam/scsi/scsi_targ_bh.c,
  scsi_target/scsi_cmds.c,
  mlxcontrol/interface.c: Update for 2 byte inquiry length field.

  scsi_da.h: Add versions of the format and rigid disk pages
   that are in a more reasonable format for CTL.

  amd64/conf/GENERIC,
  i386/conf/GENERIC,
  ia64/conf/GENERIC,
  sparc64/conf/GENERIC: Add device ctl.

  i386/conf/PAE: The CTL frontend SIM at least does not compile
   cleanly on PAE.

  Sponsored by: Copan Systems, SGI and Spectra Logic
  MFC after: 1 month

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

12 years agoMFC r231505,231520:
bz [Wed, 15 Feb 2012 16:56:52 +0000 (16:56 +0000)]
MFC r231505,231520:

 Introduce a new NET_RT_IFLISTL API to query the address list.  It works
 on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
 will allow us to extend both the msghdrl structs and eventually if_data
 in the future without breaking the ABI.

 The MFC is just to provide the new API to old stable branches to make
 updating and if needed downgrading a lot easier for updates to 10.

 Bump __FreeBSD_version to allow ports to more easily detect the new API.

Reviewed by: brooks
Tested by: brooks

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

12 years agoMFC r231647:
mav [Wed, 15 Feb 2012 14:30:04 +0000 (14:30 +0000)]
MFC r231647:
Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

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

12 years agoMFC: r231123
nyan [Wed, 15 Feb 2012 13:40:10 +0000 (13:40 +0000)]
MFC: r231123

  - Set TERM to cons25w on pc98 because we still use old cons25w terminal
    to show Japanese.
  - Add cons25w to terminal lists.

  Reviewed by: nwhitehorn

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

12 years agoMFC: r231273
nyan [Wed, 15 Feb 2012 13:32:56 +0000 (13:32 +0000)]
MFC: r231273

  - Disable the olpt driver.   Because it conflicts with the ppc/lpt driver.
  - Remove obsolete comment.

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

12 years agoMFC: rev. 231543
fjoe [Wed, 15 Feb 2012 10:08:13 +0000 (10:08 +0000)]
MFC: rev. 231543

- Use fixed-width integer types.
- Prefer to use C99 stdint types.

This fixes ng_cisco on 64-bit architectures.

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

12 years agoMFC r231563: start watchdogd before most of other daemons/servers
avg [Wed, 15 Feb 2012 09:52:09 +0000 (09:52 +0000)]
MFC r231563: start watchdogd before most of other daemons/servers

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

12 years agoMFC r231515:
bz [Wed, 15 Feb 2012 09:32:20 +0000 (09:32 +0000)]
MFC r231515:

 Use the correct constant (with same value) for comparying the SA type.

PR: kern/142741
Submitted by: Matthijs Kooiman (matthijs stdin.nl)

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

12 years agoMFC r230288,230339:
yongari [Wed, 15 Feb 2012 04:09:04 +0000 (04:09 +0000)]
MFC r230288,230339:
r230288:
  Document dev.bge.%d.msi_disable tunable.

r230339:
  Reflect tunable name change made in r230337.

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

12 years agoMFC r230286,230337-230338,231159:
yongari [Wed, 15 Feb 2012 04:02:41 +0000 (04:02 +0000)]
MFC r230286,230337-230338,231159:
r230286:
  Introduce a tunable that disables use of MSI.
  Non-zero value will use INTx.

r230337-230338:
  Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches
  enable/disable and default it to on.

r231159:
  Call bge_add_sysctls() early and especially before bge_can_use_msi() so
  r230337 actually has a chance of working and doesn't always unconditionally
  disable the use of MSIs.

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

12 years agoMFC r230336:
yongari [Wed, 15 Feb 2012 03:48:22 +0000 (03:48 +0000)]
MFC r230336:
  Fix a logic error which resulted in putting PHY into sleep when WOL
  is active.  If WOL is active driver should not put PHY into sleep.
  This change makes WOL work on RTL8168E.

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

12 years agoMFC r230575-230576:
yongari [Wed, 15 Feb 2012 03:41:48 +0000 (03:41 +0000)]
MFC r230575-230576:
r230275:
  Use a RX DMA tag to free loaded RX DMA maps.
  Previously it used a TX DMA tag.

r230276:
  Free allocated jumbo buffers when controller is stopped.

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

12 years agoMFC r229940:
yongari [Wed, 15 Feb 2012 03:33:48 +0000 (03:33 +0000)]
MFC r229940:
  style. No functional changes.

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

12 years agoMFC r231171:
gjb [Wed, 15 Feb 2012 01:52:59 +0000 (01:52 +0000)]
MFC r231171:
 -  Add an option to 404.status-zfs (enabled by default) to list all
    zfs pools on the system.

 -  While here, document daily_status_zfs_enable in periodic.conf(5).

Approved by: jhb

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

12 years agoMFC r231244:
gjb [Wed, 15 Feb 2012 01:39:04 +0000 (01:39 +0000)]
MFC r231244:
- Fix some Xr references:

- - ada(4): ad(4) - removed, ada(4) would be a self-referencing entry
- - cd(4): ad(4) -> ada(4)
- - da(4): ad(4) -> ada(4)
- - DEVICE_PROBE(9):  ugen(5) -> ugen(4)
- - ed(4): dhclinet(8) -> dhclient(8) (typo)
- - lmc(4): Netgraph(4) -> netgraph(4)
- - security(7): rc.conf(8) -> rc.conf(5)
- - sfxge(4): cpuset(8) -> cpuset(1)
- - sbp(4): sysctl(1) -> sysctl(8)
- - portindex(5): build(1) -> build(7)
- - u3g(4): usbconfig(5) -> usbconfig(8)
- - usb_quirk(4): usbconfig(5) -> usbconfig(8)

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

12 years agoMFC r231118:
dim [Tue, 14 Feb 2012 19:36:35 +0000 (19:36 +0000)]
MFC r231118:

Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

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

12 years agoMFC r231525 (pjd):
trociny [Tue, 14 Feb 2012 19:08:21 +0000 (19:08 +0000)]
MFC r231525 (pjd):

Nice range comparison.

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

12 years agoMFC 230587, 230916
ken [Tue, 14 Feb 2012 18:00:37 +0000 (18:00 +0000)]
MFC 230587, 230916

Xen netback driver rewrite.

  r230587 | ken | 2012-01-26 09:35:09 -0700 (Thu, 26 Jan 2012) | 38 lines

  Xen netback driver rewrite.

  share/man/man4/Makefile,
  share/man/man4/xnb.4,
  sys/dev/xen/netback/netback.c,
  sys/dev/xen/netback/netback_unit_tests.c:

  Rewrote the netback driver for xen to attach properly via newbus
and work properly in both HVM and PVM mode (only HVM is tested).
Works with the in-tree FreeBSD netfront driver or the Windows
netfront driver from SuSE.  Has not been extensively tested with
a Linux netfront driver.  Does not implement LRO, TSO, or
polling.  Includes unit tests that may be run through sysctl
after compiling with XNB_DEBUG defined.

  sys/dev/xen/blkback/blkback.c,
  sys/xen/interface/io/netif.h:

Comment elaboration.

  sys/kern/uipc_mbuf.c:

Fix page fault in kernel mode when calling m_print() on a
null mbuf.  Since m_print() is only used for debugging, there
are no performance concerns for extra error checking code.

  sys/kern/subr_scanf.c:

Add the "hh" and "ll" width specifiers from C99 to scanf().
A few callers were already using "ll" even though scanf()
was handling it as "l".

  Submitted by: Alan Somers <alans@spectralogic.com>
  Submitted by: John Suykerbuyk <johns@spectralogic.com>
  Sponsored by: Spectra Logic
  Reviewed by: ken

  r230916 | ken | 2012-02-02 10:54:35 -0700 (Thu, 02 Feb 2012) | 13 lines

  Fix the netback driver build for i386.

  netback.c: Add missing VM includes.

  xen/xenvar.h,
  xen/xenpmap.h: Move some XENHVM macros from <machine/xen/xenpmap.h> to
<machine/xen/xenvar.h> on i386 to match the amd64 headers.

  conf/files: Add netback to the build.

  Submitted by:   jhb

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

12 years agoMFC r231615, r231693
jimharris [Tue, 14 Feb 2012 17:18:45 +0000 (17:18 +0000)]
MFC r231615, r231693

r231615: Minor cleanup and added missing svn keywords (from brueffer@)
r231693: Update HISTORY for isci.4 man page.

Sponsored by: Intel
Approved by: scottl

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

12 years agoMFC r230129,r230143,r230407,r231012:
mm [Tue, 14 Feb 2012 17:09:20 +0000 (17:09 +0000)]
MFC r230129,r230143,r230407,r231012:

MFC r320129 [1]:
Introduce vn_path_to_global_path()

This function updates path string to vnode's full global path and checks
the size of the new path string against the pathlen argument.

In vfs_domount(), sys_unmount() and kern_jail_set() this new function
is used to update the supplied path argument to the respective global path.

Unbreaks jailed zfs(8) with enforce_statfs set to 1.

MFC r230143 [2]:
Fix missing in r230129:

kern_jail.c: initialize fullpath_disabled to zero
vfs_cache.c: add missing dot in comment

MFC r230407 [3]:
Use separate buffer for global path to avoid overflow of path buffer.

MFC r231012:
Analogous to r230407 a separate path buffer in vfs_mount.c is required
for r230129. Fixes a out of bounds write to fspath.

Reviewed by: kib [1] [2], jamie [3]

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

12 years agoMFC 231485
ken [Tue, 14 Feb 2012 16:46:59 +0000 (16:46 +0000)]
MFC 231485

Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
probe routine.

This will allow LSI to ship drivers that return BUS_PROBE_VENDOR to
override the in-tree version of the driver.

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

12 years agoMFC r230843, r231134, r231136, r231137, r231296
jimharris [Tue, 14 Feb 2012 15:58:49 +0000 (15:58 +0000)]
MFC r230843, r231134, r231136, r231137, r231296

Add isci(4) driver for amd64 and i386 targets.

The isci driver is for the integrated SAS controller in the Intel C600
(Patsburg) chipset.  Source files in sys/dev/isci directory are
FreeBSD-specific, and sys/dev/isci/scil subdirectory contains
an OS-agnostic library (SCIL) published by Intel to control the SAS
controller.  This library is used primarily as-is in this driver, with
some post-processing to better integrate into the kernel build
environment.

isci.4 and a README in the sys/dev/isci directory contain a few
additional details.

This driver is only built for amd64 and i386 targets.

Sponsored by: Intel
Reviewed by: scottl
Approved by: scottl

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

12 years agoMFC 229547:
bz [Tue, 14 Feb 2012 15:17:48 +0000 (15:17 +0000)]
MFC 229547:

 Mark a couple of file local functions static and stop exporting them.

Discussed with: rwatson

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

12 years agoMFC 231240
ken [Tue, 14 Feb 2012 14:17:46 +0000 (14:17 +0000)]
MFC 231240

Bring in a number of mps(4) driver fixes from LSI:

1.  Fixed timeout specification for the msleep in mps_wait_command().
    Added 30 second timeout for mps_wait_command() calls in mps_user.c.

2.  Make sure we call mps_detach_user() from the kldunload path.

3.  Raid Hotplug behavior change.

    The driver now removes a volume when it goes to a failed state,
    so we also need to add volume back to the OS when it goes to
    opitimal/degraded/online from failed/missing.

    Handle raid volume add and remove from the IR_Volume event.
4.  Added some more debugging information.

5.  Replace xpt_async(AC_LOST_DEVICE, path, NULL) with
    mpssas_rescan_target().

    This is to work around a panic in CAM that shows up when adding a
    drive with a rescan and removing another device from the driver thread
    with an AC_LOST_DEVICE async notification.

    This problem was encountered in testing with the LSI sas2ircu utility,
    which was used to create a RAID volume from physical disks.  The driver
    has to create the RAID volume target and remove the physical disk
    targets, and triggered a panic in the process.

    The CAM issue needs to be fully diagnosed and fixed, but this works
    around the issue for now.

6.  Fix some memory initialization issues in mps_free_command().

7.  Resolve the "devq freeze forever" issue.  This was caused by the
    internal read capacity command issued in the non-head version of the
    driver.  When the command completed with an error, the driver wasn't
    unfreezing thd device queue.

    The version in head uses the CAM infrastructure for getting the read
    capacity information, and therefore doesn't have the same issue.

8.  Bump the version to 13.00.00.00-fbsd. (this is very close to LSI's
    internal stable driver 13.00.00.00)

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>

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

12 years agoMFH r230007, r230388: document quiet*, fix devd/dhclient interaction.
des [Tue, 14 Feb 2012 12:43:33 +0000 (12:43 +0000)]
MFH r230007, r230388: document quiet*, fix devd/dhclient interaction.

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

12 years agoMFC r231507:
dougb [Tue, 14 Feb 2012 10:33:57 +0000 (10:33 +0000)]
MFC r231507:

Move addswap to run right after kld (aka early in the second stage),
as it did previously.

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

12 years agoMFC: the "oce" driver for Emulex OneConnect 10Gbit Ethernet.
luigi [Tue, 14 Feb 2012 10:30:22 +0000 (10:30 +0000)]
MFC: the "oce" driver for Emulex OneConnect 10Gbit Ethernet.
This is the same exact code that you can find in HEAD

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

12 years agoMFC r231194:
dougb [Tue, 14 Feb 2012 10:29:32 +0000 (10:29 +0000)]
MFC r231194:

Add a knob to always load the default rulesets. While I'm here document
the other devfs_ knobs in rc.conf.5.

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

12 years agoMFC r230374:
dougb [Tue, 14 Feb 2012 10:18:49 +0000 (10:18 +0000)]
MFC r230374:

If we're booting there is no need to waste time determining if the service
is running or not.

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

12 years agoMFC r230099:
dougb [Tue, 14 Feb 2012 10:16:56 +0000 (10:16 +0000)]
MFC r230099:

Change rcvar= assignments to the literal values set_rcvar
would have returned. This will slightly reduce boot time,
and help in diff reduction to HEAD.

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

12 years agoMFC: import netmap core files into RELENG_9.
luigi [Tue, 14 Feb 2012 09:42:02 +0000 (09:42 +0000)]
MFC: import netmap core files into RELENG_9.
This is the same code as in HEAD.

Device driver modifications will be imported separately
because the base drivers differ and patches might be
slightly different between the various releases.

The code is disconnected from the main build targets
unless you explicitly put a 'device netmap' in your
kernel config file.

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

12 years agoMFC r231367:
ae [Tue, 14 Feb 2012 07:24:22 +0000 (07:24 +0000)]
MFC r231367:
  Add alias for the partition with type 0x42 to the MBR scheme.

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

12 years agoMFC r231349:
ae [Tue, 14 Feb 2012 07:12:46 +0000 (07:12 +0000)]
MFC r231349:
  Let's be more realistic and limit maximum number of partition to 4k.

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

12 years agoMFC r231575:
hselasky [Tue, 14 Feb 2012 06:40:58 +0000 (06:40 +0000)]
MFC r231575:
Update /etc/devd/usb.conf

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

12 years agoMFC: r230803
rmacklem [Tue, 14 Feb 2012 04:48:36 +0000 (04:48 +0000)]
MFC: r230803
When a "mount -u" switches an NFS mount point from TCP to UDP,
any thread doing an I/O RPC with a transfer size greater than
NFS_UDPMAXDATA will be hung indefinitely, retrying the RPC.
After a discussion on freebsd-fs@, I decided to add a warning
message for this case, as suggested by Jeremy Chadwick.

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

12 years ago MFC 231106:
davidxu [Tue, 14 Feb 2012 04:20:02 +0000 (04:20 +0000)]
 MFC 231106:
 Plug a memory leak. When a cached thread is reused, don't clear sleep
 queue pointers, just reuse it.

 MFC 231503:
 Make code more stable by checking NULL pointers.

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

12 years agoMFC: r230801
rmacklem [Tue, 14 Feb 2012 04:07:35 +0000 (04:07 +0000)]
MFC: r230801
jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011
under the subject "F_RDLCK lock to FreeBSD NFS fails to R/O target file".
This occurred because the server side NLM always checked for VWRITE
access, irrespective of the type of lock request. This patch
replaces VOP_ACCESS(..VWRITE..) with one appropriate to
the lock operation. It allows unlock and lock cancellation
to be done without a check of VOP_ACCESS(), so that files
can't be left locked indefinitely after the file permissions
have been changed.

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

12 years agoMFC: r231228
marius [Tue, 14 Feb 2012 01:15:01 +0000 (01:15 +0000)]
MFC: r231228

Remove extra newlines from panic messages.

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

12 years agoForced commit to denote that the commit message of r231623 actually
marius [Tue, 14 Feb 2012 01:05:37 +0000 (01:05 +0000)]
Forced commit to denote that the commit message of r231623 actually
should have read:
MFC: r231518

Flesh out support for SAS1078 and SAS1078DE (which are said to actually
be the same chip):
- The I/O port resource may not be available with these. However, given
  that we actually only need this resource for some controllers that
  require their firmware to be up- and downloaded (which excludes the
  SAS1078{,DE}) just handle failure to allocate this resource gracefully
  when possible. While at it, generally put non-fatal resource allocation
  failures under bootverbose.
- SAS1078{,DE} use a different hard reset protocol.
- Add workarounds for the 36GB physical address limitation of scatter/
  gather elements of these controllers.

Tested by: Slawa Olhovchenkov

PR: 149220 (remaining part)

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

12 years agoMFC: r231518
marius [Tue, 14 Feb 2012 00:54:50 +0000 (00:54 +0000)]
MFC: r231518

Remove extra newlines from panic messages.

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

12 years agoMFC r231079:
dim [Mon, 13 Feb 2012 20:59:20 +0000 (20:59 +0000)]
MFC r231079:

  Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
  preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
  used the -Y option, and even then you could not set the basename.  It
  also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
  is obsolete, and has been removed.

  Note that setting RPCGEN_CPP to a command with arguments is supported,
  though the command line parsing is simplistic.  However, setting it to
  e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
  and clang in -E mode will consider files with unknown extensions (such
  as .x) as object files, and attempt to link them.

  This could be worked around by also adding "-x c", but it is much safer
  to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC r231080:

  Amend r231079 by properly shifting up the existing arguments in
  rpc_main.c's insarg() function.  I had forgotten to put this in my patch
  queue, sorry.

  Pointy hat to: me

MFC r231101:

  In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
  rpcgen will search the current PATH for the preprocessor.  This makes it
  possible to run a preprocessor built during the cross-tools stage of
  buildworld.

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

12 years agoMFC 230340:
jhb [Mon, 13 Feb 2012 19:51:59 +0000 (19:51 +0000)]
MFC 230340:
Properly return success once a matching VPD entry is found in
pci_get_vpd_readonly_method().  Previously the loop was always running
to completion and falling through to failing with ENXIO.

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

12 years agoMFC r231592:
np [Mon, 13 Feb 2012 19:41:01 +0000 (19:41 +0000)]
MFC r231592:
Use the non-sleeping variang of t4_wr_mbox in code that can be called
with locks held.

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

12 years agoMFC 230332:
jhb [Mon, 13 Feb 2012 19:36:09 +0000 (19:36 +0000)]
MFC 230332:
Add support for the Em command.  This restores a missing 'not' in the
description of snd_emu10kx(4).

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

12 years agoMFC r231175:
np [Mon, 13 Feb 2012 19:35:38 +0000 (19:35 +0000)]
MFC r231175:
Allocate the BAR for userspace doorbells after the is_offload check
is functional.

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

12 years agoMFC r231172:
np [Mon, 13 Feb 2012 19:31:16 +0000 (19:31 +0000)]
MFC r231172:
Program the MAC exact match table in batches of 7 addresses at
a time when possible.  This is more efficient than one at a time.

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

12 years agoMFC r231120:
np [Mon, 13 Feb 2012 19:25:37 +0000 (19:25 +0000)]
MFC r231120:
Acquire the adapter lock before updating fields of the filter structure.

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

12 years agoMFC r231116:
np [Mon, 13 Feb 2012 19:17:43 +0000 (19:17 +0000)]
MFC r231116:
Remove if_start from cxgb and cxgbe.

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

12 years agoMFC r230377:
jh [Mon, 13 Feb 2012 19:02:11 +0000 (19:02 +0000)]
MFC r230377:

Don't print the nmount(2) provided error message if it is empty.

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

12 years agoMFC r231115:
np [Mon, 13 Feb 2012 18:54:15 +0000 (18:54 +0000)]
MFC r231115:
cxgbe: reduce diffs with other branches.

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

12 years agoMFC r230373:
jh [Mon, 13 Feb 2012 18:26:58 +0000 (18:26 +0000)]
MFC r230373:

Change mount_fs() to not exit on error. The "failok" mount option
requires that errors are passed to the caller.

PR: 163668

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

12 years agoMerge from head 226829, 230213, 230480, 230486, 230487, 231585:
glebius [Mon, 13 Feb 2012 15:21:12 +0000 (15:21 +0000)]
Merge from head 226829, 230213, 230480, 230486, 230487, 231585:

r226829 in ng_base:
  - If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed
    invariants.
  - Reduce tautology in NETGRAPH_DEBUG output.

r230213 in ng_socket:
  Remove some disabled NOTYET code. Probability of enabling it is low,
  if anyone wants, he/she can take it from svn.

r230480 in ng_base:
  Convert locks that protect name hash, ID hash and typelist from
  mutex(9) to rwlock(9) based locks.

  While here remove dropping lock when processing NGM_LISTNODES,
  and NGM_LISTTYPES generic commands. We don't need to drop it
  since memory allocation is done with M_NOWAIT.

r230486 in subr_hash.c:
  Convert panic()s to KASSERT()s. This is an optimisation for
  hashdestroy() since in absence of INVARIANTS a compiler
  will drop the entire for() cycle.

230487, 231585 in ng_socket:
  Provide a findhook method for ng_socket(4). The node stores a
  hash with names of its hooks. It starts with size of 16, and
  grows when number of hooks reaches twice the current size. A
  failure to grow (memory is allocated with M_NOWAIT) isn't
  fatal, however.

  I used standard hash(9) function for the hash. With 25000
  hooks named in the mpd (ports/net/mpd5) manner of "b%u", the
  distributions is the following: 72.1% entries consist of one
  element, 22.1% consist of two, 5.2% consist of three and
  0.6% of four.

  Speedup in a synthetic test that creates 25000 hooks and then
  runs through a long cyclce dereferencing them in a random order
  is over 25 times.

The last merge was done in an ABI preserving manner, the struct
ngsock is still exposed to userland (unlike in head), but its new
fields are at its end and under #ifdef _KERNEL.

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

12 years agoMFC r231091:
kib [Mon, 13 Feb 2012 10:48:43 +0000 (10:48 +0000)]
MFC r231091:
Add missing opt_quota.h include to activate #ifdef QUOTA blocks.

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

12 years agoMFC r231077:
kib [Mon, 13 Feb 2012 10:45:20 +0000 (10:45 +0000)]
MFC r231077:
JNEWBLK dependency may legitimately appear on the buf dependency list.

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

12 years agoMFC r230784:
kib [Mon, 13 Feb 2012 10:40:14 +0000 (10:40 +0000)]
MFC r230784:
Add support for GNU RELRO.

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

12 years agoMFC r229794:
tijl [Mon, 13 Feb 2012 10:24:49 +0000 (10:24 +0000)]
MFC r229794:

- Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

MFC r230649:

Fix decoding of escape sequences in format strings:
- Zero-terminate the resulting string by letting the for-loop copy the
  terminating zero.
- Exit the for-loop after handling a backslash at the end of the format
  string to fix a buffer overrun.
- Remove some unnecessary comments and blank lines.

PR: bin/144722

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

12 years agoMFC r231102:
truckman [Mon, 13 Feb 2012 07:30:42 +0000 (07:30 +0000)]
MFC r231102:

Improve sparse file handling when printing the block list for an inode by
not bailing out early when a hole is encountered in the direct block list.
Print NULL block pointers in the direct block list.  Simplify the
code that prints the fragment count.

Match the style of the existing code.

Reviewed by: mckusick

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

12 years agoMFC 231196:
brooks [Sun, 12 Feb 2012 23:07:45 +0000 (23:07 +0000)]
MFC 231196:
  eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and
  ether_nota_r and do not use static variables so remove the note copied
  from ethers.3 saying they do.

Reported by: bms

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

12 years agoMFC r231054:
dim [Sun, 12 Feb 2012 14:56:31 +0000 (14:56 +0000)]
MFC r231054:

In usr.bin/rpcgen/rpc_main.c, properly check the return value of
strlcpy(), in addition to checking that of strlcat().

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

12 years agoMFC r231015, r231016:
trociny [Sun, 12 Feb 2012 07:57:58 +0000 (07:57 +0000)]
MFC r231015, r231016:

r231015:

Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by: pjd

r231016:

If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by: Artem Kajalainen <artem kayalaynen ru>
Reviewed by: pjd

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

12 years agoMFC r230874:
trociny [Sun, 12 Feb 2012 07:55:33 +0000 (07:55 +0000)]
MFC r230874:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by: Andrey Zonov <andrey zonov org>

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

12 years agoMFC r230873:
trociny [Sun, 12 Feb 2012 07:52:14 +0000 (07:52 +0000)]
MFC r230873:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by: Andrey Zonov <andrey zonov org>

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

12 years agoMFC: r231133
rmacklem [Sun, 12 Feb 2012 06:01:49 +0000 (06:01 +0000)]
MFC: r231133
r228827 fixed a problem where copying of NFSv4 open credentials into
a credential structure would corrupt it. This happened when the
p argument was != NULL. However, I now realize that the copying of
open credentials should only happen for p == NULL, since that indicates
that it is a read-ahead or write-behind. This patch fixes this.
After this commit, r228827 could be reverted, but I think the code is
clearer and safer with the patch, so I am going to leave it in.
Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have
changed the credentials of the caller. This would have happened if
the process doing the VOP_SETATTR() did not have the file open, but
some other process running as a different uid had the file open for writing
at the same time.

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

12 years agoMFC r230437: sh: Remove "kill" example function, which is superseded by the
jilles [Sat, 11 Feb 2012 20:44:16 +0000 (20:44 +0000)]
MFC r230437: sh: Remove "kill" example function, which is superseded by the
kill builtin.

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

12 years agoMFC r231001: sh: Fix swapped INTON/INTOFF.
jilles [Sat, 11 Feb 2012 20:08:46 +0000 (20:08 +0000)]
MFC r231001: sh: Fix swapped INTON/INTOFF.

A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).

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

12 years agoMFC: r231168
pfg [Sat, 11 Feb 2012 20:01:03 +0000 (20:01 +0000)]
MFC: r231168

Update the data structures with some fields reserved for
ext4 but that can be used in ext3 mode.

Also adjust the internal inode to carry the birthtime,
like in UFS, which is starting to get some use when
big inodes are available.

This is a prerequisite for new features that will be
coming in the future.

Approved by: jhb (mentor)

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

12 years agoMFC: r230635
pfg [Sat, 11 Feb 2012 19:41:56 +0000 (19:41 +0000)]
MFC: r230635

Set SVN text/plain property for some shell scripts that
happen to have a .exe extension.

While here fix the shebang of a shell script that
was looking for /bin/bash.

Reviewed by: gnn
Approved by: jhb (mentor)

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