Commit Graph

183389 Commits

Author SHA1 Message Date
Andre Oppermann
737003b366 ename PFIL_LIST_[UN]LOCK() to PFIL_HEADLIST_[UN]LOCK() to avoid
confusion with the pfil_head chain locking macros.
2013-08-24 11:24:15 +00:00
Andre Oppermann
8da0139975 Resolve the confusion between the head_list and the hook list.
The linked list of pfil hooks is changed to "chain" and this term
is applied consistently.  The head_list remains with "list" term.

Add KASSERT to vnet_pfil_uninit().

Update and extend comments.

Reviewed by:	eri (previous version)
2013-08-24 11:17:25 +00:00
Andre Oppermann
bacda5aaa9 pfil_hook_get() has been internalized in r254771 and is no longer
part of the API.  It wasn't safe for external use in any case.
2013-08-24 10:38:02 +00:00
Andre Oppermann
887c60fc86 Internalize pfil_hook_get(). There are no outside consumers of
this API, it is only safe for internal use and even the pfil(9)
man page says so in the BUGS section.

Reviewed by:	eri
2013-08-24 10:36:33 +00:00
Andre Oppermann
f13e611f7c Convert one instance of pfil hook callback missed in r254769. 2013-08-24 10:30:20 +00:00
Andre Oppermann
25da5060a4 Introduce typedef for pfil hook callback function and replace all
spelled out occurrences with it.

Reviewed by:	eri
2013-08-24 10:13:59 +00:00
Ed Maste
7e7299d197 Revert lldb changes due to post-3.3 clang and llvm API changes
Revisions:
svn	git
183929	99447a6
183862	15c1774
  source/Host/common/FileSpec.cpp

184954	007e7bc
184948	4dc3761
  source/Expression/ClangExpressionParser.cpp

182099	b31044e
181387	779e6ac
  include/lldb/Expression/IRExecutionUnit.h
  source/Expression/IRExecutionUnit.cpp

184177	0b2934b
182650	f2dcf35
181703	7bef4e2
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp

182683	0d91b80
  source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Sponsored by:	DARPA, AFRL
2013-08-24 10:06:51 +00:00
Jilles Tjoelker
7cb5a0d863 sh: Do not prematurely discard stopped jobs in a wait builtin.
If a job is specified to 'wait', wait for it to complete. Formerly, in
interactive mode, the job was deleted if it stopped.

If no jobs are specified in interactive mode, 'wait' still waits for all jobs
to complete or stop.

In non-interactive mode, WUNTRACED is not passed to wait3() so stopped jobs
are not detected.

PR:		bin/181435
2013-08-24 09:57:32 +00:00
Alexander Motin
40f27d7cf6 Add new attribute lunname to report only textual LUN-specific device IDs.
While lunid attribute prefers to report numeric ones, having both may be
useful in some situations.
2013-08-24 09:42:14 +00:00
Kenneth D. Merry
93729c1796 Add support to physio(9) for devices that don't want I/O split and
configure sa(4) to request no I/O splitting by default.

For tape devices, the user needs to be able to clearly understand
what blocksize is actually being used when writing to a tape
device.  The previous behavior of physio(9) was that it would split
up any I/O that was too large for the device, or too large to fit
into MAXPHYS.  This means that if, for instance, the user wrote a
1MB block to a tape device, and MAXPHYS was 128KB, the 1MB write
would be split into 8 128K chunks.  This would be done without
informing the user.

This has suboptimal effects, especially when trying to communicate
status to the user.  In the event of an error writing to a tape
(e.g. physical end of tape) in the middle of a 1MB block that has
been split into 8 pieces, the user could have the first two 128K
pieces written successfully, the third returned with an error, and
the last 5 returned with 0 bytes written.  If the user is using
a standard write(2) system call, all he will see is the ENOSPC
error.  He won't have a clue how much actually got written.  (With
a writev(2) system call, he should be able to determine how much
got written in addition to the error.)

The solution is to prevent physio(9) from splitting the I/O.  The
new cdev flag, SI_NOSPLIT, tells physio that the driver does not
want I/O to be split beforehand.

