Commit Graph

101073 Commits

Author SHA1 Message Date
bryanv
137a650c11 MFC r272796:
Add M_FLOWID to M_COPYFLAGS

The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.
2014-10-22 04:01:27 +00:00
gjb
628635adcd Bump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
SA-14:23

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-10-21 21:37:53 +00:00
gjb
9ec3090c92 MFC r273402:
Fix an issue where a FreeBSD virtual machine provisioned in
  the Microsoft Azure service does not recognize the second
  attached disk on the system.

PR:		194376
Insta-MFC OK:	re (rodrigc)
Sponsored by:	The FreeBSD Foundation
2014-10-21 21:27:13 +00:00
delphij
86df2c268f Fix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]
Fix memory leak in sandboxed namei lookup. [SA-14:22]
2014-10-21 20:20:07 +00:00
brueffer
7fce188e08 MFC: r273034
Add one more AMD Kaveri APU device ID.

Submitted by:	Remy Nonnenmacher <remy.nonnenmacher@activnetworks.com>
2014-10-21 13:07:36 +00:00
hselasky
2e713a4fa0 MFC r272683:
- Fix compile warning when compiling with GCC.
- Add missed chunk in previous driver code MFC.

Sponsored by:	Mellanox Technologies
2014-10-21 08:24:12 +00:00
yongari
7595869074 MFC r272730,273018:
Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
  These controllers seem to have the same feature of AR813x/AR815x and
  improved RSS support(4 TX queues and 8 RX queues).  alc(4) supports
  all hardware features except RSS.  I didn't implement RX checksum
  offloading for AR816x/AR817x just because I couldn't get
  confirmation from the Vendor whether AR816x/AR817x corrected its
  predecessor's RX checksum offloading bug on fragmented packets.
  This change adds supports for the following controllers.
   o AR8161 PCIe Gigabit Ethernet controller
   o AR8162 PCIe Fast Ethernet controller
   o AR8171 PCIe Gigabit Ethernet controller
   o AR8172 PCIe Fast Ethernet controller
   o Killer E2200 Gigabit Ethernet controller

  Relnotes:	yes
2014-10-21 04:48:49 +00:00
yongari
b882f9e15f MFC r272729,272732:
Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
  QAC AR816x/E2200 controller has a silicon bug that MSI interrupt
  does not assert if PCIM_CMD_INTxDIS bit of command register is set.
2014-10-21 01:48:19 +00:00
yongari
b037cdf3ed MFC r272721:
Fix a long standing bug in MAC statistics register access.  One
  additional register was erroneously added in the MAC register set
  such that 7 TX statistics counters were wrong.
2014-10-21 01:14:56 +00:00
delphij
b12ccdd7ac MFC r272601: MFV r272591:
Use loaned ARC buffer for zfs receive to avoid copy.

Illumos issue:
    5162 zfs recv should use loaned arc buffer to avoid copy
2014-10-20 22:22:39 +00:00
delphij
e02ec23db8 MFC r272598: MFV r272585:
Split the godfather zio into CPU number's to reduce lock
contention.

Illumos issue:
    5176 lock contention on godfather zio
2014-10-20 22:13:50 +00:00
delphij
6bc23f0b46 MFC r272584: MFV r272501:
Illumos issue:
    5177 remove dead code from dsl_scan.c
2014-10-20 22:09:30 +00:00
delphij
5e5e0768f2 MFC r272511: MFV r272499:
Illumos issue:
    5174 add sdt probe for blocked read in dbuf_read()
2014-10-20 22:04:49 +00:00
delphij
cc4935ee8d MFC r272510: MFV r272498:
Add a new sysctl, vfs.zfs.vol.unmap_enabled, which allows the system
administrator to toggle whether ZFS should ignore UNMAP requests.

Illumos issue:
    5149 zvols need a way to ignore DKIOCFREE
2014-10-20 21:59:11 +00:00
delphij
ac9149e73f MFC r272507: MFV r272496:
Add tunable for number of metaslabs per vdev
(vfs.zfs.vdev.metaslabs_per_vdev).  The default remains
at 200.

Illumos issue:
    5161 add tunable for number of metaslabs per vdev
2014-10-20 21:53:51 +00:00
delphij
c02aa9ff18 MFC r272504: MFV r272494:
Make space_map_truncate() always do space_map_reallocate().  Without
this, setting space_map_max_blksz would cause panic for existing pool,
as dmu_objset_set_blocksize would fail if the object have multiple blocks.

Illumos issues:
   5164 space_map_max_blksz causes panic, does not work
   5165 zdb fails assertion when run on pool with recently-enabled
	spacemap_histogram feature
2014-10-20 18:58:45 +00:00
mav
173113fe4e MFC r273072: Add LBPERE mode bit definition. 2014-10-20 08:09:36 +00:00
mav
ad16b79ee7 MFC r273046:
Don't confuse frontend with zero length data moves, just return immediately.
2014-10-20 08:08:43 +00:00
mav
7cb7c8f153 MFC r273038: 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.
2014-10-20 08:07:29 +00:00
mav
9281ac4831 MFC r273029:
Report physical block size for file-backed LUNs, using vattr.va_blocksize.
2014-10-20 08:06:17 +00:00
mav
d6db3716e1 MFC r273008: Remove stale comments. 2014-10-20 08:04:46 +00:00
mav
d8647fe277 MFC r272978: Improve and document ctladm portlist subcommand.
Make this subcommand less FC-specific, reporting target and port addresses
in more generic way.  Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.
2014-10-20 08:03:23 +00:00
mav
deb98691d8 MFC r272947: Give physical and virtual ports numbers some more meaning. 2014-10-20 07:59:29 +00:00
mav
d9f8df105f MFC r272939: Shorten frontend name. 2014-10-20 07:58:01 +00:00
mav
e2ad56a41d MFC r272938: Filter out duplicate AC_PATH_REGISTERED async events.
Queued async events handling in CAM opened race, that may lead to duplicate
AC_PATH_REGISTERED events delivery during boot.  That was not happening
before r272935 because the driver was initialized later.  After that change
it started create duplicate ports in CTL.
2014-10-20 07:57:07 +00:00
mav
a0796a04ee MFC r272935: Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.
Target mode operation does not depend on the initiator mode scan process.
This change allows the target driver to attach earlier and receive some
async events (like AC_CONTRACT) that could be lost otherwise.
2014-10-20 07:52:48 +00:00
mav
b61a1b5706 MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands.  If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.
2014-10-20 07:41:37 +00:00
mav
db78e6d004 MFC r272893:
Store persistent reservation keys as uint64_t instead of uint8_t[8].

