Commit Graph

198236 Commits

Author SHA1 Message Date
Baptiste Daroussin
7426d57242 Merge from head 2015-03-15 10:58:47 +00:00
Alexander Motin
7e8e553940 Block delete capability for read-only devices.
Submitted by:	neel
MFC after:	2 weeks
2015-03-15 08:09:56 +00:00
Ian Lepore
e5197e3a08 Add a nulterm byte to the returned sysctl string.
PR:		195668
2015-03-15 00:39:18 +00:00
Ian Lepore
657282e062 Include the nulterm byte in the sysctl string.
PR:		195668
2015-03-15 00:36:08 +00:00
Ian Lepore
dcdeb95f09 Go back to using sbuf_new() with a preallocated large buffer, to avoid
triggering an sbuf auto-drain copyout while holding a lock.

Pointed out by:	   jhb
Pointy hat: 	   ian
2015-03-14 23:57:33 +00:00
Ian Lepore
2a6a72f113 Use sbuf_printf() for sysctl strings instead of static buffers and snprintf. 2015-03-14 23:30:03 +00:00
Ian Lepore
91d9eda200 Use sbuf_printf() for sysctl strings instead of stack buffers and snprintf(). 2015-03-14 23:16:12 +00:00
Ian Lepore
6ec9891291 Use sysctl_handle_string() and the sbuf printf routines instead of large
stack-allocated buffers and snprintf().

PR:		195668
2015-03-14 22:32:15 +00:00
Ian Lepore
6ef6968de5 Use SYSCTL_OUT_STR() to return strings.
PR:		195668
2015-03-14 21:41:00 +00:00
Ian Lepore
c38c26f8da Use SYSCTL_OUT_STR() to return strings.
PR:		195668
2015-03-14 21:40:51 +00:00
Ian Lepore
8ddeeebf4b Use SYSCTL_OUT_STR() to return strings.
PR:		195668
2015-03-14 21:40:33 +00:00
Ian Lepore
d711ee2c29 Use SYSCTL_OUT_STR() to return strings.
PR:		195668
2015-03-14 21:40:24 +00:00
Ian Lepore
acfc962f82 Use SYSCTL_OUT_STR() to return strings.
PR:		195668
2015-03-14 21:40:01 +00:00
Ian Lepore
8a0d2c613b Define a convenience macro, SYSCTL_OUT_STR() for handling strings the
standard way (including the nulterm byte in the data returned to userland).

This augments the existing sysctl_handle_string() in that this can be used
with const strings without ugly inappropriate casting.
2015-03-14 21:38:51 +00:00
Alexander Motin
79565afed8 Give block I/O interface multiple (8) execution threads.
On parallel random I/O this allows better utilize wide storage pools.
To not confuse prefetcher on linear I/O, consecutive requests are executed
sequentially, following the same logic as was earlier implemented in CTL.

Benchmarks of virtual AHCI disk, backed by ZVOL on RAID10 pool of 4 HDDs,
show ~3.5 times random read performance improvements, while no degradation
on linear I/O.

MFC after:	2 weeks
2015-03-14 21:15:45 +00:00
Ian Lepore
b773372938 Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl
string returned to userland is nulterminated.

PR:           195668
2015-03-14 18:46:33 +00:00
Ian Lepore
b97fa22cd6 Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl
string returned to userland is nulterminated.

PR:           195668
2015-03-14 18:42:30 +00:00
Ian Lepore
751ccc429d Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl
string returned to userland is nulterminated.

PR:		195668
2015-03-14 18:11:24 +00:00
Steven Hartland
208264283d Allow zvol_geom_worker to process BIO_DELETE's
If zvol_geom_start is called with a BIO_DELETE from a thread which can
sleep it queues it for later processing by the zvol_geom_worker. The
zvol_geom_worker didn't have a delete case so would simply loose the bio
hence preventing the original caller from every completing. In addition
an other unknown types would suffer the same fate.

Allow zvol_geom_worker to process BIO_DELETE's via zvol_strategy and
return unsupported for all unknown bio types.