Although the sa(4) driver now enables SI_NOSPLIT by default,
that can be disabled by two loader tunables for now.  It will not
be configurable starting in FreeBSD 11.0.  kern.cam.sa.allow_io_split
allows the user to configure I/O splitting for all sa(4) driver
instances.  kern.cam.sa.%d.allow_io_split allows the user to
configure I/O splitting for a specific sa(4) instance.

There are also now three sa(4) driver sysctl variables that let the
users see some sa(4) driver values.  kern.cam.sa.%d.allow_io_split
shows whether I/O splitting is turned on.  kern.cam.sa.%d.maxio shows
the maximum I/O size allowed by kernel configuration parameters
(e.g. MAXPHYS, DFLTPHYS) and the capabilities of the controller.
kern.cam.sa.%d.cpi_maxio shows the maximum I/O size supported by
the controller.

Note that a better long term solution would be to implement support
for chaining buffers, so that that MAXPHYS is no longer a limiting
factor for I/O size to tape and disk devices.  At that point, the
controller and the tape drive would become the limiting factors.

sys/conf.h:	Add a new cdev flag, SI_NOSPLIT, that allows a
		driver to tell physio not to split up I/O.

sys/param.h:	Bump __FreeBSD_version to 1000049 for the addition
		of the SI_NOSPLIT cdev flag.

kern_physio.c:	If the SI_NOSPLIT flag is set on the cdev, return
		any I/O that is larger than si_iosize_max or
		MAXPHYS, has more than one segment, or would have
		to be split because of misalignment with EFBIG.
		(File too large).

		In the event of an error, print a console message to
		give the user a clue about what happened.

scsi_sa.c:	Set the SI_NOSPLIT cdev flag on the devices created
		for the sa(4) driver by default.

		Add tunables to control whether we allow I/O splitting
		in physio(9).

		Explain in the comments that allowing I/O splitting
		will be deprecated for the sa(4) driver in FreeBSD
		11.0.

		Add sysctl variables to display the maximum I/O
		size we can do (which could be further limited by
		read block limits) and the maximum I/O size that
		the controller can do.

		Limit our maximum I/O size (recorded in the cdev's
		si_iosize_max) by MAXPHYS.  This isn't strictly
		necessary, because physio(9) will limit it to
		MAXPHYS, but it will provide some clarity for the
		application.

		Record the controller's maximum I/O size reported
		in the Path Inquiry CCB.

sa.4:		Document the block size behavior, and explain that
		the option of allowing physio(9) to split the I/O
		will disappear in FreeBSD 11.0.

Sponsored by:	Spectra Logic
2013-08-24 04:52:22 +00:00
Edward Tomasz Napierala
81a2151d5c CTL changes required for iSCSI target, most notably LUN remapping
and a mechanism to allow CTL frontends for retrieving LUN options.

Reviewed by:	ken (earlier version)
2013-08-24 01:50:31 +00:00
Xin LI
83b6a67e66 MFV r254751:
Don't treat the parameter as a number (pool GUID) when there is
error converting it from string, instead, treat it as the pool
name.

Illumos ZFS issues:
  1765 assert triggered in libzfs_import.c trying to import pool
       name beginning with a number
2013-08-24 00:54:47 +00:00
Xin LI
439024135c MFV r254749:
Don't hold dd_lock for long by breaking it when not doing dsl_dir
accounting.  It is not necessary to hold the lock while manipulating
the parent's accounting, because there is no interface for userland
to see a consistent picture of both parent and child at the same
time anyway.

Illumos ZFS issues:
  4046 dsl_dataset_t ds_dir->dd_lock is highly contended
2013-08-24 00:42:37 +00:00
Alfred Perlstein
477e6ee4eb Grow some spares in struct vfsops.
This should hopefully prevent ABI breakage
on adding new vfsops in 10.x.
2013-08-24 00:30:32 +00:00
Xin LI
b333d51d8f MFV r254748:
Fix memory leak in libzfs's iter_dependents_cb().

Illumos ZFS issues:
  4061 libzfs: memory leak in iter_dependents_cb()
