ĵF248529 150 1514 302 613 148 112 843 113 166 137 142 236 134 145 319 198 633 190 168 565 285 197 149 147 787 121 111 151 106 171 246 99 120 683 1192 685 132 401 148 395 220 311 273 1825 573 822 916 1055 190 1144 116 206 276 251 188 450 386 532 124 896 243 132 297 834 120 170 158 370 214 572 156 244 156 138 203 181 384 172 114 152 150 206 232 726 189 124 110 127 381 136 368 236 500 129 214 1434 250 873 539 235 194 863 99 120 127 213 332 103 110 181 302 240 465 253 168 137 362 327 166 349 146 1541 392 300 158 737 186 595 210 267 199 201 226 169 150 133 463 1936 345 177 127 119 633 2919 607 185 485 180 187 155 221 K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-19T19:32:28.092626Z K 7 svn:log V 1417 Break out the RX completion path into "FIFO check / refill" and "complete RX frames." The 128 entry RX FIFO is really easy to fill up and miss refilling when it's done in the ath taskq - as that gets blocked up doing RX completion, TX completion and other random things. So the 128 entry RX FIFO now gets emptied and refilled in the ath_intr() task (and it grabs / releases locks, so now ath_intr() can't just be a FAST handler yet!) but the locks aren't held for very long. The completion part is done in the ath taskqueue context. Details: * Create a new completed frame list - sc->sc_rx_rxlist; * Split the EDMA RX process queue into two halves - one that processes the RX FIFO and refills it with new frames; another that completes the completed frame list; * When tearing down the driver, flush whatever is in the deferred queue as well as what's in the FIFO; * Create two new RX methods - one that processes all RX queues, one that processes the given RX queue. When MSI is implemented, we get told which RX queue the interrupt came in on so we can specifically schedule that. (And I can do that with the non-MSI path too; I'll figure that out later.) * Convert the legacy code over to use these new RX methods; * Replace all the instances of the RX taskqueue enqueue with a call to a relevant RX method to enqueue one or all RX queues. Tested: * AR9380, STA * AR9580, STA * AR5413, STA END K 10 svn:author V 3 gjb K 8 svn:date V 27 2013-03-19T19:49:06.459518Z K 7 svn:log V 209 - Revert r248483, keeping devel/subversion as a port dependency for the doc/ build. - Remove logic in release/Makefile that modifies local src/ tree.[1] Submitted by: delphij [1] Approved by: re (jpaetzel) END K 10 svn:author V 6 brooks K 8 svn:date V 27 2013-03-19T20:00:34.730900Z K 7 svn:log V 517 Revert r248352: > Replace all known uses of ln in the build process with appropriate > install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK > variables. This breaks the assumption mergemaster and etcupdate that no new features of tools will be required to run "make distribution" or it's prerequisites. Plotting a way forward will take some time and nothing in 9-STABLE depends on INSTALL_LINK and INSTALL_SYMLINK yet so backing this out seem like the right short-term approach. PR: misc/177055 END K 10 svn:author V 4 jkim K 8 svn:date V 27 2013-03-19T20:18:30.535226Z K 7 svn:log V 55 MFC: r234352 Implement pipe2 syscall for Linuxulator. END K 10 svn:author V 4 jkim K 8 svn:date V 27 2013-03-19T20:20:00.328584Z K 7 svn:log V 19 Regen for r248532. END K 10 svn:author V 6 jilles K 8 svn:date V 27 2013-03-19T20:58:17.780081Z K 7 svn:log V 747 Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. This change allows creating file descriptors with close-on-exec set in some situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file descriptors (SCM_RIGHTS) atomically close-on-exec. The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD. MSG_CMSG_CLOEXEC is the first free bit for MSG_*. The SOCK_* flags are not passed to MAC because this may cause incorrect failures and can be done later via fcntl() anyway. On the other hand, audit is expected to cope with the new flags. For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags argument. Reviewed by: kib END K 10 svn:author V 4 joel K 8 svn:date V 27 2013-03-19T21:40:14.844582Z K 7 svn:log V 20 Add simple example. END K 10 svn:author V 3 ray K 8 svn:date V 27 2013-03-19T21:45:30.282363Z K 7 svn:log V 74 Revert r243507. Freescale i.MX515 I2C controller have different problems. END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-19T22:14:50.738963Z K 7 svn:log V 46 Run zvol_create_minors() on snapshot creation END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-19T22:27:15.817947Z K 7 svn:log V 51 Run zvol_create_minors() only if in non-error case END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-20T02:42:52.759951Z K 7 svn:log V 140 Add VNET wrappers around the rest of the ieee80211 rtsock messages. I triggered the cac/radar messages when doing testing in DFS channels. END K 10 svn:author V 3 sjg K 8 svn:date V 27 2013-03-20T03:34:24.531802Z K 7 svn:log V 42 Add newline before for better formatting END K 10 svn:author V 6 alfred K 8 svn:date V 27 2013-03-20T05:23:23.885637Z K 7 svn:log V 50 MFC to prep for phase II: Linux-like kpi and api. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2013-03-20T05:31:34.663221Z K 7 svn:log V 222 For RTL8211B or later PHYs, enable crossover detection and auto-correction. This change makes re(4) establish a link with a system using non-crossover UTP cable. Tested by: Michael BlackHeart < amdmiek <> gmail dot com > END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-20T05:44:03.541176Z K 7 svn:log V 102 Fix the EDMA CABQ handling - for now, the CABQ takes a descriptor chain like the legacy chips expect. END K 10 svn:author V 6 bryanv K 8 svn:date V 27 2013-03-20T05:49:09.990409Z K 7 svn:log V 537 MFC 247870: Remove the virtio dependency entry for the VirtIO device drivers. This will prevent the kernel from linking if the device driver are included without the virtio module. Remove pci and scbus for the same reason. Also explain the relationship and necessity of the virtio and virtio_pci modules. Currently in FreeBSD, we only support VirtIO PCI, but it could be replaced with a different interface (like MMIO) and the device (network, block, etc) will still function. Approved by: grehan (mentor) END K 10 svn:author V 6 grehan K 8 svn:date V 27 2013-03-20T06:35:03.120802Z K 7 svn:log V 95 Release Bryan from mentorship and allow him to go full-blast with his excellent contributions. END K 10 svn:author V 8 melifaro K 8 svn:date V 27 2013-03-20T07:20:00.098206Z K 7 svn:log V 71 Merge r247842. Write lock is not required for find&compare operation. END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-20T08:26:16.559738Z K 7 svn:log V 473 MFC r242845, r247592: MFC r242845 (delphij): Illumos r13840:97fd5cdf328a: 3145 single-copy arc 3212 ztest: race condition between vdev_online() and spa_vdev_remove() Illumos r13849:3468a95b27cd: 3258 ztest's use of file descriptors is unstable MFC r247592 (delphij): Import a fix tighten assertion on SPA versions from vendor (Illumos). Illumos ZFS issue: 3543 Feature flags causes assertion in spa.c to miss certain cases Approved by: delphij END K 10 svn:author V 6 andrew K 8 svn:date V 27 2013-03-20T08:34:30.679419Z K 7 svn:log V 189 Pull in r177252 from upstream clang trunk: Make sure to use same EABI version for external assembler as for integrated as. This allows us to use gcc on a world built with clang on ARM. END K 10 svn:author V 2 ae K 8 svn:date V 27 2013-03-20T09:12:28.475142Z K 7 svn:log V 105 MFC r248180: Take the inpcb rlock before calculating checksum, it was accidentally moved in r191672. END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-20T09:44:23.972185Z K 7 svn:log V 57 Fix the logic inversion in the r248512. Noted by: mckay END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-20T09:56:20.420511Z K 7 svn:log V 56 Release hold on pool before calling zvol_create_minor() END K 10 svn:author V 8 melifaro K 8 svn:date V 27 2013-03-20T10:35:33.097107Z K 7 svn:log V 689 Add ipfw support for setting/matching DiffServ codepoints (DSCP). Setting DSCP support is done via O_SETDSCP which works for both IPv4 and IPv6 packets. Fast checksum recalculation (RFC 1624) is done for IPv4. Dscp can be specified by name (AFXY, CSX, BE, EF), by value (0..63) or via tablearg. Matching DSCP is done via another opcode (O_DSCP) which accepts several classes at once (af11,af22,be). Classes are stored in bitmask (2 u32 words). Many people made their variants of this patch, the ones I'm aware of are (in alphabetic order): Dmitrii Tejblum Marcelo Araujo Roman Bogorodskiy (novel) Sergey Matveichuk (sem) Sergey Ryabin PR: kern/102471, kern/121122 MFC after: 2 weeks END K 10 svn:author V 8 melifaro K 8 svn:date V 27 2013-03-20T10:36:38.739719Z K 7 svn:log V 24 Remove unused variable. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2013-03-20T11:51:26.745613Z K 7 svn:log V 14 Fix spelling. END K 10 svn:author V 6 grehan K 8 svn:date V 27 2013-03-20T13:45:15.510094Z K 7 svn:log V 56 Really release Bryan this time :) Pointed out by: many END K 10 svn:author V 3 ray K 8 svn:date V 27 2013-03-20T14:16:56.460207Z K 7 svn:log V 14 MFC @r248554. END K 10 svn:author V 3 ray K 8 svn:date V 27 2013-03-20T15:39:27.166004Z K 7 svn:log V 79 Integrate Efika MX project back to home. Sponsored by: The FreeBSD Foundation END K 10 svn:author V 7 attilio K 8 svn:date V 27 2013-03-20T16:25:19.334901Z K 7 svn:log V 149 Fix up a vm_page_sleep() call that wasn't fixed in the locking scheme conversion. Sponsored by: EMC / Isilon storage division Reported by: flo, pho END K 10 svn:author V 7 attilio K 8 svn:date V 27 2013-03-20T16:27:58.154827Z K 7 svn:log V 4 MFC END K 10 svn:author V 7 attilio K 8 svn:date V 27 2013-03-20T16:30:17.261374Z K 7 svn:log V 24 Merge from vmcontention END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2013-03-20T17:57:00.526699Z K 7 svn:log V 585 When renaming a directory from one parent directory to another, we need to call ufs_checkpath() to walk from our new location to the root of the filesystem to ensure that we do not encounter ourselves along the way. Until now, we accomplished this by reading the ".." entries of each directory in our path until we reached the root (or encountered an error). This change tries to avoid the I/O of reading the ".." entries by first looking them up in the name cache and only doing the I/O when the name cache lookup fails. Reviewed by: kib Tested by: Peter Holm MFC after: 4 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-20T21:07:49.809324Z K 7 svn:log V 1098 When the journaled FFS volume is suspended due to the journal space becoming too low, the softdep flush thread processes the workitems, which frees the space in journal, and then unsuspends the fs. The softdep_flush() and other workitem processing functions busy the filesystem before iterating over the worklist, to prevent the parallel unmount from freeing the mount data. The vfs_busy() is called with MBF_NOWAIT flag. Now, if the unmount is already started and the filesystem is suspended due to low journal space, the journal is never flushed and filesystem is never unsuspended, because vfs_busy(MBF_NOWAIT) call cannot succeed for the unmounting fs, and softdep_flush() does not process the workitems. Unmount needs to write metadata, where it hangs in the "suspfs" state. Move the vn_start_write() call in the dounmount() before setting the MNTK_UNMOUNT flag. This practically ensures that softdep_flush() processed the pending journal writes by making dounmount() wait for the lift of the suspension. Sponsored by: The FreeBSD Foundation Reported and tested by: pho MFC after: 2 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-20T21:08:00.975024Z K 7 svn:log V 592 In bufwrite(), a dirty buffer is moved to the clean queue before the bufobj counter of the writes in progress is incremented. Other thread inspecting the bufobj would consider it clean. For the regular vnodes, the vnode lock is typically held both by the thread performing the bufwrite() and an other thread doing syncing, which prevents the situation. On the other hand, writes to the VCHR vnodes are done without holding vnode lock. Increment the write ref counter for the buffer object before calling bundirty(). Sponsored by: The FreeBSD Foundation Tested by: pho MFC after: 2 weeks END K 10 svn:author V 4 neel K 8 svn:date V 27 2013-03-20T21:47:05.324229Z K 7 svn:log V 39 Set WARNS=3 so this actually compiles. END K 10 svn:author V 6 bryanv K 8 svn:date V 27 2013-03-21T06:56:35.871866Z K 7 svn:log V 305 Commit development snapshot of the multiqueue driver This commit contains lots of cleanup, bug fixes, and enhancements such as: - improved Rx/Tx checksumming - better handling of deferred transmit and interrupt handlers - per-queue statistics, exported via sysctl A lot of work still remains. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2013-03-21T07:04:17.792454Z K 7 svn:log V 51 Add new USB ID. PR: usb/177173 MFC after: 1 week END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-21T07:25:08.124969Z K 7 svn:log V 302 Do not call vnode_pager_setsize() while a NFS node mutex is locked. vnode_pager_setsize() might sleep waiting for the page after EOF be unbusied. Call vnode_pager_setsize() both for the regular and directory vnodes. Reported by: mich Reviewed by: rmacklem Discussed with: avg, jhb MFC after: 2 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-21T07:26:33.473105Z K 7 svn:log V 127 Assert that transient mapping of the bio is only done when unmapped buffers are allowed. Sponsored by: The FreeBSD Foundation END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-21T07:28:15.331680Z K 7 svn:log V 218 Only size and create the bio_transient_map when unmapped buffers are enabled. Now, disabling the unmapped buffers should result in the kernel memory map identical to pre-r248550. Sponsored by: The FreeBSD Foundation END K 10 svn:author V 7 glebius K 8 svn:date V 27 2013-03-21T08:36:15.833753Z K 7 svn:log V 176 Add NGM_NAT_LIBALIAS_INFO command, that reports internal stats of libalias instance. To be used in the mpd5 daemon. Submitted by: Dmitry Luhtionov END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-21T08:38:03.497860Z K 7 svn:log V 1732 Merge libzfs_core branch: includes MFV 238590, 238592, 247580 MFV 238590, 238592: In the first zfs ioctl restructuring phase, the libzfs_core library was introduced. It is a new thin library that wraps around kernel ioctl's. The idea is to provide a forward-compatible way of dealing with new features. Arguments are passed in nvlists and not random zfs_cmd fields, new-style ioctls are logged to pool history using a new method of history logging. http://blog.delphix.com/matt/2012/01/17/the-future-of-libzfs/ MFV 247580 [1]: To address issues of several deadlocks and race conditions the locking code around dsl_dataset was rewritten and the interface to synctasks was changed. User-Visible Changes: "zfs snapshot" can create more arbitrary snapshots at once (atomically) "zfs destroy" destroys multiple snapshots at once "zfs recv" has improved performance Backward Compatibility: I have extended the compatibility layer to support full backward compatibility by remapping or rewriting the responsible ioctl arguments. Old utilities are fully supported by the new kernel module. Forward Compatibility: New utilities work with old kernels with the following restrictions: - creating, destroying, holding and releasing of multiple snapshots at once is not supported, this includes recursive (-r) commands Illumos ZFS issues: 2882 implement libzfs_core 2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once 3464 zfs synctask code needs restructuring References: https://www.illumos.org/issues/2882 https://www.illumos.org/issues/2900 https://www.illumos.org/issues/3464 [1] MFC after: 1 month Sponsored by: Hybrid Logic Inc. [1] END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T09:34:41.641097Z K 7 svn:log V 480 Add TRIM support for L2ARC. This adds TRIM support to cache vdevs. When ARC buffers are removed from the L2ARC in arc_hdr_destroy(), arc_release() or l2arc_evict(), the size previously occupied by the buffer gets scheduled for TRIMming. As always, actual TRIMs are only issued to the L2ARC after txg_trim_limit. Reviewed by: pjd (mentor) Approved by: pjd (mentor) Obtained from: https://github.com/dechamps/zfs/commit/31aae373994fd112256607edba7de2359da3e9dc MFC after: 2 weeks END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T10:02:32.572127Z K 7 svn:log V 729 Don't register repair writes in the trim map. The trim map inflight writes tree assumes non-conflicting writes, i.e. that there will never be two simultaneous write I/Os to the same range on the same vdev. This seemed like a sane assumption; however, in actual testing, it appears that repair I/Os can very well conflict with "normal" writes. I'm not quite sure if these conflicting writes are supposed to happen or not, but in the mean time, let's ignore repair writes for now. This should be safe considering that, by definition, we never repair blocks that are freed. Reviewed by: pjd (mentor) Approved by: pjd (mentor) Obtained from: Source: https://github.com/dechamps/zfs/commit/6a3cebaf7c5fcc92007280b5d403c15d0e61dfe3 END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T10:16:10.687188Z K 7 svn:log V 823 Improve TXG handling in the TRIM module. This patch adds some improvements to the way the trim module considers TXGs: - Free ZIOs are registered with the TXG from the ZIO itself, not the current SPA syncing TXG (which may be out of date); - L2ARC are registered with a zero TXG number, as L2ARC has no concept of TXGs; - The TXG limit for issuing TRIMs is now computed from the last synced TXG, not the currently syncing TXG. Indeed, under extremely unlikely race conditions, there is a risk we could trim blocks which have been freed in a TXG that has not finished syncing, resulting in potential data corruption in case of a crash. Reviewed by: pjd (mentor) Approved by: pjd (mentor) Obtained from: https://github.com/dechamps/zfs/commit/5b46ad40d9081d75505d6f3bf04ac652445df366 MFC after: 2 weeks END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T10:29:05.941693Z K 7 svn:log V 962 TRIM cache devices based on time instead of TXGs. Currently, the trim module uses the same algorithm for data and cache devices when deciding to issue TRIM requests, based on how far in the past the TXG is. Unfortunately, this is not ideal for cache devices, because the L2ARC doesn't use the concept of TXGs at all. In fact, when using a pool for reading only, the L2ARC is written but the TXG counter doesn't increase, and so no new TRIM requests are issued to the cache device. This patch fixes the issue by using time instead of the TXG number as the criteria for trimming on cache devices. The basic delay principle stays the same, but parameters are expressed in seconds instead of TXGs. The new parameters are named trim_l2arc_limit and trim_l2arc_batch, and both default to 30 second. Reviewed by: pjd (mentor) Approved by: pjd (mentor) Obtained from: https://github.com/dechamps/zfs/commit/17122c31ac7f82875e837019205c21651c05f8cd MFC after: 2 weeks END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T10:41:30.383914Z K 7 svn:log V 98 Names the ZFS TRIM thread Reviewed by: pjd (mentor) Approved by: pjd (mentor) MFC after: 2 weeks END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T11:02:08.901294Z K 7 svn:log V 1050 Optimisation of TRIM processing. Previously TRIM processing was very bursty. This was made worse by the fact that TRIM requests on SSD's are typically much slower than reads or writes. This often resulted in stalls while large numbers of TRIM's where processed. In addition due to the way the TRIM thread was only woken by writes, deletes could stall in the queue for extensive periods of time. This patch adds a number of controls to how often the TRIM thread for each SPA processes its outstanding delete requests. vfs.zfs.trim.timeout: Delay TRIMs by up to this many seconds vfs.zfs.trim.txg_delay: Delay TRIMs by up to this many TXGs (reduced to 32) vfs.zfs.vdev.trim_max_bytes: Maximum pending TRIM bytes for a vdev vfs.zfs.vdev.trim_max_pending: Maximum pending TRIM segments for a vdev vfs.zfs.trim.max_interval: Maximum interval between TRIM queue processing (seconds) Given the most common TRIM implementation is ATA TRIM the current defaults are targeted at that. Reviewed by: pjd (mentor) Approved by: pjd (mentor) MFC after: 2 weeks END K 10 svn:author V 4 joel K 8 svn:date V 27 2013-03-21T11:22:13.000803Z K 7 svn:log V 23 Remove EOL whitespace. END K 10 svn:author V 3 smh K 8 svn:date V 27 2013-03-21T11:25:21.311441Z K 7 svn:log V 113 Add missing descriptions for ZFS sysctls Reviewed by: pjd (mentor) Approved by: pjd (mentor) MFC after: 2 weeks END K 10 svn:author V 6 eadler K 8 svn:date V 27 2013-03-21T12:42:25.736469Z K 7 svn:log V 180 Remove a reference to instant-server which has been removed from the ports tree in r313427. PR: 177012 Submitted by: Kevin Zheng Approved by: bcr (mentor) END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-21T12:59:24.378134Z K 7 svn:log V 158 Initialize the variable to avoid (false) compiler warning about use of an uninitialized local. Reported by: Ivan Klymenko MFC after: 2 weeks END K 10 svn:author V 7 glebius K 8 svn:date V 27 2013-03-21T13:02:43.144381Z K 7 svn:log V 92 Document NGM_NAT_LIBALIAS_INFO. Submitted by: Dmitry Luhtionov END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-21T13:06:28.914736Z K 7 svn:log V 357 Fix twa(4) after the r246713. The driver copies data around to satisfy some alignment restrictions. Do not set TW_OSLI_REQ_FLAGS_CCB flag for mapped data, pass the csio->data_ptr in the req->data. Do not put the ccb pointer into req->data ever, ccb is stored in req->orig_req already. Submitted by: Shuichi KITAGUCHI PR: kern/177020 END K 10 svn:author V 3 jhb K 8 svn:date V 27 2013-03-21T14:06:27.377462Z K 7 svn:log V 293 Another NFS SIGSTOP related fix: Ignore thread suspend requests due to SIGSTOP if stop signals are currently deferred. This can occur if a process is stopped via SIGSTOP while a thread is running or runnable but before it has set TDF_SBDRY. Tested by: pho Reviewed by: kib MFC after: 1 week END K 10 svn:author V 3 mav K 8 svn:date V 27 2013-03-21T15:42:41.372356Z K 7 svn:log V 439 Minimal timer period of 100us introduced in r244758 is overkill. While original 2us are indeed not enough, 3us are working quite well on my tests. To be more safe set minimal period to 5us and to be even more safe replicate here from HPET mechanism of rereading counter after programming comparator. This change allows to handle 30K of short nanosleep() calls per second on Raspberry Pi instead of just 8K before. Discussed with: gonzo END K 10 svn:author V 7 glebius K 8 svn:date V 27 2013-03-21T16:04:34.619014Z K 7 svn:log V 28 Document uma_find_refcnt(). END K 10 svn:author V 4 tijl K 8 svn:date V 27 2013-03-21T16:15:34.827131Z K 7 svn:log V 802 - Fix two possible overflows when testing if ELF program headers are on the first page: 1. Cast uint16_t operands in a multiplication to unsigned int because otherwise the implicit promotion to int results in a signed multiplication that can overflow and the behaviour on integer overflow is undefined. 2. Replace (offset + size > PAGE_SIZE) with (size > PAGE_SIZE - offset) because the sum may overflow. - Use the same tests to see if the path to the interpreter is on the first page. There's no overflow here because size is already limited by MAXPATHLEN, but the compiler optimises the new tests better. Also fix an off-by-one error. - Simplify tests to see if an ELF note program header is on the first page. This also fixes an off-by-one error. Reviewed by: kib END K 10 svn:author V 7 glebius K 8 svn:date V 27 2013-03-21T16:19:46.211506Z K 7 svn:log V 146 Document some flags to the uma_zcreate(). Not all flags are documented, only those that at least are used in the kernel, or that definitely work. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2013-03-21T16:29:08.802443Z K 7 svn:log V 36 Merge head r243428 through r248588. END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-21T18:59:02.254748Z K 7 svn:log V 205 Update libarchive's vendor dist to version 3.1.2 from release branch. Git branch: release Git commit: 19f23e191f9d3e1dd2a518735046100419965804 Obtained from: https://github.com/libarchive/libarchive.git END K 10 svn:author V 7 attilio K 8 svn:date V 27 2013-03-21T19:58:25.643470Z K 7 svn:log V 737 Fix a bug in UMTX_PROFILING: UMTX_PROFILING should really analyze the distribution of locks as they index entries in the umtxq_chains hash-table. However, the current implementation does add/dec the length counters for *every* thread insert/removal, measuring at all really userland contention and not the hash distribution. Fix this by correctly add/dec the length counters in the points where it is really needed. Please note that this bug brought us questioning in the past the quality of the umtx hash table distribution. To date with all the benchmarks I could try I was not able to reproduce any issue about the hash distribution on umtx. Sponsored by: EMC / Isilon storage division Reviewed by: jeff, davide MFC after: 2 weeks END K 10 svn:author V 7 glebius K 8 svn:date V 27 2013-03-21T20:14:51.095063Z K 7 svn:log V 24 Document UMA_ZONE_PCPU. END K 10 svn:author V 6 jilles K 8 svn:date V 27 2013-03-21T21:39:15.085655Z K 7 svn:log V 75 Allow O_CLOEXEC in posix_openpt() flags. PR: kern/162374 Reviewed by: ed END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-21T21:51:46.663019Z K 7 svn:log V 67 Delete files accidentially left over in r248590 (libarchive 3.1.2) END K 10 svn:author V 7 delphij K 8 svn:date V 27 2013-03-21T22:24:54.320990Z K 7 svn:log V 273 - Integrate OpenSSL revisions fb092ef4fca897344daf7189526f5f26be6487ce, a93cc7c57333f4538cbcdedd2e961a5a38caa52d, and 76c61a5d1adb92388f39e585e4af860a20feb9bb. This removes the newly added orig_len field of SSL3_RECORD and restored ABI. Approved by: benl END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-21T22:36:43.961436Z K 7 svn:log V 121 Correct the page count when excess length is trimmed from the bio. Reported and tested by: Ivan Klymenko vfs_count after it completes. Simply #ifdef sun this check. Submitted by: avg Reviewed by: avg Approved by: ken (mentor) MFC after: 1 month END K 10 svn:author V 4 will K 8 svn:date V 27 2013-03-23T16:55:07.717584Z K 7 svn:log V 93 Be more explicit about what each bio_cmd & bio_flags value means. Reviewed by: ken (mentor) END K 10 svn:author V 3 ian K 8 svn:date V 27 2013-03-23T17:17:06.522486Z K 7 svn:log V 502 Don't check and warn about pmap mismatch on every call to busdma sync. With some recent busdma refactoring, sometimes it happens that a sync op gets called when bus_dmamap_load() never got called, which results in a spurious warning about a map mismatch when no sync operations will actually happen anyway. Now the check is done only if a sync operation is actually performed, and the result of the check is a panic, not just a printf. Reviewed by: cognet (who prevented me from donning a point hat) END K 10 svn:author V 3 jmg K 8 svn:date V 27 2013-03-23T19:04:57.655903Z K 7 svn:log V 117 Fix compiling ed w/ WITHOUT_ED_CRYPTO... These variables aren't used.. Submitted by: deeptech71 at gmail dot com END K 10 svn:author V 8 dumbbell K 8 svn:date V 27 2013-03-23T19:19:19.265615Z K 7 svn:log V 169 drm/ttm: Fix TTM buffer object refcount This fixes memory leaks in the radeonkms driver. Reviewed by: Konstantin Belousov (kib@) Tested by: J.R. Oldroyd END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2013-03-23T20:00:02.475686Z K 7 svn:log V 101 Revert 248634 and 248643 (e.g., restoring 248625 and 248639). Build verified by: Glen Barber (gjb@) END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-23T20:01:45.860022Z K 7 svn:log V 109 Fix kernel build with options ZFS after r24571 (libzfs_core). Submitted by: Bjoern A. Zeeb END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-23T20:17:32.469773Z K 7 svn:log V 134 Update vendor-sys/illumos/dist to illumos-gate 13990:b04b9a80047a Illumos ZFS issues: 3618 ::zio dcmd does not show timestamp data END K 10 svn:author V 8 dumbbell K 8 svn:date V 27 2013-03-23T20:43:26.352307Z K 7 svn:log V 72 drm/ttm: Explain why we don't need to acquire a ref in ttm_bo_vm_ctor() END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-23T20:43:28.139154Z K 7 svn:log V 58 Implement counter_u64_inc() on powerpc64 AIM using ll/sc. END K 10 svn:author V 8 dumbbell K 8 svn:date V 27 2013-03-23T20:46:47.478948Z K 7 svn:log V 36 drm/ttm: Fix a typo: s/pTTM]/[TTM]/ END K 10 svn:author V 2 mm K 8 svn:date V 27 2013-03-23T21:34:10.690737Z K 7 svn:log V 371 Merge bugfix from vendor master branch: Limit write requests to at most INT_MAX. This prevents a certain common programming error (passing -1 to write) from leading to other problems deeper in the library. References: https://github.com/libarchive/libarchive/commit/22531545514043e0 Reported by: Xin Li Obtained from: libarchive (master branch) END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2013-03-23T21:56:19.633657Z K 7 svn:log V 1837 MFC of 246876 and 246877 MFC: 246876: Add barrier write capability to the VFS buffer interface. A barrier write is a disk write request that tells the disk that the buffer being written must be committed to the media along with any writes that preceeded it before any future blocks may be written to the drive. Barrier writes are provided by adding the functions bbarrierwrite (bwrite with barrier) and babarrierwrite (bawrite with barrier). Following a bbarrierwrite the client knows that the requested buffer is on the media. It does not ensure that buffers written before that buffer are on the media. It only ensure that buffers written before that buffer will get to the media before any buffers written after that buffer. A flush command must be sent to the disk to ensure that all earlier written buffers are on the media. Reviewed by: kib Tested by: Peter Holm MFC 246877: The UFS2 filesystem allocates new blocks of inodes as they are needed. When a cylinder group runs short of inodes, a new block for inodes is allocated, zero'ed, and written to the disk. The zero'ed inodes must be on the disk before the cylinder group can be updated to claim them. If the cylinder group claiming the new inodes were written before the zero'ed block of inodes, the system could crash with the filesystem in an unrecoverable state. Rather than adding a soft updates dependency to ensure that the new inode block is written before it is claimed by the cylinder group map, we just do a barrier write of the zero'ed inode block to ensure that it will get written before the updated cylinder group map can be written. This change should only slow down bulk loading of newly created filesystems since that is the primary time that new inode blocks need to be created. Reported by: Robert Watson Reviewed by: kib Tested by: Peter Holm END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-23T22:23:15.102898Z K 7 svn:log V 252 Do not call malloc(M_WAITOK) while bodev->fence_lock mutex is held. The ttm_buffer_object_transfer() does not need the mutex locked at all, except for the call to the driver sync_obj_ref() method. Reported and tested by: dumbbell MFC after: 2 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-23T22:41:48.059025Z K 7 svn:log V 85 MFC r247387: Inode block must not be read or written while cg block buffer is owned. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-23T23:20:38.495411Z K 7 svn:log V 32 Expose the beacon miss counter. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-23T23:27:16.785314Z K 7 svn:log V 24 More indentation fixes. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-23T23:51:11.525547Z K 7 svn:log V 537 CABQ calculation changes to try and fix some weird corner cases leading to stuck beacons. * Set the cabq readytime (ie, how long to burst for) to 50% of the total beacon interval time * fix the cabq adjustment calculation based on how the beacon offset is calculated (the SWBA/DBA time offset.) This is all still a bit magic voodoo but it does seem to have further quietened issues with missed/stuck beacons under my local testing. In any case, it better matches what the reference HAL implements. Obtained from: Qualcomm Atheros END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-24T00:03:12.204091Z K 7 svn:log V 2822 Overhaul the TXQ locking (again!) as part of some beacon/cabq timing related issues. Moving the TX locking under one lock made things easier to progress on but it had one important side-effect - it increased the latency when handling CABQ setup when sending beacons. This commit introduces a bunch of new changes and a few unrelated changs that are just easier to lump in here. The aim is to have the CABQ locking separate from other locking. The CABQ transmit path in the beacon process thus doesn't have to grab the general TX lock, reducing lock contention/latency and making it more likely that we'll make the beacon TX timing. The second half of this commit is the CABQ related setup changes needed for sane looking EDMA CABQ support. Right now the EDMA TX code naively assumes that only one frame (MPDU or A-MPDU) is being pushed into each FIFO slot. For the CABQ this isn't true - a whole list of frames is being pushed in - and thus CABQ handling breaks very quickly. The aim here is to setup the CABQ list and then push _that list_ to the hardware for transmission. I can then extend the EDMA TX code to stamp that list as being "one" FIFO entry (likely by tagging the last buffer in that list as "FIFO END") so the EDMA TX completion code correctly tracks things. Major: * Migrate the per-TXQ add/removal locking back to per-TXQ, rather than a single lock. * Leave the software queue side of things under the ATH_TX_LOCK lock, (continuing) to serialise things as they are. * Add a new function which is called whenever there's a beacon miss, to print out some debugging. This is primarily designed to help me figure out if the beacon miss events are due to a noisy environment, issues with the PHY/MAC, or other. * Move the CABQ setup/enable to occur _after_ all the VAPs have been looked at. This means that for multiple VAPS in bursted mode, the CABQ gets primed once all VAPs are checked, rather than being primed on the first VAP and then having frames appended after this. Minor: * Add a (disabled) twiddle to let me enable/disable cabq traffic. It's primarily there to let me easily debug what's going on with beacon and CABQ setup/traffic; there's some DMA engine hangs which I'm finally trying to trace down. * Clear bf_next when flushing frames; it should quieten some warnings that show up when a node goes away. Tested: * AR9280, STA/hostap, up to 4 vaps (staggered) * AR5416, STA/hostap, up to 4 vaps (staggered) TODO: * (Lots) more AR9380 and later testing, as I may have missed something here. * Leverage this to fix CABQ hanling for AR9380 and later chips. * Force bursted beaconing on the chips that default to staggered beacons and ensure the CABQ stuff is all sane (eg, the MORE bits that aren't being correctly set when chaining descriptors.) END K 10 svn:author V 3 dim K 8 svn:date V 27 2013-03-24T01:35:37.394628Z K 7 svn:log V 514 Compile contrib/tzcode/stdtime/localtime.c with -fwrapv, since it relies on signed integer overflow wrapping. Otherwise mktime(3) and timegm(3) can hang, in case the timestamp passed in struct tm is not representable in a time_t. Specifically, any timestamp after 2038-01-19 03:14:07, in combination with a 32-bit time_t. Note that it would be better to change the code to not rely on undefined behaviour, but it is contributed code, and it is not entirely trivial to fix the issue properly. MFC after: 3 days END K 10 svn:author V 6 sbruno K 8 svn:date V 27 2013-03-24T02:04:19.123270Z K 7 svn:log V 90 Minor formatting fix for printf() to fix clang builds. Submitted by: db Reviewed by: gjb END K 10 svn:author V 3 mav K 8 svn:date V 27 2013-03-24T03:15:20.011110Z K 7 svn:log V 392 Make g_wither_washer() to not loop by itself, but only when there was some more topology change done that may require its attention. Add few missing g_do_wither() calls in respective places to signal it. This fixes potential infinite loop here when some provider is withered, but still opened or connected for some reason and so can not be destroyed. For example, see r227009 and r227510. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-24T04:09:29.400142Z K 7 svn:log V 85 Fix the locking changes due to the TXQ change drive-by. Tested: * AR9580, STA mode END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-24T04:09:54.353814Z K 7 svn:log V 92 Move the TXQ lock earlier in this routine - so to correctly protect the link pointer check. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2013-03-24T04:42:56.449662Z K 7 svn:log V 60 Add new regulatory domain. Obtained from: Qualcomm Atheros END K 10 svn:author V 3 kib K 8 svn:date V 27 2013-03-24T07:41:36.600023Z K 7 svn:log V 128 MFC r248422: Remove negative name cache entry pointing to the target name, which could be instantiated while tdvp was unlocked. END