MFC after:	2 weeks
Sponsored by:	Multiplay
2015-03-14 17:35:04 +00:00
Dimitry Andric
6be291e47a Amend r277940, by also disabling -Wcast-qual warnings for a few specific
aesni files on i386.
2015-03-14 17:19:48 +00:00
Ian Lepore
1eafc07856 Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl
strings returned to userland include the nulterm byte.

Some uses of sbuf_new_for_sysctl() write binary data rather than strings;
clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in
those cases.  (Note that the sbuf code still automatically adds a nulterm
byte in sbuf_finish(), but since it's not included in the length it won't
get copied to userland along with the binary data.)

Remove explicit adding of a nulterm byte in a couple places now that it
gets done automatically by the sbuf drain code.

PR:		195668
2015-03-14 17:08:28 +00:00
Ian Lepore
f4d281428f Add a new flag, SBUF_INCLUDENUL, and new get/set/clear functions for flags.
The SBUF_INCLUDENUL flag causes the nulterm byte at the end of the string
to be counted in the length of the data.  If copying the data using the
sbuf_data() and sbuf_len() functions, or if writing it automatically with
a drain function, the net effect is that the nulterm byte is copied along
with the rest of the data.
2015-03-14 16:02:11 +00:00
Alexander Motin
df57ec4933 Add checksums to identify data and NCQ command error log.
MFC after:	2 weeks
2015-03-14 14:06:37 +00:00
Jilles Tjoelker
59966d51c6 restore: Preserve timestamps to the nanosecond.
The restore utility already knows the full-resolution timestamps, so the
only thing to do is to stop converting the timespecs to timevals and use
futimens() and utimensat().

Differential Revision:	https://reviews.freebsd.org/D2020
Reviewed by:	jhb
2015-03-14 13:45:43 +00:00
Ian Lepore
b36424bd4b Revert r279934, r279938; this is going to be fixed in sbuf instead.
PR:		195668
2015-03-14 13:04:39 +00:00
Ian Lepore
59daf5b0ce Revert r279933; this is going to be fixed in sbuf instead.
PR:		195668
2015-03-14 13:02:08 +00:00
Ian Lepore
ed9dd64b8c Revert r279932; this is going to be fixed in the sbuf code instead.
PR:		195668
2015-03-14 13:00:37 +00:00
Dimitry Andric
25e141edd2 Pull in r231965 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Refactor float to integer conversion to share the same code.
  80bit Intel/PPC long double is excluded due to lacking support
  for the abstraction. Consistently provide saturation logic.
  Extend to long double on 128bit IEEE extended platforms.

  Initial patch with test cases from GuanHong Liu.
  Reviewed by Steve Canon.

  Differential Revision: http://reviews.llvm.org/D2804

Pull in r232107 from upstream compiler-rt trunk (by Ed Maste):

  Use signed int implementation for __fixint

Requested by:	emaste
2015-03-14 12:40:19 +00:00
Dimitry Andric
cee9be4971 Allow relative pathnames in SRCS, so as to enable building software
which includes more than one file with the same name, in different
directories.

For example, setting:

SRCS+=	foo/foo.c bar/foo.c baz/foo.c

will now create separate objdirs 'foo', 'bar' and 'baz' for each of the
sources in the list, and use those objdirs for the corresponding object
files.

Reviewed by:	brooks, imp
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D1984
2015-03-14 12:29:44 +00:00
Alexander Motin
b441dabf7e Slightly polish virtual AHCI CD reporting.
MFC after:	2 weeks
2015-03-14 12:18:26 +00:00
Alexander Motin
fb329df8e4 Fix NOP and IDLE commands for virtual AHCI disks.
MFC after:	2 weeks
2015-03-14 10:38:25 +00:00
Alexander Motin
1fcb801948 Add support for NCQ variant of DSM TRIM for virtual AHCI disks.
The code is not really tested yet due to lack of initiator support.

Requested by:	imp
MFC after:	2 weeks
2015-03-14 09:46:43 +00:00
Alexander Motin
9009f43407 Improve NCQ errors reporting for virtual AHCI disks.
While this implementation is still not perfect, previous was just broken.

