aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add to CTL initial support for CDROMs and removable devices.Alexander Motin2015-09-277-131/+699
| | | | | | | Relnotes: yes Notes: svn path=/head/; revision=288310
* Fix what looks like a consistent copy&paste error.Bjoern A. Zeeb2015-09-272-2/+2
| | | | | | | | | | | Don't make an integer to a boolean and then compare to a value which needs an integer comparison. Spotted by: reading kernel compile time log MFC after: 2 weeks Notes: svn path=/head/; revision=288308
* Compare the correct variable to see if memory allocation succeeded.Bjoern A. Zeeb2015-09-271-1/+1
| | | | | | | | | | I don't even want to know where the symbol "version" comes from. Spotted by: reading kernel compile time log MFC after: 2 weeks Notes: svn path=/head/; revision=288307
* Enable parallel subdirectory building with sys/modules/netgraphEnji Cooper2015-09-271-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=288304
* Eliminate nd6_nud_hint() and its TCP bindings.Alexander V. Chernikov2015-09-278-78/+4
| | | | | | | | | | | | | | | | | Initially function was introduced in r53541 (KAME initial commit) to "provide hints from upper layer protocols that indicate a connection is making "forward progress"" (quote from RFC 2461 7.3.1 Reachability Confirmation). However, it was converted to do nothing (e.g. just return) in r122922 (tcp_hostcache implementation) back in 2003. Some defines were moved to tcp_var.h in r169541. Then, it was broken (for non-corner cases) by r186119 (L2<>L3 split) in 2008 (NULL ifp in nd6_lookup). So, right now this code is broken and has no "real" base users. Differential Revision: https://reviews.freebsd.org/D3699 Notes: svn path=/head/; revision=288301
* - Collapse vfs_vmio_truncate & vfs_vmio_release into a single function.Jeff Roberson2015-09-271-85/+67
| | | | | | | | | | | | | | | - Allow vfs_vmio_invalidate() to free the pages, leaving us with a single loop and bufobj lock when B_NOCACHE/B_INVAL is used. - Eliminate the special B_ASYNC handling on free that has not been relevant for some time. - Remove the extraneous page busy from vfs_vmio_truncate(). Reviewed by: kib Tested by: pho Sponsored by: EMC / Isilon storage division Notes: svn path=/head/; revision=288299
* rtsock requests for deleting interface address lles started to return EPERMAlexander V. Chernikov2015-09-272-0/+4
| | | | | | | | | | | | instead of old "ignore-and-return 0" in r287789. This broke arp -da / ndp -cn behavior (they exit on rtsock command failure). Fix this by translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and making arp/ndp ignore these entries in batched delete. MFC after: 2 weeks Notes: svn path=/head/; revision=288297
* Track the command response code buffer size and verify it in theAdrian Chadd2015-09-272-13/+26
| | | | | | | receive path. Notes: svn path=/head/; revision=288290
* The conversion of kmem_alloc_attr() from operating on a vm map to a vmemAlan Cox2015-09-261-28/+13
| | | | | | | | | | | | | | | | | | | arena in r254025 introduced a bug in the case when an allocation is only partially successful. Specifically, the vm object lock was not being acquired before freeing the allocated pages. To address this bug, replace the existing code by a call to kmem_unback(). Change the type of a variable in kmem_alloc_attr() so that an allocation of two or more gigabytes won't fail. Replace the error handling code in kmem_back() by a call to kmem_unback(). Reviewed by: kib (an earlier version) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288281
* Remove a check for a condition that is always false by a preceding KASSERTMark Johnston2015-09-261-5/+0
| | | | | | | that was added in r144704. Notes: svn path=/head/; revision=288280
* Free the TX/RX list buffers /before/ tearing down net80211 state.Adrian Chadd2015-09-261-4/+11
| | | | | | | | Otherwise buffers in the RX queue get freed with their parent vap being gone and you end up with a juicy kernel panic. Notes: svn path=/head/; revision=288279
* Fix argument ordering in vn_printf().Mark Johnston2015-09-261-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=288276
* Exploit r288122 to address a cosmetic issue. Since the pages allocatedAlan Cox2015-09-261-1/+1
| | | | | | | | | | | | | | by noobj_alloc() don't belong to a vm object, they can't be paged out. Since they can't be paged out, they are never enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages are being enqueued in the inactive queue. As of r288122, we can avoid giving this false impression by passing PQ_NONE. Submitted by: kmacy Differential Revision: https://reviews.freebsd.org/D1674 Notes: svn path=/head/; revision=288274
* Increase group limit for kerberized NFSv4Josh Paetzel2015-09-261-5/+2
| | | | | | | | | | | PR: 202659 Submitted by: matthew.l.dailey@dartmouth.edu Reviewed by: rmacklem dfr MFC after: 1 week Sponsored by: iXsystems Notes: svn path=/head/; revision=288272
* Wait up to 10 seconds for late-initializing network interfaces to arrive.Ian Lepore2015-09-261-0/+9
| | | | | | | Reviewed by: rmacklem Notes: svn path=/head/; revision=288265
* Allow LOG SENSE command on non-disk devices.Alexander Motin2015-09-262-2/+5
| | | | Notes: svn path=/head/; revision=288264
* Don't duplicate checks; net80211 now does this for us.Adrian Chadd2015-09-261-8/+0
| | | | | | | Submitted by: s3erios@gmail.com Notes: svn path=/head/; revision=288263
* Remove concept of control device.Alexander Motin2015-09-261-62/+24
| | | | Notes: svn path=/head/; revision=288262
* Move ioctl frontend defines where they belong.Alexander Motin2015-09-262-12/+12
| | | | Notes: svn path=/head/; revision=288261
* Remove few more unused variables.Alexander Motin2015-09-262-4/+0
| | | | Notes: svn path=/head/; revision=288260
* Remove some duplicate, legacy, dead and questionable code.Alexander Motin2015-09-268-406/+23
| | | | Notes: svn path=/head/; revision=288259
* Make the __bitcount*() functions unconditionally available, by movingKonstantin Belousov2015-09-261-3/+4
| | | | | | | | | | | | | | | | them out of the #if _BSD_VISIBLE block. Other headers may depend on __bitcount(). The dependencies can be a header not specified by POSIX, and then namespace restrictions by _XOPEN_SOURCE are not applicable, as it was reported. Or, we might grow an implementation of some POSIX facility using __bitcount(), which also should work. Reported by: Jason Schulz <schulz.j@gmail.com> Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=288258
* * Add 11n HT40 support - i needed to send both HTINFO and HTCAP fieldsAdrian Chadd2015-09-261-23/+19
| | | | | | | | | | | | | | | | | | | in the join message so the firmware would pick it up. * Strip out the direct hardware fiddling for 40MHz mode - the firmware we're using doesn't require it (the rtl8712su firmware does; it is less 'fullmac' than what we're using.) * Fix the mbuf handling during errors - rsu_tx shouldn't free mbufs; it's up to the caller to do so. This brings it in line with what other drivers do or should be doing. Tested: * RTL8712, HT40 channel, STA mode (during this commit) Notes: svn path=/head/; revision=288257
* Exploit r288122 to address a cosmetic issue. Since PV chunk pages don'tAlan Cox2015-09-266-6/+6
| | | | | | | | | | | | | | belong to a vm object, they can't be paged out. Since they can't be paged out, they are never enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages are being enqueued in the inactive queue. As of r288122, we can avoid this false impression by passing PQ_NONE. Submitted by: kmacy (an earlier version) Differential Revision: https://reviews.freebsd.org/D1674 Notes: svn path=/head/; revision=288256
* Fix a bug in the TX command handling - log when a too-large payload isAdrian Chadd2015-09-261-1/+9
| | | | | | | sent, and fix a bug I found when doing so. Notes: svn path=/head/; revision=288255
* Add an initial driver for the AR9170 series draft-11n hardware fromAdrian Chadd2015-09-2610-0/+4210
| | | | | | | | | | | | | | | | | | | | | | | Atheros. Thanks to OpenBSD for providing a driver based on the original Atheros open source driver circa 2008. This uses the early, pre-carl9170 atheros provided firmware. It only supports 11bg at the moment. I've not tested it with 11a (and so the TX rate control logic may be slightly wrong!) so if you do have the dual-band version of this hardware please do let me know. Tested: * AR9170, TP-Link WN821N 2GHz. TODO: * Hook this up to a non-module build. Notes: svn path=/head/; revision=288253
* Update USB device IDs for the upcoming AR9170 support.Adrian Chadd2015-09-261-0/+30
| | | | Notes: svn path=/head/; revision=288252
* Pass to sobind() copy of the address, not the original.Alexander Motin2015-09-261-2/+6
| | | | Notes: svn path=/head/; revision=288247
* Perform some rather amusing layering violations to add mbuf tags to theAdrian Chadd2015-09-265-34/+103
| | | | | | | | | | | | | | | | | | | | net80211 receive path. This allows drivers (notably USB right now, but anything/everything!) to optionally defer bulk RX of 802.11 frames until /outside/ of the driver lock(s), rather than doing: UNLOCK(sc); ieee80211_input*() LOCK(sc); .. which is really stupid. The existing API is maintaned - if ieee80211_input() / ieee80211_input_all() is called then the RSSI/NF values are used. If the MIMO versions are called with a given rx status pointer then it's used. Else, it'll use whatever is in the RX mbuf tag. Notes: svn path=/head/; revision=288245
* Compare the newly allocated array elements to NULL in order to seeBjoern A. Zeeb2015-09-251-2/+2
| | | | | | | | | | if the malloc succeeded. Spotted by: reading kernel compile time log MFC after: 2 weeks Notes: svn path=/head/; revision=288242
* Properly lock LUN in ctl_failover_lun().Alexander Motin2015-09-251-7/+25
| | | | Notes: svn path=/head/; revision=288239
* Remove apostrophe from AP's for consistency (arm64 mp_machdep)Ed Maste2015-09-251-1/+1
| | | | Notes: svn path=/head/; revision=288235
* Fix bit masks changed for the wrong commands in r288221.Alexander Motin2015-09-251-4/+4
| | | | Notes: svn path=/head/; revision=288229
* META_MODE: Remove DEP_MACHINE from Makefile.depend files.Bryan Drewery2015-09-257-14/+0
| | | | | | | | | This has not been needed since r246865 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288228
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.Bryan Drewery2015-09-257-14/+0
| | | | | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288226
* Constify ctl_serialize_table.Alexander Motin2015-09-252-2/+2
| | | | Notes: svn path=/head/; revision=288224
* sbuf: Process more than one char at a timeConrad Meyer2015-09-251-35/+39
| | | | | | | | | | | | | | | | Revamp sbuf_put_byte() to sbuf_put_bytes() in the obvious fashion and fixup callers. Add a thin shim around sbuf_put_bytes() with the old ABI to avoid ugly changes to some callers. Reviewed by: jhb, markj Obtained from: Dan Sledz Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3717 Notes: svn path=/head/; revision=288223
* Remove some dead code found by Clang analyzer.Alexander Motin2015-09-2510-220/+17
| | | | Notes: svn path=/head/; revision=288221
* Remove stale comments and some excessive empty lines.Alexander Motin2015-09-252-84/+10
| | | | Notes: svn path=/head/; revision=288220
* Use per-cpu values for base and last in tc_cpu_ticks(). The valuesKonstantin Belousov2015-09-251-7/+14
| | | | | | | | | | | | | | | | | | are updated lockess, different CPUs write its own view of timecounter state. The critical section is done for safety, callers of tc_cpu_ticks() are supposed to already enter critical section, or to own a spinlock. The change fixes sporadical reports of too high values reported for the (W)CPU on platforms that do not provide cpu ticker and use tc_cpu_ticks(), in particular, arm*. Diagnosed and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=288216
* Switch I/O time accounting from system time to uptime.Alexander Motin2015-09-254-24/+24
| | | | | | | While there, make num_dmas accounted independently of CTL_TIME_IO. Notes: svn path=/head/; revision=288215
* Collect DMA statistics on secondary HA node.Alexander Motin2015-09-251-3/+13
| | | | Notes: svn path=/head/; revision=288214
* Make HA handle datamove and done in a universal way, using port methods.Alexander Motin2015-09-251-236/+171
| | | | | | | | Now from primary node point of view requests transferred from secondary node should look almost normal and always have valid port. Notes: svn path=/head/; revision=288213
* Remove some control_softc references.Alexander Motin2015-09-256-52/+25
| | | | Notes: svn path=/head/; revision=288211
* MFV r288063: make dataset property de-registration operation O(1)Xin LI2015-09-258-203/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A change to a property on a dataset must be propagated to its descendants in case that property is inherited. For datasets whose information is not currently loaded into memory (e.g. a snapshot that isn't currently mounted), there is nothing to do; the property change will take effect the next time that dataset is loaded. To handle updates to datasets that are in-core, ZFS registers a callback entry for each property of each loaded dataset with the dsl directory that holds that dataset. There is a dsl directory associated with each live dataset that references both the live dataset and any snapshots of the live dataset. A property change is effected by doing a traversal of the tree of dsl directories for a pool, starting at the directory sourcing the change, and invoking these callbacks. The current implementation both registers and de-registers properties individually for each loaded dataset. While registration for a property is O(1) (insert into a list), de-registration is O(n) (search list and then remove). The 'n' for de-registration, however, is not limited to the size (number of snapshots + 1) of the dsl directory. The eviction portion of the life cycle for the in core state of datasets is asynchronous, which allows multiple copies of the dataset information to be in-core at once. Only one of these copies is active at any time with the rest going through tear down processing, but all copies contribute to the cost of performing a dsl_prop_unregister(). One way to create multiple, in-flight copies of dataset information is by performing "zfs list" operations from multiple threads concurrently. In-core dataset information is loaded on demand and then evicted when reference counts drops to zero. For datasets that are not mounted, there is no persistent reference count to keep them resident. So, a list operation will load them, compute the information required to do the list operation, and then evict them. When performing this operation from multiple threads it is possible that some of the in-core dataset information will be reused, but also possible to lose the race and load the dataset again, even while the same information is being torn down. Compounding the performance issue further is a change made for illumos issue 5056 which made dataset eviction single threaded. In environments using automation to manage ZFS datasets, it is now possible to create enough of a backlog of dataset evictions to consume excessive amounts of kernel memory and to bog down the system. The fix employed here is to make property de-registration O(1). With this change in place, it is hoped that a single thread is more than sufficient to handle eviction processing. If it isn't, the problem can be solved by increasing the number of threads devoted to the eviction taskq. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h: Associate dsl property callback records with both the dsl directory and the dsl dataset that is registering the callback. Both connections are protected by the dsl directory's "dd_lock". When linking callbacks into a dsl directory, group them by the property type. This helps reduce the space penalty for the double association (the property name pointer is stored once per dsl_dir instead of in each record) and reduces the number of strcmp() calls required to do callback processing when updating a single property. Property types are stored in a linked list since currently ZFS registers a maximum of 10 property types for each dataset. Note that the property buckets/records associated with a dsl directory are created on demand, but only freed when the dsl directory is freed. Given the static nature of property types and their small number, there is no benefit to freeing the few bytes of memory used to represent the property record earlier. When a property record becomes empty, the dsl directory is either going to become unreferenced a little later in this thread of execution, or there is a high chance that another dataset is going to be loaded that would recreate the bucket anyway. Replace dsl_prop_unregister() with dsl_prop_unregister_all(). All callers of dsl_prop_unregister() are trying to remove all property registrations for a given dsl dataset anyway. By changing the API, we can avoid doing any lookups of callbacks by property type and just traverse the list of all callbacks for the dataset and free each one. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c: Replace use of dsl_prop_unregister() with the new dsl_prop_unregister_all() API. illumos/illumos-gate@03bad06fbb261fd4a7151a70dfeff2f5041cce1f Author: Justin Gibbs <gibbs@scsiguy.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Illumos issue: 6171 dsl_prop_unregister() slows down dataset eviction https://www.illumos.org/issues/6171 MFC after: 2 weeks Notes: svn path=/head/; revision=288204
* Implement support for reading USB quirks from the kernel environment.Hans Petter Selasky2015-09-241-2/+137
| | | | | | | | | | | | Refer to the usb_quirk(4) manual page for more details on how to use this new feature. Submitted by: Maxime Soule <btik-fbsd@scoubidou.com> PR: 203249 MFC after: 2 weeks Notes: svn path=/head/; revision=288180
* Fix up error path handling after the recent churn.Adrian Chadd2015-09-241-10/+8
| | | | | | | | | | | | | | | | * Don't free the mbuf in the tx path - it uses the transmit path now, so the caller frees the mbuf. * Don't decrement the node ref upon error - that's up to the caller to do as well. Tested: * Intel 5300 3x3 wifi, station mode Noticed by: <s3erios@gmail.com> Notes: svn path=/head/; revision=288178
* Install kernel debug data under /usr/lib/debugEd Maste2015-09-242-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | This avoids needing a large boot partition / file system in order to accommodate multiple kernels, and provides consistency with userland debug. This also simplifies the process of moving kernel debug files to a separate package and installing them on demand. In addition, change kernel debug file extension to .debug, to match userland debug files. When using the supported kernel installation method the /usr/lib/debug/boot/kernel directory will be renamed (to kernel.old) as is done with /boot/kernel. Developers wishing to maintain the historical behavior of installing debug files in /boot/kernel/ can set KERN_DEBUGDIR="" in src.conf(5). Reviewed by: bdrewery, brooks, imp, markj Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1006 Notes: svn path=/head/; revision=288176
* Allow WRITE SAME with NDOB bit set but without UNMAP.Alexander Motin2015-09-242-4/+8
| | | | | | | This combination was originally forbidden, but allowed at spc4r3. Notes: svn path=/head/; revision=288175
* Add new report types to REPORT LUNS command.Alexander Motin2015-09-242-4/+7
| | | | | | | This is only for completeness, since we have nothing new to report there. Notes: svn path=/head/; revision=288170