2013-08-24 00:29:34 +00:00
Xin LI
00e37ef129 MFV r254747:
Fix a panic from dbuf_free_range() from dmu_free_object() while
doing zfs receive.  This is a regression from FreeBSD r253821.

Illumos ZFS issues:
  4047 panic from dbuf_free_range() from dmu_free_object() while
       doing zfs receive
2013-08-24 00:19:26 +00:00
Xin LI
cc16dea626 MFV r254746:
To quote original Illumos ticket:

libctf thinks that any ELF file containing more than 65536 sections is
corrupt, because it doesn't understand the SHN_XINDEX magic.

Illumos DTrace issues:
  4005 libctf can't deal with extended sections
2013-08-23 23:58:56 +00:00
Xin LI
d264a033cd Update vendor/illumos/dist to 14160:734110b9882f:
Illumos ZFS issues:
  1765 assert triggered in libzfs_import.c trying to import pool
       name beginning with a number
2013-08-23 23:47:59 +00:00
Xin LI
fd1be4250e Update vendor/illumos/dist and vendor-sys/illumos/dist
to 14159:dc75c925d8aa:

Illumos ZFS issues:
  2932 support crash dumps to raidz, etc. pools
2013-08-23 23:46:27 +00:00
Xin LI
b16bc6a689 Update vendor-sys/illumos/dist to 14157:85f7bb2246ca:
Illumos ZFS issues:
  4046 dsl_dataset_t ds_dir->dd_lock is highly contended
2013-08-23 23:40:25 +00:00
Xin LI
baaf1b273e Update vendor/illumos/dist to 14152:46f5fb0b0d36:
Illumos DTrace issues:
  4061 libzfs: memory leak in iter_dependents_cb()
2013-08-23 23:37:55 +00:00
Xin LI
a40012699f Update vendor-sys/illumos/dist to 14151:189ec27885ae:
Illumos DTrace issues:
  4047 panic from dbuf_free_range() from dmu_free_object() while doing zfs receive
2013-08-23 23:36:27 +00:00
Xin LI
0239dcb737 Update vendor/illumos/dist to 14148:fe28bd725808:
Illumos DTrace issues:
  4005 libctf can't deal with extended sections
2013-08-23 23:34:54 +00:00
Jung-uk Kim
79c6d94679 Merge ACPICA 20130823. 2013-08-23 23:25:58 +00:00
Xin LI
3f0164abf3 MFV r254422:
Illumos DTrace issues:
  3089 want ::typedef
  3094 libctf should support removing a dynamic type
  3095 libctf does not validate arrays correctly
  3096 libctf does not validate function types correctly
2013-08-23 23:21:24 +00:00
Alan Somers
2adf57829e Correctly remove an interface's ipv4 address when the user calls
"/etc/rc.d/netif stop XXX".  The old globbing pattern failed to account for the
possibility of a tab occuring before "inet".

Reviewed by:	will
Approved by:	ken (mentor, implicit)
MFC after:	Never (bug affects head only)
Sponsored by:	Spectra Logic
2013-08-23 23:12:16 +00:00
Mark Johnston
30e71983d0 Hold mfi_io_lock across calls to xpt_rescan() and xpt_alloc_ccb_nowait().
xpt_rescan() expects the SIM lock to be held, and we trip a mtx_assert if
the driver initiates multiple rescans in quick succession.

Reported by:	sbruno
Tested by:	sbruno
MFC after:	1 week
2013-08-23 22:55:52 +00:00
Xin LI
2454886e05 Allow tmpfs be mounted inside jail. 2013-08-23 22:52:20 +00:00
Bryan Venteicher
c7e7c22e16 Remove duplicate copy of the man page
Pointed out by:	jmallett
2013-08-23 20:56:17 +00:00
Bryan Venteicher
e3c97c2cc2 Add vmx(4), a VMware VMXNET3 ethernet driver ported from OpenBSD 2013-08-23 20:47:16 +00:00
Andreas Tobler
b1397508be Return EIO iso -1, the kiic_transfer has an signed return.
Submitted by: Luiz Otavio O Souza <loos.br AT gmail.com>
2013-08-23 20:39:41 +00:00
Navdeep Parhar
ea68a7142e Assorted fixes to krping. Disconnect the rest of sys/contrib/rdma from
the build while here.  sys/ofed has more recent RDMA code and should be
used instead.  We should probably move krping out of sys/contrib/rdma
and get rid of the rest of it.