MFC after:	2 weeks
2015-03-14 08:45:54 +00:00
Adrian Chadd
af1357897d Compile some modules - I'm going to eventually just compile all the
modules, but these are a subset of things that are worth playing with
in deployed APs.

(ipfw in particular is rather nice.)
2015-03-14 08:29:03 +00:00
Adrian Chadd
22aeed02bf Add board support for the TP-Link TL-WR1043nd v2.
This is a QCA9558 based design with on-chip 2GHz 3x3 11n wifi,
AR8327N switch, 64MB RAM and 8MB flash.

Of course, it runs FreeBSD.
2015-03-14 07:59:54 +00:00
Neel Natu
18a2b08e65 Use lapic_ipi_alloc() to dynamically allocate IPI slots needed by bhyve when
vmm.ko is loaded.

Also relocate the 'justreturn' IPI handler to be alongside all other handlers.

Requested by:	kib
2015-03-14 02:32:08 +00:00
Neel Natu
8958d18cb3 Add x86 specific APIs 'lapic_ipi_alloc()' and 'lapic_ipi_free()' to allow IPI
vectors to be dynamically allocated. This allows kernel modules like vmm.ko
to allocate unique IPI slots when loaded (as opposed to hard allocating one
or more vectors).

Also, reorganize the fixed IPI vectors to create a contiguous space for
dynamic IPI allocation.

Reviewed by:	kib, jhb
Differential Revision:	https://reviews.freebsd.org/D2042
2015-03-14 00:30:41 +00:00
Navdeep Parhar
070d262707 cxgbe(4): fix if_media handling for T520-BT cards. 1Gbps and 100Mbps
are valid for this card.

MFC after:	1 week
2015-03-14 00:02:53 +00:00
Alexander Motin
dcd0c998a9 Remove incorrect SERR register setting.
At this point we have nothing to report through that register.

MFC after:	2 weeks
2015-03-13 21:01:25 +00:00
Alexander Motin
9463f47b3a Change prdbc value reporting.
MFC after:	2 weeks
2015-03-13 20:56:17 +00:00
Edward Tomasz Napierala
a52c3ec43c Mark xo_err(3), xo_errx(3), and xo_errc(3) as __dead2.
Differential Revision:	https://reviews.freebsd.org/D2059
Reviewed by:	marcel@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 20:14:55 +00:00
Alexander Motin
295e61d6a3 Polish AHCI disk identify data and fix speed negotiation.
MFC after:	2 weeks
2015-03-13 20:14:35 +00:00
Alexander Motin
c21b342b8e Fix SATA Gen3 speed constants.
MFC after:	1 week
2015-03-13 20:08:35 +00:00
Pedro F. Giffuni
cf0f0b800c libc: plug memory leaks in edge cases for the posix1e code.
CID:	1016705
CID:	1016706
CID:	1016707

Differential Revision:	https://reviews.freebsd.org/D2023
2015-03-13 18:42:43 +00:00
Alexander Motin
5f6b63de7a Add support for PIO variants of READ/WRITE commands for AHCI disks.
AHCI API hides all PIO specifics, so this functionality is almost free.

MFC after:	2 weeks
2015-03-13 18:35:38 +00:00
Alexander Motin
f7c5bc2cfe Use ahci_write_fis_d2h() for commands completion.
MFC after:	2 weeks
2015-03-13 18:04:07 +00:00
Alexander Motin
0b9d25c935 Add DSM TRIM command support for virtual AHCI disks.
It works only for virtual disks backed by ZVOLs and raw devices supporting
BIO_DELETE.  Virtual disks backed by files won't report this capability.

MFC after:	2 weeks
Relnotes:	yes
2015-03-13 16:43:52 +00:00
Andrey V. Elsukov
dc9fa19b3b Properly initialize scope zone id when next hop address stored
directly in the O_FORWARD_IP6 opcode. Use getnameinfo(3) to formatting
the IPv6 addresses of such opcodes.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2015-03-13 13:46:50 +00:00
Edward Tomasz Napierala
286c4906d6 Add -noauto autofs map, for automatic handling of fstab entries
marked "noauto".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:44:46 +00:00
Edward Tomasz Napierala
52df29e6a5 Get executable direct maps to work.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:27:59 +00:00