]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
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

12 years agoMFC r230157: dadump: don't leak the periph lock on i/o error
avg [Sat, 11 Feb 2012 14:55:05 +0000 (14:55 +0000)]
MFC r230157: dadump: don't leak the periph lock on i/o error

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

12 years agoMFC 231170
ken [Fri, 10 Feb 2012 18:14:25 +0000 (18:14 +0000)]
MFC 231170

Update the mps(4) man page for the changes in the new LSI-supported driver.

This should have been included in change 230592.

The supported hardware section still needs some updating to reflect
the current reality.

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

12 years agoMFC r230403.
brooks [Fri, 10 Feb 2012 15:54:17 +0000 (15:54 +0000)]
MFC r230403.

When creating the jails /dev/log symlink, do it by full path to avoid
creating stray "log" symlinks if the mount fails.  That apparently
happens in some ezjail configs.

PR: conf/143084
Submitted by: Dirk Engling <erdgeist at erdgeist.org>

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

12 years agoMFC r231144:
mm [Fri, 10 Feb 2012 13:35:49 +0000 (13:35 +0000)]
MFC r231144:
Merge illumos revision 13594:

uninitialized variables in zfs(8) may make snapshots undestroyable [1]

References:
https://www.illumos.org/issues/2067 [1]

Obtained from: illumos (issue #2067)
PR: bin/164802

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

12 years agoMFC r228191:
dougb [Fri, 10 Feb 2012 10:22:42 +0000 (10:22 +0000)]
MFC r228191:

Ensure kldxref is run first.

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

12 years agoPull up mergeinfo from r226345,226464,226879 to etc/ where it belongs
dougb [Fri, 10 Feb 2012 09:46:30 +0000 (09:46 +0000)]
Pull up mergeinfo from r226345,226464,226879 to etc/ where it belongs

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

12 years agoMFC r230861:
ae [Fri, 10 Feb 2012 06:38:03 +0000 (06:38 +0000)]
MFC r230861:
  The scheme code may not know about some inconsistency in the metadata.
  So, add an integrity check after recovery attempt.

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

12 years agoMFC r228061:
ae [Fri, 10 Feb 2012 06:34:21 +0000 (06:34 +0000)]
MFC r228061:
  The size of APM could be bigger than number of already allocated entries.
  And the first usable sector should not start from the inside of APM area.

MFC r228076:
  Add an ability to increase number of allocated APM entries when we
  have reserved free space in the APM area.
  Also instead of one write request per each APM entry, use MAXPHYS
  sized writes when we are updating APM.

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

12 years agoMFC r231111, r231331
eadler [Fri, 10 Feb 2012 04:08:22 +0000 (04:08 +0000)]
MFC r231111, r231331

PR: 159551
Approved by: gjb

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

12 years agoMFC: r230605
rmacklem [Fri, 10 Feb 2012 03:32:29 +0000 (03:32 +0000)]
MFC: r230605
A problem with respect to data read through the buffer cache for both
NFS clients was reported to freebsd-fs@ under the subject "NFS
corruption in recent HEAD" on Nov. 26, 2011. This problem occurred when
a TCP mounted root fs was changed to using UDP. I believe that this
problem was caused by the change in mnt_stat.f_iosize that occurred
because rsize was decreased to the maximum supported by UDP. This
patch fixes the problem by using v_bufobj.bo_bsize instead of f_iosize,
since the latter is set to f_iosize when the vnode is allocated, but
does not change for a given vnode when f_iosize changes.

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

12 years agoMFC r230510:
bz [Fri, 10 Feb 2012 00:51:23 +0000 (00:51 +0000)]
MFC r230510:

 Replace random ARIN direct assignment legacy IPs with proper RFC 5735
 TEST-NET1 block for use in documentation and example code addresses.

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

12 years agoMFC r230506:
bz [Fri, 10 Feb 2012 00:24:39 +0000 (00:24 +0000)]
MFC r230506:

 Plug a possible ifa_ref leak in case of premature return from in6_purgeaddr().

 Reviewed by: rwatson

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

12 years agoMFC r228344:
eadler [Fri, 10 Feb 2012 00:08:53 +0000 (00:08 +0000)]
MFC r228344:
 - Add support for Support SEAGATE DAT Scopion 130

PR: kern/141934
Approved by: cperciva

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

12 years agoMFC r230494:
bz [Fri, 10 Feb 2012 00:02:03 +0000 (00:02 +0000)]
MFC r230494:

 Remove unnecessary line break.

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

12 years agoMFC r230387:
bz [Thu, 9 Feb 2012 22:54:16 +0000 (22:54 +0000)]
MFC r230387:

 Remove a superfluous INET6 check (no opt_inet6.h included anyway).

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

12 years agoMFC r231074:
tuexen [Thu, 9 Feb 2012 22:05:51 +0000 (22:05 +0000)]
MFC r231074:
Fix a typo which was already fixed by eadler in r227489. We missed
to integrate this fix in our code base, so it was removed in r227755.

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

12 years agoMFC r229546:
bz [Thu, 9 Feb 2012 22:01:59 +0000 (22:01 +0000)]
MFC r229546:

 Convert an #ifdef DIAGNOSTIC if/panic to a KASSERT.

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

12 years agoMFC r229795:
bz [Thu, 9 Feb 2012 20:57:25 +0000 (20:57 +0000)]
MFC r229795:

 Correct comment for the IPv6 case to say "traffic class" not "TOS"
 as pointed out back in 2009.

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

12 years agoMFC r229276:
bz [Thu, 9 Feb 2012 20:54:04 +0000 (20:54 +0000)]
MFC r229276:

 Remove an uneeded inpcb forward declaration and align the function
 declaration following to match the style in the rest of the file.

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

12 years agoMFC r230330:
ed [Thu, 9 Feb 2012 16:58:06 +0000 (16:58 +0000)]
MFC r230330:

  Remove remnants of dev_t.

  These functions take a `struct cdev *' -- not a dev_t. Inside the
  kernel, dev_t has the same use as in userspace, namely to store a device
  identifier.

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