Obtained from:	Chelsio
2013-08-23 19:12:29 +00:00
Navdeep Parhar
f336c6303e Fix implementation of sock_getname.
MFC after:	1 week
2013-08-23 18:54:27 +00:00
Jung-uk Kim
ce7707b487 Set the hint for physical address of RSDP in hexadecimal as before r223262. 2013-08-23 18:52:36 +00:00
Navdeep Parhar
bb6a76ed22 Whitespace cleanup. 2013-08-23 18:45:39 +00:00
Ed Maste
ac7ddfbf72 Merge lldb r188801 to contrib/llvm/tools/lldb/ 2013-08-23 18:06:42 +00:00
Navdeep Parhar
aa9a5cc05a There is no need to hold the freelist lock around alloc/free of
software descriptors.  This also silences WITNESS warnings when
the software descriptors are allocated with M_WAITOK.

MFC after:	1 week
2013-08-23 18:03:18 +00:00
Jung-uk Kim
59ce063597 Import ACPICA 20130823. 2013-08-23 18:01:58 +00:00
Ed Maste
f034231a6a Import lldb as of SVN r188801
(A number of files not required for the FreeBSD build have been removed.)

Sponsored by:	DARPA, AFRL
2013-08-23 17:46:38 +00:00
Alan Cox
776cad90ff Addendum to r254141: The call to vm_radix_insert() in vm_page_cache() can
reclaim the last preexisting cached page in the object, resulting in a call
to vdrop().  Detect this scenario so that the vnode's hold count is
correctly maintained.  Otherwise, we panic.

Reported by:	scottl
Tested by:	pho
Discussed with:	attilio, jeff, kib
2013-08-23 17:27:12 +00:00
Jung-uk Kim
d23db15020 Fix a whitespace. 2013-08-23 16:54:38 +00:00
Ian Lepore
a6e2415cc4 Don't give up so easily on failure of CMD55 to put the card into app-cmd
mode.  We don't know why it failed, so we can't know that a retry will
also fail (the low-level driver might have reset the controller state
machine or something similar that would allow a retry to work).
2013-08-23 15:07:54 +00:00
Konstantin Belousov
f6d76b0ec1 Since the 253927, which removed the soft busy call for the sf page, it
does not make sense to wait for the soft busy state of the page to
drain.  The vm object lock is dropped immediately after, so the result
of the wait is invalidated.

It might make sense to not wait for the hard busy state as well,
esp. for the fully valid page, but this is postponed for now.

Reviewed by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2013-08-23 14:50:03 +00:00
Andriy Gapon
2073a41a42 zfs: do not reject any operations on a pool just because it's a boot pool
Unlike the upstream FreeBSD supports booting to all kinds of pools.

Requested by:	many
Tested by:	sbruno
MFC after:	12 days
2013-08-23 14:43:32 +00:00
Andriy Gapon
17a9f2d4db fbt: drop a local write-only variable
Discovered with:	gcc46
MFC after:	4 days
2013-08-23 14:41:27 +00:00
Davide Italiano
286026fc85 Fix the build and fix style.
Pointy-hat to:	davide
2013-08-23 14:40:17 +00:00
Andriy Gapon
05869c0ea7 zfs: inline and remove zfs_vnode_lock
It didn't serve any useful purpose, but obscured file and line information
useful for debugging.

MFC after:	5 days
X-MFC with:	r254445
2013-08-23 14:40:09 +00:00
Davide Italiano
ad0947c3a4 - Bump date.
- Small mdoc fix.

Submitted by:	pluknet
2013-08-23 14:33:56 +00:00
Ed Maste
a741a747e6 Add libexecinfo Makefile
Sponsored by:	DARPA, AFRL
2013-08-23 14:31:05 +00:00
Jilles Tjoelker
442542b86c libc: Access some unexported variables more efficiently (related to stdio). 2013-08-23 14:23:54 +00:00