Commit Graph

100575 Commits

Author SHA1 Message Date
Warner Losh
a5928b20d5 fwsectors and fwheads used to be somehwat arbitrary. However, they are
used to align partitions in gpart. We also try to align partitions by
stripe size when creating new media. Align these two concepts by
making fwsectors the same as the stripe size. Select a sensible number
of heads so we wind up with about 20 cylinders. This number was
selected to keep the rounding effects to a few percent while keeping
the number of cylinder groups low.

Sadly, it is not possible to make these numbers match the numbers used
by SD card readers. There apperas to be much variation between brands
so there's no one universal number. These numbers are also not aligned
to the stripe size, so some performance problems may still be present
when SD cards are created this way.

Also, these numbers will differ from the far less common SD to ATA
adapters, which present a different, but more uniform, set of numbers
that also happened to match the old defaults.

Nothing should change for current users. Any suboptimal performance
caused by misalignment will still be there. gpart will honor the
partitions that aren't on proper boudnaries, but editing the partition
tables may result in different alignments being used than before when
editing things natively.

Ideally, there'd be some way to override these values in the disk
subsystem by the user for the USB adapter use case where all "native"
notions of geometry disappear. This does not implement that.
2014-10-16 19:52:12 +00:00
Davide Italiano
2be111bf7d Follow up to r225617. In order to maximize the re-usability of kernel code
in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv().
This fixes a namespace collision with libc symbols.

Submitted by:   kmacy
Tested by:      make universe
2014-10-16 18:04:43 +00:00
Michael Tuexen
84f3b49ac9 Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
sent incoming stream reset request was responded with failed
or denied.
Thanks to Peter Bostroem from Google for reporting the issue.

MFC after: 3 days
2014-10-16 15:36:04 +00:00
Mateusz Guzik
8f889ce7c8 Use lockless quota checks in qsync and qsyncvp.
No strong objections from: kib, mckusick
MFC after:	1 week
2014-10-16 12:41:14 +00:00
Edward Tomasz Napierala
6cc1e267f3 When removing an iSCSI session, check whether all conditions match,
not if any of them matches.  This fixes "iscsictl -Rn" removing
unrelated sessions.

PR:		194034
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-16 09:09:43 +00:00
Alexander Motin
218d5d4be2 Implement more functional CTL debug logging.
Setting bits in kern.cam.ctl.debug allows to log errors, commands and some
commands data respectively.

MFC after:	1 week
2014-10-16 08:42:17 +00:00
Marcelo Araujo
3dd6b7ff3d Add two sysctl(8) to enable/disable NFSv4 server to check when setting
user nobody and/or setting group nogroup as owner of a file or directory.
Usually at the client side, if there is an username that is not in the
client's passwd database, some clients will send 'nobody@<your.dns.domain>'
in the wire and the NFSv4 server will treat it as an ERROR.
However, if you have a valid user nobody in your passwd database,
the NFSv4 server will treat it as a NFSERR_BADOWNER as its believes the
client doesn't has the username mapped.

Submitted by:	Loic Blot <loic.blot@unix-experience.fr>
Reviewed by:	rmacklem
Approved by:	rmacklem
MFC after:	2 weeks
2014-10-16 02:24:19 +00:00
Steven Hartland
ca6505b818 Prevent ZFS leaking pool free space
When processing async destroys ZFS would leak space every txg timeout
(5 seconds by default), if no writes occurred, until the pool is totally
full. At this point it would be unfixable without a pool recreation.

In addition if the machine was rebooted with the pool in this situation
would fail to import on boot, hanging indefinitely, as the import process
requires the ability to write data to the pool. Any attempts to query the
pool status during the hung import would not return as the import holds
the pool lock.

The only way to import such a pool would be to specify -o readonly=on
to the zpool import.

zdb -bb <pool> can be used to check for "deferred free" size which is where
this lost space will be counted.

MFC after:	3 days
Sponsored by:	Multiplay
2014-10-16 02:23:27 +00:00
Rui Paulo
bbcf1f62b6 Remove the "Unable to unwind further" message from DDB.
The ARM version of DDB is supposedly reliable enough making this
message benign.
2014-10-16 01:48:39 +00:00
Justin Hibbits
e9152038d3 Move the adm1030 driver to the proper location, and rename it.
For compatibility, 'device windtunnel' is still supported, but one should use
'device adm1030' instead, and this has been updated in GENERIC and NOTES.
2014-10-16 01:32:22 +00:00
Alexander Motin
99b9076c21 Remove setting BIO_DONE flag for BIOs that have done() method.
This fixes use-after-free, caused by geom_disk, completing same BIO twice
to save extra allocation, and getting BIO_DONE set after the first.

MFC after:	1 week
2014-10-15 18:36:34 +00:00
Jens Schweikhardt
632d4e706a Correct grammos.
MFC after:	3 weeks
2014-10-15 17:55:10 +00:00
Hans Petter Selasky
2c6eb461a7 Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):

- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
  cancelling and starting a timeout.
- Implement more Linux scatterlist
  functions.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-10-15 13:40:29 +00:00
Konstantin Belousov
e511f63a04 Style changes for deadfs:
- ANSIfy VOPs.
- Remove trivial comments.
- Remove ARGSUSED.
- Remove copies of the vop_XXX_args structure definitions in comments.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-15 13:22:33 +00:00
Konstantin Belousov
f12aa60c62 When vnode bypass cannot be performed on the cdev file descriptor for
read/write/poll/ioctl, call standard vnode filedescriptor fop.  This
restores the special handling for terminals by calling the deadfs VOP,
instead of always returning ENXIO for destroyed devices or revoked
terminals.

Since destroyed (and not revoked) device would use devfs_specops VOP
vector, make dead_read/write/poll non-static and fill VOP table with
pointers to the functions, to instead of VOP_PANIC.

Noted and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-15 13:16:51 +00:00
Konstantin Belousov
dd0218f2bd Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller
is interested in i/o state.  Return POLLNVAL for invalid bits, similar
to poll_no_poll().  Note that POLLOUT must not be returned, since
POLLHUP is set.

Noted and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-15 13:08:53 +00:00
Konstantin Belousov
f821fad417 Implement FIODTYPE for master ptys.
Requested and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-15 12:38:26 +00:00
Edward Tomasz Napierala
4cdc52bdef Make automountd(8) inform autofs(4) whether directory being handled can
have wildcards.  This makes it possible for autofs(4) to avoid requesting
automountd(8) action on access to nonexistent nodes - unless wildcards
are actually used.

Note that this change breaks ABI for automountd(8).

Tested by:	dhw@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-15 09:28:45 +00:00
Andrey V. Elsukov
ae3fa78b9b Add inet/inet6 to the dependency list. Without them if_gif is useless.
MFC after:	1 month
2014-10-15 06:10:33 +00:00
Mateusz Guzik
32e7f8e4d5 Don't take devmtx unnecessarily in vn_isdisk.
MFC after:	1 week
2014-10-15 05:17:36 +00:00
Justin Hibbits
3cd55688ba Add a sysctl to allow disabling the monitoring thread.
Summary:
If a user uses powerd, or doesn't want to use the cycles monitoring, they can
now suspend the monitoring thread.

While here, reorganize the added prototypes to match existing groupings.

Reviewers: nwhitehorn, #powerpc, rpaulo

Reviewed By: #powerpc, rpaulo

Differential Revision: https://reviews.freebsd.org/D944
X-MFC-with:	r273009

MFC after:	3 weeks
2014-10-15 02:31:14 +00:00
Adrian Chadd
bba61d1a89 Set the DROP_EN bit before the RX queue is brought up and active.
He noticed issues setting this bit in SRRCTL after the queue was up,
so doing it from the sysctl handler isn't enough and may not actually
work correctly.

This commit doesn't remove the sysctl path or try to change its
behaviour.  I'll talk with others about how to finish fixing that
before I tackle that.

PR:		kern/194311
Submitted by:	luigi
MFC after:	3 days
Sponsored by:	Norse Corp, Inc
2014-10-15 01:22:56 +00:00
Mateusz Guzik
55056be254 filedesc: plug 2 assignments to M_ZERO-ed pointers in falloc_noinstall
No functional changes.
2014-10-15 01:16:11 +00:00
Neel Natu
d63e02ea96 Emulate "POP r/m".
This is needed to boot OpenBSD/i386 MP kernel in bhyve.