This allows to simplify the code and save 512KB of RAM per LUN (8%)
by removing no longer needed "registered" keys flags.
2014-10-20 07:38:36 +00:00
mav
5889805f1c MFC r272812: Make iSCSI connection close somewhat less aggressive.
It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.
2014-10-20 07:35:46 +00:00
mav
cc6cca3f1e MFC r272748:
Implement software (mode page) and hardware (config) write protection.
2014-10-20 07:34:37 +00:00
mav
29253fce18 MFC r272734:
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.
2014-10-20 07:33:41 +00:00
mav
f7c3270824 MFC r272613:
Add support for MaxBurstLength and Expected Data transfer Length parameters.

Before this change target could send R2T request for write transfer of any
size, that could violate iSCSI RFC, which allows initiator to limit maximum
R2T size by negotiating MaxBurstLength connection parameter.

Also report an error in case of write underflow, when initiator provides
less data than initiator expects.  Previously in such case our target
sent R2T request for non-existing data, violating the RFC, and confusing
some initiators.  SCSI specs don't explicitly define how write underflows
should be handled and there are different oppinions, but reporting error
is hopefully better then violating iSCSI RFC with unpredictable results.
2014-10-20 07:32:33 +00:00
mav
5b5dd1452a MFC r272597: Fix length of Extended INQUIRY Data VPD page. 2014-10-20 07:31:23 +00:00
mav
df2c4c17fc MFC r271718 (by bdrewery): Correct a comment 2014-10-20 07:29:43 +00:00
mav
072d9b12ca MFC r271395 (by trasz):
Make sure we handle less than zero timeouts in iSCSI initiator and target
in a reasonable way.

Sponsored by:	The FreeBSD Foundation
2014-10-20 07:28:18 +00:00
yongari
7aaab4b0ed MFC r271073:
Do not blindly announce 1000baseT half-duplex capability in
  autonegotiation.  Some controllers like cgem(4) do not support
  half-duplex at gigabit speeds.
2014-10-20 07:25:57 +00:00
rpaulo
1a4e934f15 MFC r271975:
Improvements to asmc(4):

 1. changed the code so that 2**16 keys are supported
 2. changed the number of possible fans in a system from 2 to 6
 3. added write support for some fan sysctls
 4. added a new sysctl which shows the ID of the fan
 5. added four more apple models with their temperature keys
 6. changed the maxnumber of temperature keys from 36 to 80
 7. replaced several fixed buf sizes to sizeof buf

 Obtained from:	     Denis Ahrens denis at h3q.com
2014-10-20 04:42:28 +00:00
emaste
ae8c60e6aa MFC r273219: Do nothing in vt_upgrade if there is no vt driver
Previously, if no drivers attached at boot we would panic with
  "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0".

PR:		192248
2014-10-20 01:01:55 +00:00
tuexen
84b9f624de MFC 273168:
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.
2014-10-19 11:31:23 +00:00
mav
7f2e56c17d MFC r273143: 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.
2014-10-19 08:47:27 +00:00
pfg
f2b9523abe MFC r272958, r273006:
ddb: space/tab fixes and ANSI-fy function declarations.

No functional change.
2014-10-18 19:22:59 +00:00
kib
fafa0f4166 MFC r272952:
Do not set IN_ACCESS flag for read-only mounts.
2014-10-18 15:31:53 +00:00
kib
08803fec5e MFC r272534:
Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
not locked, but range is.
2014-10-18 15:28:01 +00:00
hselasky
09684679cf MFC r273135:
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.

Sponsored by:	Mellanox Technologies
2014-10-18 07:07:34 +00:00
adrian
31d0e366f3 MFC r273112: 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-18 01:02:30 +00:00
jhb
c8f54eb474 MFC 272449:
Require p_cansched() for changing a process' protection status via
procctl() rather than p_cansee().
2014-10-17 19:28:21 +00:00
jhb
b183e8b3c4 MFC 272182:
Don't panic if a resource is allocated twice.  Instead, print a warning and
fail the allocation request.  Allocations of "reserved" resources such as
PCI BARs already fail the request instead of panic'ing in this case.
2014-10-17 15:29:47 +00:00
delphij
4b803d9674 MFC r272583: MFV r272500:
Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
clone that is marked for deferred destroy, which causes snapshots of the
clone being destroyed when getting a hold or clone.

Illumos issue:
    5150 zfs clone of a defer_destroy snapshot causes strangeness
2014-10-16 22:44:30 +00:00
delphij
0615551739 MFC r272527:
Don't make nested definition for range_seg_cache.

Reported by:	ian
2014-10-16 22:40:22 +00:00
delphij
6fe321f152 MFC r272506: MFV r272495:
In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in
response of memory pressure.

Illumos issue:
    5163 arc should reap range_seg_cache
2014-10-16 22:33:09 +00:00