Reported by:	grehan
MFC after:	1 week
2014-10-14 21:02:33 +00:00
Andrey V. Elsukov
7f4b9af631 opt_mrouting.h isn't needed anymore.
MFC after:	1 month
2014-10-14 14:52:39 +00:00
Andrey V. Elsukov
245c40e879 Add more ifdefs. SIOC*_IN6 are defined only with INET6.
MFC after:	1 month
Reported  by:	bz
2014-10-14 14:51:27 +00:00
Andrey V. Elsukov
138d56556c Move memset under ifdef INET6.
MFH:		1 month
Reported by:	bz
2014-10-14 14:41:06 +00:00
Andrew Turner
917256cd36 Uncomment general options from the Pandaboard config. These are in other
configs and there is no reason for them not to be here.
2014-10-14 14:32:58 +00:00
Andrey V. Elsukov
0b9f5f8a5f Overhaul if_gif(4):
o convert to if_transmit;
 o use rmlock to protect access to gif_softc;
 o use sx lock to protect from concurrent ioctls;
 o remove a lot of unneeded and duplicated code;
 o remove cached route support (it won't work with concurrent io);
 o style fixes.

Reviewed by:	melifaro
Obtained from:	Yandex LLC
MFC after:	1 month
Sponsored by:	Yandex LLC
2014-10-14 13:31:47 +00:00
Andrew Turner
f7b9150ee9 Make the ti_padstate_devmap arrays ststic, they are only used with the
file where they are defined.
2014-10-14 13:24:25 +00:00
Alexander Motin
9a0190c9a1 Remove couple Copan's vendor-specific mode pages.
Those pages are highly system-/hardware-specific, the code is incomplete,
and so they hardly can be useful for anybody else.
2014-10-14 11:28:25 +00:00
Alexander Motin
523f047ea2 Some groundwork for later Informational Exceptions support.
This includes support for:
 - Read-Write Error Recovery mode page;
 - Informational Exceptions Control mode page;
 - Logical Block Provisioning mode page;
 - LOG SENSE command.

No real Informational Exceptions features yet. This is only a placeholder.

Sponsored by:	iXsystems, Inc.
2014-10-14 10:14:14 +00:00
Alexander Motin
ec05088b9c Add LBPERE mode bit definition. 2014-10-14 08:30:02 +00:00
Sean Bruno
882ac53ed7 Handle small file case with regards to plpmtud blackhole detection.
Submitted by:	Mikhail <mp@lenta.ru>
MFC after:	2 weeks
Relnotes:	yes
2014-10-13 21:06:21 +00:00
Sean Bruno
0f3e3bc526 Catch ipv6 case when attempting to do PLPMTUD blackhole detection.
Submitted by:	Mikhail <mp@lenta.ru>
MFC after:	2 weeks
Relnotes:	yes
2014-10-13 21:05:29 +00:00
Xin LI
ba6e85e0cf Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.

Obtained from:	FreeNAS (issue #6239)
MFC after:	2 weeks
2014-10-13 20:39:51 +00:00
Sean Bruno
7d25e50fdf Repair build of tools/ath/athalq and define missing value len.
Reviewed by:	adrian
2014-10-13 16:48:01 +00:00
Andrew Turner
6e97fd7dbf Move the sdhci option to files.ti, it's common to both SoCs. 2014-10-13 16:40:40 +00:00
Andrew Turner
623b63e761 Use a switch on ti_chip() to find which SoC we are on. This allow us t
only enable support for the SoCs we are built for.
2014-10-13 16:33:08 +00:00
Warner Losh
756906b40e Use the C99 flexible array construct to denote a variable amount of
data rather than the old-school [1] construct. We have required c99
compilers for some time.
2014-10-13 16:23:58 +00:00
Warner Losh
5df0ffc762 class, subclass and progif were never used, so don't bother setting
them.
2014-10-13 16:23:51 +00:00
Andrew Turner
88e1e17451 Remove ti_mmchs.c, it has been replaced by ti_sdhci.c. 2014-10-13 16:20:04 +00:00
Andrew Turner
56f4208d56 Remove the need for files.beaglebone and std.beaglebone by moving the one
option they defined into files.am335x.
2014-10-13 16:16:32 +00:00
Alexander Motin
09020352fe Don't confuse frontend with zero length data moves, just return immediately.
MFC after:	1 week
2014-10-13 16:15:32 +00:00
Andrew Turner
b0d1c7102e Sort the files in the am355x directory. 2014-10-13 16:12:28 +00:00
Andrew Turner
56d8b96cbc Start removing the omap3 support. In base it was only ever a header and a
few changes to drivers, no kernel config was added. As the SoCs are quite
old and the code is unmaintained start the process of removing support by
deleting the header file and code that depends on it along with the macro
SOC_OMAP3. Other Ti SoCs shouldn't be affected, other than for us to have
less code to maintain.

Differential Revision:	https://reviews.freebsd.org/D936
Reviewed by:	rpaulo, loos
2014-10-13 15:35:08 +00:00
Kashyap D Desai
f5fb223710 Fix for build issue on i386.xen and amd64.xen.
This is a duplicate variable reference in mrsas, so now this patch isolate atomic_ variable and relavent
function call using prefix mrsas_xx.

Issue was introduced in r272737.

MFC after:	2 weeks
Sponsored by:	Avago Technology
2014-10-13 15:33:27 +00:00
Alexander Motin
d70698b372 Add support for READ DEFECT DATA (10/12) commands.
SPC-4 r2 allows to return empty defect list if the list is not supported.
We don't reallu support defect data lists, but this suppresses some errors.

MFC after:	1 week
2014-10-13 14:48:49 +00:00
Alexander V. Chernikov
2930362fb1 Fix matching default rule on clear/show commands.
Found by:	Oleg Ginzburg
2014-10-13 13:49:28 +00:00
Christian Brueffer
9bfafa1055 Add one more AMD Kaveri APU device ID.
Submitted by:	Remy Nonnenmacher <remy.nonnenmacher@activnetworks.com>
MFC after:	1 week
2014-10-13 13:13:42 +00:00