ĵh234334 153 114 229 178 260 247 452 507 181 1212 156 297 169 350 292 538 320 636 307 534 317 112 173 257 168 112 233 112 150 137 155 181 182 127 116 362 234 461 1354 1949 588 256 167 158 167 158 158 170 184 1792 821 363 477 962 193 217 412 131 146 146 125 131 150 149 1192 144 162 684 163 298 198 198 198 1110 1110 157 157 236 236 116 140 248 818 246 280 115 137 100 172 213 123 198 228 109 193 118 638 156 519 124 575 139 581 418 279 327 231 120 178 192 184 419 200 183 105 165 127 680 237 173 173 349 482 318 482 294 392 134 164 320 156 134 211 1387 571 427 542 2738 133 133 443 422 99 288 305 198 1064 256 107 847 1550 101 1160 186 K 10 svn:author V 6 marcel K 8 svn:date V 27 2012-04-16T02:52:32.882256Z K 7 svn:log V 19 Include opt_kdb.h. END K 10 svn:author V 3 imp K 8 svn:date V 27 2012-04-16T04:33:37.397358Z K 7 svn:log V 136 Fly be free! Andrew Turner doesn't need my help anymore, and hasn't really needed it for quite a while. Approved by: core@ (implicit) END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-04-16T08:19:43.639323Z K 7 svn:log V 87 Fix typo miror -> mirror Reported by: Glen Barber MFC after: 3 days END K 10 svn:author V 6 andrew K 8 svn:date V 27 2012-04-16T09:38:20.526258Z K 7 svn:log V 164 Replace the C implementation of __aeabi_read_tp with an assembly version. This ensures we follow the ABI by preserving registers r1-r3. Reviewed by: jmallett, imp END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-04-16T10:33:46.822631Z K 7 svn:log V 154 intpm: add ATI IXP400 pci id PR: kern/136762 Submitted by: Aurelien Mere Tested by: Jens Link MFC after: 5 days END K 10 svn:author V 3 avg K 8 svn:date V 27 2012-04-16T10:43:06.376493Z K 7 svn:log V 359 zfsboot: honor -q if it's present in boot.config Before r228267 the option was honored but the original content of boot.config was not preserved. I tried to fix that but missed the idea. Now the proper way of doing things is taken from i386/boo2. Also, a comment is added to explain this a little bit unobvious behavior. Inspired by: jhb MFC after: 5 days END K 10 svn:author V 5 gavin K 8 svn:date V 27 2012-04-16T12:49:19.060714Z K 7 svn:log V 412 Merge r232779 from head: Move determination of socket buffer sizes from startup to the first time a socket is used. The previous code structure assumed that AF_INET sockets were always available, which is an invalid assumption on IPv6-only systems. This merges the fololowing revisions from NetBSD: src/usr.bin/ftp/main.c 1.120 src/usr.bin/ftp/util.c 1.156 PR: bin/162661 Obtained from: NetBSD END K 10 svn:author V 3 zec K 8 svn:date V 27 2012-04-16T13:41:46.877852Z K 7 svn:log V 89 #include is no longer needed here. Spotted by: Ed Maste MFC after: 3 days. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-04-16T13:49:03.560638Z K 7 svn:log V 1114 When we receive an ICMP unreach need fragmentation datagram, we take proposed MTU value from it and update the TCP host cache. Then tcp_mss_update() is called on the corresponding tcpcb. It finds the just allocated entry in the TCP host cache and updates MSS on the tcpcb. And then we do a fast retransmit of what we have in the tcp send buffer. This sequence gets broken if the TCP host cache is exausted. In this case allocation fails, and later called tcp_mss_update() finds nothing in cache. The fast retransmit is done with not reduced MSS and is immidiately replied by remote host with new ICMP datagrams and the cycle repeats. This ping-pong can go up to wirespeed. To fix this: - tcp_mss_update() gets new parameter - mtuoffer, that is like offer, but needs to have min_protoh subtracted. - tcp_mtudisc() as notification method renamed to tcp_mtudisc_notify(). - tcp_mtudisc() now accepts not a useless error argument, but proposed MTU value, that is passed to tcp_mss_update() as mtuoffer. Reported by: az Reported by: Andrey Zonov Reviewed by: andre (previous version of patch) END K 10 svn:author V 7 sperber K 8 svn:date V 27 2012-04-16T15:08:01.008450Z K 7 svn:log V 60 Add myself to committers-ports Approved by: beat (mentor) END K 10 svn:author V 7 dmarion K 8 svn:date V 27 2012-04-16T15:43:31.924458Z K 7 svn:log V 200 TI EDMA3 driver and modifications of TI MMC driver to use this DMA controller in addition to existing sDMA. This brings MMC/SD card access to AM335x/beaglebone. ti_mmchs requires additional cleanup. END K 10 svn:author V 5 marck K 8 svn:date V 27 2012-04-16T17:30:19.625257Z K 7 svn:log V 75 VMware environment is frequent nowadays. Add VMFS id. MFC after: 2 weeks END K 10 svn:author V 2 jh K 8 svn:date V 27 2012-04-16T18:07:42.926889Z K 7 svn:log V 258 tmpfs: Allow update mounts only for certain options. Since r230208 update mounts were allowed if the list of mount options contained the "export" option. This is not correct as tmpfs doesn't really support updating all options. Reviewed by: kevlo, trociny END K 10 svn:author V 2 jh K 8 svn:date V 27 2012-04-16T18:10:34.990277Z K 7 svn:log V 200 Sync tmpfs_chflags() with the recent changes to UFS: - Add a check for unsupported file flags. - Return EPERM when an user without PRIV_VFS_SYSFLAGS privilege attempts to toggle SF_SETTABLE flags. END K 10 svn:author V 6 marius K 8 svn:date V 27 2012-04-16T18:29:07.063098Z K 7 svn:log V 442 Turn on PREEMPTION by default. After fixing several bugs over time, the last show-stopper keeping PREEMPTION from being usable on sparc64 should have been dealt with in r230662. At least on 2-way systems, PREEMPTION causes a little bit of a degradation in worldstone performance. However, FreeBSD seems to have started building up regressions in !PREEMPTION cases so sparc64 better should not be an oddball in this regard. MFC after: 1 week END K 10 svn:author V 6 grehan K 8 svn:date V 27 2012-04-16T18:29:12.863470Z K 7 svn:log V 224 Sync with Bryan Venteicher's virtio git repo: d04e609bdd1973cc7d2e8b38b7dcfae057b0962d virtio_blk: Use correct temporary variable in vtblk_poll_request Obtained from: Bryan Venteicher bryanv at daemoninthecloset dot org END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T19:31:44.055330Z K 7 svn:log V 542 - When interrupt is not requested for VM86 call, make a fake exit point and push the address onto stack as we do for INTn emulation. This avoids stack underflow when we encounter RETF instruction in VM86 mode. Lack of this exit point actually caused page fault in VM86 mode with VESA module when we resume from suspend state[1]. - Remove unnecessary CLI and STI instructions from BIOS interrupt emulation. INTn and IRET must be able to emulate the flag correctly. Reported by: gavin [1] Tested by: gavin (early revision) MFC after: 3 days END K 10 svn:author V 4 bapt K 8 svn:date V 27 2012-04-16T20:41:25.898704Z K 7 svn:log V 213 - Use _PATH_TMP instead of hardcoded /tmp - more style(9) fixes - some refactoring - better error detection - Add the DPADD to Makefile Submitted by: Garrett Cooper Approved by: des (mentor) END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T21:22:02.503262Z K 7 svn:log V 440 - Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6.27 but GNU libc used it without checking its kernel version, e. g., Fedora 10. - Move pipe(2) implementation for Linuxulator from MD files to MI file, sys/compat/linux/linux_file.c. There is no MD code for this syscall at all. - Correct an argument type for pipe() from l_ulong * to l_int *. Probably this was the source of MI/MD confusion. Reviewed by: emulation END K 10 svn:author V 3 dim K 8 svn:date V 27 2012-04-16T21:23:25.548109Z K 7 svn:log V 224 Upgrade our copy of llvm/clang to trunk r154661, in preparation of the upcoming 3.1 release (expected in a few weeks). Preliminary release notes can be found at: MFC after: 2 weeks END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T21:24:23.254622Z K 7 svn:log V 19 Regen for r234352. END K 10 svn:author V 3 dim K 8 svn:date V 27 2012-04-16T21:28:04.811611Z K 7 svn:log V 81 Bump __FreeBSD_version due to the import of a new clang 3.1 prerelease snapshot. END K 10 svn:author V 3 dim K 8 svn:date V 27 2012-04-16T21:36:55.725175Z K 7 svn:log V 164 Work around an issue on 32-bit PowerPC, where clang executable can get too big, causing 'relocation truncated to fit' errors at link time. Reviewed by: nwhitehorn END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T22:58:28.710424Z K 7 svn:log V 75 Correct arguments of stat64, fstat64 and lstat64 syscalls for Linuxulator. END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T22:59:51.058165Z K 7 svn:log V 19 Regen for r234357. END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T23:16:18.071903Z K 7 svn:log V 139 Correct an argument type of iopl syscall for Linuxulator. This also fixes a warning from Clang, i. e., "args->level < 0 is always false". END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T23:17:29.148299Z K 7 svn:log V 19 Regen for r234359. END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2012-04-16T23:19:21.942584Z K 7 svn:log V 56 Replace linux-style error code reporting to FreeBSD-way END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-16T23:29:12.020562Z K 7 svn:log V 44 Fix a Clang warning. Submitted by: arundel END K 10 svn:author V 7 dmarion K 8 svn:date V 27 2012-04-16T23:32:12.627402Z K 7 svn:log V 59 Cleanup of beaglebone conf file, now it boots from SD card END K 10 svn:author V 6 grehan K 8 svn:date V 27 2012-04-17T00:54:38.913093Z K 7 svn:log V 86 Add x2apic MSR definitions Reviewed by: jhb Obtained from: bhyve via Neel via NetApp END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-17T01:22:59.375311Z K 7 svn:log V 87 Protect the PCI space registers behind a mutex. Obtained from: Linux/OpenWRT, Atheros END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-17T01:34:49.547551Z K 7 svn:log V 32 Style(9) and white space fixes. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-17T04:31:50.371820Z K 7 svn:log V 21 Add missing #include END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-17T04:52:57.546222Z K 7 svn:log V 266 Fix the RX free list locking creation and destruction to be consistent even in the face of errors. If the RX descriptor list fails, the RX lock won't be initialised, but then the DMA free path wil try freeing it. This commit is brought to you by a working mwl(4). END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-17T06:02:41.622549Z K 7 svn:log V 138 Run the fatal proc as a proc, rather than where it currently is. Otherwise the reset path will sleep, which it can't do in this context. END K 10 svn:author V 6 jasone K 8 svn:date V 27 2012-04-17T07:22:14.099410Z K 7 svn:log V 365 Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, prior to 3.0.0 release) as contrib/jemalloc, and integrate it into libc. The code being imported by this commit diverged from lib/libc/stdlib/malloc.c in March 2010, which means that a portion of the jemalloc 1.0.0 ChangeLog entries are relevant, as are the entries for all subsequent releases. END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2012-04-17T09:02:55.753692Z K 7 svn:log V 1256 MFC r233912: mtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses a mutex after a thread has unlocked it, it event writes data to the mutex memory to clear contention bit, there is a race that other threads can lock it and unlock it, then destroy it, so it should not write data to the mutex memory if there isn't any waiter. The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It requires thread library to clear the lock word entirely, then call the WAKE2 operation to check if there is any waiter in kernel, and try to wake up a thread, if necessary, the contention bit is set again by the operation. This also mitgates the chance that other threads find the contention bit and try to enter kernel to compete with each other to wake up sleeping thread, this is unnecessary. With this change, the mutex owner is no longer holding the mutex until it reaches a point where kernel umtx queue is locked, it releases the mutex as soon as possible. Performance is improved when the mutex is contensted heavily. On Intel i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2012-04-17T09:09:14.336002Z K 7 svn:log V 1851 Merge 233103, 233912 from head: 233103: Some software think a mutex can be destroyed after it owned it, for example, it uses a serialization point like following: pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex); pthread_mutex_destroy(&muetx); They think a previous lock holder should have already left the mutex and is no longer referencing it, so they destroy it. To be maximum compatible with such code, we use IA64 version to unlock the mutex in kernel, remove the two steps unlocking code. 233912: umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses a mutex after a thread has unlocked it, it event writes data to the mutex memory to clear contention bit, there is a race that other threads can lock it and unlock it, then destroy it, so it should not write data to the mutex memory if there isn't any waiter. The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It requires thread library to clear the lock word entirely, then call the WAKE2 operation to check if there is any waiter in kernel, and try to wake up a thread, if necessary, the contention bit is set again by the operation. This also mitgates the chance that other threads find the contention bit and try to enter kernel to compete with each other to wake up sleeping thread, this is unnecessary. With this change, the mutex owner is no longer holding the mutex until it reaches a point where kernel umtx queue is locked, it releases the mutex as soon as possible. Performance is improved when the mutex is contensted heavily. On Intel i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c Special code for stable/9: And add code to detect if the UMTX_OP_MUTEX_WAKE2 is available. END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2012-04-17T09:18:06.436783Z K 7 svn:log V 491 Merge 233103 from head: Some software think a mutex can be destroyed after it owned it, for example, it uses a serialization point like following: pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex); pthread_mutex_destroy(&muetx); They think a previous lock holder should have already left the mutex and is no longer referencing it, so they destroy it. To be maximum compatible with such code, we use IA64 version to unlock the mutex in kernel, remove the two steps unlocking code. END K 10 svn:author V 5 trasz K 8 svn:date V 27 2012-04-17T10:44:28.378253Z K 7 svn:log V 161 Fix panic at boot with SD/MMC readers with no media present, introduced at r234177. Note that this is a temporary fix, until I come up with something prettier. END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-17T11:01:17.499304Z K 7 svn:log V 71 MFC r233939: Free ballooned pages with the corresponding malloc type. END K 10 svn:author V 3 mav K 8 svn:date V 27 2012-04-17T11:13:03.966243Z K 7 svn:log V 66 Add some more SCSI mode pages from SPC-4 spec. MFC after: 1 week END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-17T11:49:21.001202Z K 7 svn:log V 71 MFC r233939: Free ballooned pages with the corresponding malloc type. END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-17T11:54:01.116037Z K 7 svn:log V 62 MFC 233296,233300: Prevent fs_file NULL pointer dereference. END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-17T11:55:19.321714Z K 7 svn:log V 62 MFC 233296,233300: Prevent fs_file NULL pointer dereference. END K 10 svn:author V 5 trasz K 8 svn:date V 27 2012-04-17T13:28:14.103665Z K 7 svn:log V 76 Enforce upper bound on the input buffer length. Reported by: Mateusz Guzik END K 10 svn:author V 5 trasz K 8 svn:date V 27 2012-04-17T13:44:40.557640Z K 7 svn:log V 90 Fix panic, triggered like this: "int main() { thr_exit(); }" Submitted by: Mateusz Guzik END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-04-17T14:26:55.787393Z K 7 svn:log V 1694 Fixes to pf_route(), pf_route6(). These functions are very special, they may call into send side of IP stack, for example they call ifp->if_output(), icmp_error(), icmp6_error(), ip6_output(), and they also can perform route lookup. Even more, they can call pf_test() or pf_test6() recursively! Hence, they need dropping any pf(4) locks before. Fortunately, pf_route() and pf_route6() are called only at the very end of packet processing, so we can drop the pf(4) locks with no need re-acquire them, thus: o Drop locks in pf_route(), pf_route6() in all error cases. o Drop locks in pf_route(), pf_route6() as soon as we get information from the state, or if there is no state, or if we don't need state. More cleanups and fixes to pf_route(): - We don't need to check for m_len, pf_test() already did this. - To do route lookup we don't need to allocate 'struct route' on stack, we can just have a sockaddr and rtentry pointer. - We need rtentry for a quite short time, so it is better to avoid its unlocking and refcounting. - In case if new interface (after routing rule applied) is a loopback one, then put M_SKIP_FIREWALL on mbuf, otherwise we may end up with infinite processing. [1] - Update the copy-paste from ip_output() bringing in TSO and SCTP support. - Reduce number of byte order swaps. More cleanups and fixes to pf_route6(): - We don't need to check for m_len, pf_test() already did this. - We don't need struct route_in6 on stack, a sockaddr_in6 would be enough. - In case if new interface (after routing rule applied) is a loopback one, then put M_SKIP_FIREWALL on mbuf, otherwise we may end up with infinite processing. [1] Discussed with: eri [1] END K 10 svn:author V 5 trasz K 8 svn:date V 27 2012-04-17T14:31:02.571917Z K 7 svn:log V 726 Stop treating system processes as special. This fixes panics like the one triggered by this: # kldload geom_vinum # pwait `pgrep -S gv_worker` & # kldunload geom_vinum or this: GEOM_JOURNAL: Shutting down geom gjournal 3464572051. panic: destroying non-empty racct: 1 allocated for resource 6 which were tracked by jh@ to be caused by checking p->p_flag, while it wasn't initialised yet. Basically, during fork, the code checked p_flag, concluded the process isn't marked as P_SYSTEM, incremented the counter, and later on, when exiting, checked that the process was marked as P_SYSTEM, and thus didn't decrement it. Also, I believe there wasn't any good reason for checking P_SYSTEM in the first place. Tested by: jh END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-04-17T14:37:29.869989Z K 7 svn:log V 266 Add MTAG_PERSISTENT to pf(4) tags. In OpenBSD they store the pf(4) information right in the mbuf header, and a persistent tag gives us similar behavior. This flag is crucial for infinite recursion protection in the pf_route() and pf_route6(). Discussed with: eri END K 10 svn:author V 5 trasz K 8 svn:date V 27 2012-04-17T14:54:00.251559Z K 7 svn:log V 382 Fix bug where NFSv4 ACL enforcement code wouldn't unconditionally allow the owner to read and write ACL and file attributes when there was no entry with subject matching the owner. In other words, 'getfacl meh' shouldn't fail for the owner if the ACL looks like this: # file: meh # owner: trasz # group: wheel user:root:------a-------:------:allow Reported by: kientzle END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-17T16:28:22.152964Z K 7 svn:log V 864 Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. The primary changes are that the user of the interface no longer needs to manage the mount-mutex locking and that the vnode that is returned has its mutex locked (thus avoiding the need to check to see if its is DOOMED or other possible end of life senarios). To minimize compatibility issues for third-party developers, the old MNT_VNODE_FOREACH interface will remain available so that this change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH will be removed in head. The reason for this update is to prepare for the addition of the MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T16:57:51.613591Z K 7 svn:log V 101 Replacement for the old arp_update_event. This one allows you to track state changes of an llentry. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T17:08:50.914191Z K 7 svn:log V 125 Rename TCP_OFFLOAD_DISABLE to TCP_OFFLOAD (with its meaning flipped, of course). Enable it in GENERIC on amd64 only for now. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T17:59:01.947929Z K 7 svn:log V 320 Replacement toedev/toecore interface. Interfaces in the toedev struct are all the hooks a TOE driver exposes to the kernel (toe_usrreqs etc. will all be retired). A few helper functions for use by a TOE driver will also be added to this module. All TOE drivers are expected to have a dependency on the toecore module. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T19:42:55.275410Z K 7 svn:log V 40 Remove unused parameter from tod_input. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-04-17T19:55:31.744040Z K 7 svn:log V 54 MFC 234059: Recognize the RDRAND instruction feature. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-04-17T19:55:55.435816Z K 7 svn:log V 54 MFC 234059: Recognize the RDRAND instruction feature. END K 10 svn:author V 7 dmarion K 8 svn:date V 27 2012-04-17T20:13:45.445773Z K 7 svn:log V 29 comment out unused functions END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2012-04-17T20:16:49.305250Z K 7 svn:log V 37 add newline at the EOF. gcc wants it END K 10 svn:author V 6 jasone K 8 svn:date V 27 2012-04-17T20:21:04.327786Z K 7 svn:log V 55 Add an UPDATING entry for the contrib/jemalloc import. END K 10 svn:author V 6 jasone K 8 svn:date V 27 2012-04-17T20:35:54.308194Z K 7 svn:log V 54 Update directions on how to disable malloc debugging. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T20:43:46.982182Z K 7 svn:log V 1099 Changes to the TCP offload code in the kernel. input: - Deliver stray packets for an offloaded connection to the TOE driver handling the connection. - Inform the TOE driver when received data is consumed from the socket buffer. This allows for forward progress in the rx path. output: - Have one central catch-all in tcp_output instead of various tcp_output_foo routines. This ensures that the kernel never outputs anything for an offloaded connection and always kicks the TOE driver's tx routine instead. timers: - Do not arm any TCP timer for an offloaded connection. syncache: - Update the TOE driver when the entry it sought to add to the syncache is added or removed. The kernel can call on a TOE driver to respond to a SYN anytime for an entry in the syncache so the TOE driver is expected to maintain state for entries that were added but have not been deleted yet. - Do not skip any syncache checks simply because the entry is being added by a hardware TOE. ctloutput - Inform the TOE driver when setsockopt(2) changes any tcp(4) option of an offloaded socket. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T20:47:11.044668Z K 7 svn:log V 53 Allow ifconfig to display, set, and clear IFCAP_TOE. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-17T20:54:32.656349Z K 7 svn:log V 71 Have netstat display "toe" instead of "tcp" for offloaded connections. END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-17T21:46:59.240730Z K 7 svn:log V 586 Drop export of vdestroy() function from kern/vfs_subr.c as it is used only as a helper function in that file. Replace sole call to vbusy() with inline code in vholdl(). Replace sole calls to vfree() and vdestroy() with inline code in vdropl(). The Clang compiler already inlines these functions, so they do not show up in a kernel backtrace which is confusing. Also you cannot set their frame in kgdb which means that it is impossible to view their local variables. So, while the produced code is unchanged, the debugging should be easier. Discussed with: kib MFC after: 2 weeks END K 10 svn:author V 7 dmarion K 8 svn:date V 27 2012-04-17T21:55:35.943836Z K 7 svn:log V 67 My initial work on tegra Uart, timers and interrupts should work. END K 10 svn:author V 6 jasone K 8 svn:date V 27 2012-04-17T22:05:55.518605Z K 7 svn:log V 202 Import jemalloc b57d3ec571c6551231be62b7bf92c084a8c8291c (dev branch, prior to 3.0.0 release), which supports atomic operations based on atomic(9). This should fix build failures for several platforms. END K 10 svn:author V 7 thompsa K 8 svn:date V 27 2012-04-18T01:39:14.583753Z K 7 svn:log V 101 Remove KASSERTS, they do not add any value here since the pointer is about to be derefernced anyway. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T04:39:12.507748Z K 7 svn:log V 106 MFC r233175: Make kern.geom.part node not static. Also add CTLFLAG_TUN to the check_integrity sysctl. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T04:39:37.128842Z K 7 svn:log V 106 MFC r233175: Make kern.geom.part node not static. Also add CTLFLAG_TUN to the check_integrity sysctl. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T04:59:47.773724Z K 7 svn:log V 1017 MFC r233176: Add new GEOM_PART_LDM module that implements the Logical Disk Manager scheme. The LDM is a logical volume manager for MS Windows NT and it is also known as dynamic volumes. It supports about 2000 partitions and also provides the capability for software RAID implementations. This version implements only partitioning scheme capability and based on the linux-ntfs project documentation and several publications across the Web. NOTE: JBOD, RAID0 and RAID5 volumes aren't supported. An access to the LDM metadata is read-only. When LDM is on the disk partitioned with MBR we can also destroy metadata. For the GPT partitioned disks destroy action is not supported. MFC r233177: Connect geom_part_ldm module to the build. MFC r233178: Connect geom_part_ldm to the kernel build. MFC r233181: Add CTLFLAG_TUN to sysctls. MFC r233651: Do proper cleanup for the GPT case when an error occurs. MFC r233652: VMDB offset should be greater than logical volume size only for MBR. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T05:00:25.892330Z K 7 svn:log V 1017 MFC r233176: Add new GEOM_PART_LDM module that implements the Logical Disk Manager scheme. The LDM is a logical volume manager for MS Windows NT and it is also known as dynamic volumes. It supports about 2000 partitions and also provides the capability for software RAID implementations. This version implements only partitioning scheme capability and based on the linux-ntfs project documentation and several publications across the Web. NOTE: JBOD, RAID0 and RAID5 volumes aren't supported. An access to the LDM metadata is read-only. When LDM is on the disk partitioned with MBR we can also destroy metadata. For the GPT partitioned disks destroy action is not supported. MFC r233177: Connect geom_part_ldm module to the build. MFC r233178: Connect geom_part_ldm to the kernel build. MFC r233181: Add CTLFLAG_TUN to sysctls. MFC r233651: Do proper cleanup for the GPT case when an error occurs. MFC r233652: VMDB offset should be greater than logical volume size only for MBR. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T05:11:52.297892Z K 7 svn:log V 66 MFC r233179: Document GEOM_PART_LDM scheme and partition types. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T05:12:17.630488Z K 7 svn:log V 66 MFC r233179: Document GEOM_PART_LDM scheme and partition types. END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T05:16:02.359856Z K 7 svn:log V 144 MFC r234122: It seems that libdisk(3) incorrectly sets d_secperunit value. Automatically fix it like GEOM_PART_BSD does. PR: bin/165789 END K 10 svn:author V 2 ae K 8 svn:date V 27 2012-04-18T05:16:20.183672Z K 7 svn:log V 144 MFC r234122: It seems that libdisk(3) incorrectly sets d_secperunit value. Automatically fix it like GEOM_PART_BSD does. PR: bin/165789 END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-18T07:02:53.582164Z K 7 svn:log V 20 Fix typo in ".PATH" END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-04-18T08:15:55.773872Z K 7 svn:log V 48 Add installation/upgrade instructions for 8.3R. END K 10 svn:author V 3 mav K 8 svn:date V 27 2012-04-18T08:55:26.488721Z K 7 svn:log V 155 Alike to SCSI make adaclose() to not return error if device gone. This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS. MFC after: 1 week END K 10 svn:author V 3 mav K 8 svn:date V 27 2012-04-18T09:42:14.408637Z K 7 svn:log V 725 Some improvements to GEOM MULTIPATH: - Implement "configure" command to allow switching operation mode of running device on-fly without destroying and recreation. - Implement Active/Read mode as hybrid of Active/Active and Active/Passive. In this mode all paths not marked FAIL may handle reads same time, but unlike Active/Active only one path handles write requests at any point in time. It allows to closer follow original write request order if above layers need it for data consistency (not waiting for requisite write completion before sending dependent write). - Hide duplicate messages about device status change. - Remove periodic thread wake up with 10Hz rate. MFC after: 2 weeks Sponsored by: iXsystems, Inc. END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-04-18T10:23:42.238636Z K 7 svn:log V 153 Fix string buffer overflow when preparing the line of output. PR: bin/161739 Submitted by: Jeremy Chadwick MFC after: 1 week END K 10 svn:author V 5 marck K 8 svn:date V 27 2012-04-18T11:59:03.295562Z K 7 svn:log V 185 VMware environments are not unusual now. Add VMware partitions recognition (both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part. Reviewed by: ae Approved by: ae MFC after: 2 weeks END K 10 svn:author V 6 thomas K 8 svn:date V 27 2012-04-18T12:50:13.496446Z K 7 svn:log V 20 Fix typo in comment END K 10 svn:author V 3 des K 8 svn:date V 27 2012-04-18T12:51:48.700267Z K 7 svn:log V 45 Support remote backups - both push and pull. END K 10 svn:author V 5 trasz K 8 svn:date V 27 2012-04-18T13:50:17.051954Z K 7 svn:log V 7 Style. END K 10 svn:author V 2 jh K 8 svn:date V 27 2012-04-18T15:19:00.566046Z K 7 svn:log V 81 The part about exec atime no longer applies in the comment. Pointed out by: bde END K 10 svn:author V 2 jh K 8 svn:date V 27 2012-04-18T15:22:08.212299Z K 7 svn:log V 121 Return EOPNOTSUPP rather than EPERM for the SF_SNAPSHOT flag because tmpfs doesn't support snapshots. Suggested by: bde END K 10 svn:author V 5 maxim K 8 svn:date V 27 2012-04-18T15:23:21.756811Z K 7 svn:log V 29 o FreeBSD 8.3-RELEASE added. END K 10 svn:author V 3 gnn K 8 svn:date V 27 2012-04-18T16:29:55.323504Z K 7 svn:log V 105 Set SIGCANCEL to SIGTHR as part of some cleanup of DTrace code. Reviewed by: davidxu@ MFC after: 1 week END K 10 svn:author V 8 jpaetzel K 8 svn:date V 27 2012-04-18T16:47:57.460855Z K 7 svn:log V 130 Unbreak tinderbox. Fix FreeBSD paradigms in the upstream code. PR: bin/166933 Submitted by: Garrett Cooper END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-18T17:12:04.221039Z K 7 svn:log V 18 proper #includes. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2012-04-18T17:44:05.130297Z K 7 svn:log V 98 Compensate for the replacement of uart_cpu_{amd64|i386}.c with uart_cpu_x86.c Pointy hat: marcel END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-04-18T18:11:32.008270Z K 7 svn:log V 26 Merge from HEAD @ 234423. END K 10 svn:author V 8 ambrisko K 8 svn:date V 27 2012-04-18T18:31:11.295360Z K 7 svn:log V 540 MFC r233711: Major update to driver to support for Drake Skinny and ThunderBolt cards. MFC r233768: Change typedef atomic_t to struct mfi_atomic to avoid name space collision and some couple more style changes. MFC r233805: Move struct megasas_sge from mfi_ioctl.h to mfivar.h so we can remove including machine/bus.h. Add some more mfi_ prefixes to avoid name space pollution. MFC r233877: - Do not include machine/atomic.h. It is no longer necessary since r233768. - Remove bogus "atomic" macros and a read-only variable from softc. END K 10 svn:author V 6 dteske K 8 svn:date V 27 2012-04-18T18:35:19.779579Z K 7 svn:log V 61 Add myself as a new committer. Approved by: emaste (mentor) END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-04-18T18:37:56.634201Z K 7 svn:log V 426 Extract embed scope id and set it to sin6_scope_id in struct sockaddr_in6 for userland from the kernel via routing socket or sysctl. The net.inet6.ip6.deembed_scopeid sysctl variable controls this behavior. The default value is 1, and 0 means no de-embed. De-embed of scope id in userland utilities have been removed except for netstat(1) because it directly uses kvm to read the FIB entries, not sysctl or routing socket. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-18T18:43:01.651948Z K 7 svn:log V 33 T3 TCP offload and iWARP driver. END K 10 svn:author V 8 ambrisko K 8 svn:date V 27 2012-04-18T18:58:18.798520Z K 7 svn:log V 477 MFC r233713 Remove the magic mfi_array is 288 bytes and just use the sizeof the array since it is not 288 bytes. Change reporting of a "SYSTEM" disk to "JBOD" to match LSI MegaCli and firmware reporting. This means that mfiutil command to "create jbod" is now a little confusing since a RAID per drive is not really what LSI defines JBOD to be. This should be fixed in the future and support added to really create LSI JBOD and enable that feature on cards that support it. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-18T18:59:27.957716Z K 7 svn:log V 48 A couple of minor fixes to the old rdma module. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-04-18T18:59:47.148175Z K 7 svn:log V 488 Make usbusN interface clonable and usbdump(8) create the interface dynamically when necessary. This mitigates the problem that the extra pseudo-interfaces enlarge the interface list and confuse the user. The hw.usb.no_pf knob has been removed. Instead of using IFF_CANTCONFIG, the usbusN interfaces reject any ioctls for interface configuration intentionally. Also, set ifp->if_afdata[AF_INET6] to NULL to eliminate INET6-specific handling such as ND6 options. Reviewed by: hselasky END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-04-18T19:11:03.604609Z K 7 svn:log V 325 Add multiple FIB support to route(8). An -fib option has been added to specify the target FIBs. The is a comma-separated list of FIB numbers and/or a range of FIBs like the following: # route add -inet 10.1.1.0/24 192.168.2.1 -fib 2,4,6 # route add -inet 10.1.1.0/24 192.168.2.1 -fib 0-3,5,7-8 END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-18T19:11:21.051303Z K 7 svn:log V 187 - Switch krping to build against the new OFED code. - Add a "memlimit" option to krping that limits the memory region from where its buffers are allocated from. Obtained from: Chelsio END K 10 svn:author V 8 ambrisko K 8 svn:date V 27 2012-04-18T19:15:59.909952Z K 7 svn:log V 229 MFC r230778 When detaching an AIO or LIO requests grab the lock and tell knlist_remove that we have the lock now. This cleans up a locking panic ASSERT when knlist_empty is called without a lock when INVARIANTS etc. are turned. END K 10 svn:author V 6 cherry K 8 svn:date V 27 2012-04-18T19:18:10.770122Z K 7 svn:log V 135 Initialise the base pointer to the actual base of the boottime stack. Modify comments to reflect this. Approved by: gibbs (implicit) END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-04-18T19:25:37.841155Z K 7 svn:log V 28 Fix typos. Spotted by: bjk END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-18T19:30:22.255723Z K 7 svn:log V 81 Fix a memory leak of M_VNODE_MARKER introduced in 234386. Found by: Peter Holm END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-18T19:31:52.331484Z K 7 svn:log V 100 Add a socket (for additional context) to a couple of iw_cm data structures. Obtained from: Chelsio END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-18T19:34:20.760438Z K 7 svn:log V 87 Delete a no longer useful VNASSERT missed during changes in 234400. Suggested by: kib END K 10 svn:author V 3 dim K 8 svn:date V 27 2012-04-18T20:32:07.862970Z K 7 svn:log V 326 MFC r234058: In kdump's mkioctls script, use '${CPP}' instead of hardcodedly using 'gcc -E'. This fixes building when WITH_CLANG_IS_CC is in effect. Report by: Niclas Zeising MFC r234060: Since truss also uses kdump's mkioctls script, pass the value of ${CPP} there too, similar to r234058. END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2012-04-18T21:08:53.332795Z K 7 svn:log V 105 Make twl_vreg_is_regulator_enabled report erroneus condition by returning -1 my previous "fix" was wrong END K 10 svn:author V 6 dteske K 8 svn:date V 27 2012-04-18T22:56:46.634243Z K 7 svn:log V 88 Add my birth date/place to the calendar as new committer. Approved by: emaste (mentor) END K 10 svn:author V 4 gber K 8 svn:date V 27 2012-04-19T02:30:04.981243Z K 7 svn:log V 12 IFC @234446 END K 10 svn:author V 6 obrien K 8 svn:date V 27 2012-04-19T02:55:13.853523Z K 7 svn:log V 70 MFC r215821: Add a missing CTL description from CVS revision 1.147. END K 10 svn:author V 6 obrien K 8 svn:date V 27 2012-04-19T03:20:13.104263Z K 7 svn:log V 32 Update file(1) to version 5.11. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-19T03:26:21.271996Z K 7 svn:log V 584 Stop using the hardware register value byte order swapping for now, at least until I can root cause what's going on. The only platform I've seen this on is the AR9220 when attached to the AR71xx CPUs. I get immediate PCIe bus errors and all subsequent accesses cause further MIPS bus exceptions. I don't have any other big-endian platforms to test this on. If I get a chance (or two), I'll try to whack this on a bus analyser and see exactly what happens. I'd rather leave this on, especially for slower, embedded platforms. But the #ifdef hell is something I'm trying to avoid. END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2012-04-19T04:07:55.630666Z K 7 svn:log V 142 Fix memory -> device transfer. There seemed to be some mix-up in register names. Proper initialization is described in section 16.4.14 of TRM END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-04-19T07:43:28.076398Z K 7 svn:log V 82 MFC r234336: Fix typo miror -> mirror Reported by: Glen Barber END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-04-19T07:43:44.919654Z K 7 svn:log V 82 MFC r234336: Fix typo miror -> mirror Reported by: Glen Barber END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-04-19T10:17:28.343864Z K 7 svn:log V 256 MFC r234170: Propagate the current state of rtld_bind_lock to dlopen_object() calls through the filter loading call chain. This fixes attempts to write-lock the already locked rtld_bind_lock when filter loading is initiated by relocation of dlopening dso. END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-04-19T10:36:23.683104Z K 7 svn:log V 389 MFC r234172: Add thread-private flag to indicate that error value is already placed in td_errno. Flag is supposed to be used by syscalls returning EJUSTRETURN because errno was already placed into the usermode frame by a call to set_syscall_retval(9). Both ktrace and dtrace get errno value from td_errno if the flag is set. Use the flag to fix sigsuspend(2) error return ktrace records. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-04-19T10:48:25.217479Z K 7 svn:log V 221 Create hash table for the source nodes instead of rb-tree. Locking is per hash slot. At normal runtime these locks are obtained on state creation, prior to id hash lock or key hash lock. Expiry thread also obtains them. END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-04-19T10:53:17.235802Z K 7 svn:log V 389 MFC r234172: Add thread-private flag to indicate that error value is already placed in td_errno. Flag is supposed to be used by syscalls returning EJUSTRETURN because errno was already placed into the usermode frame by a call to set_syscall_retval(9). Both ktrace and dtrace get errno value from td_errno if the flag is set. Use the flag to fix sigsuspend(2) error return ktrace records. END K 10 svn:author V 3 mav K 8 svn:date V 27 2012-04-19T12:30:12.704365Z K 7 svn:log V 201 Add to GEOM RAID class module for reading non-degraded RAID5 volumes and some environment to differentiate 4 possible RAID5 on-disk layouts. Tested with Intel and AMD RAID BIOSes. MFC after: 2 weeks END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2012-04-19T12:43:19.982345Z K 7 svn:log V 296 Fix a bug where we copy out more data from a mbuf chain that are actually in it. This happens when SCTP receives an unknown chunk, which requires the sending of an ERROR chunk, and there is no final padding but the chunk is not 4-byte aligned. Reported by yueting via rwatson@ MFC after: 3 days END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2012-04-19T12:47:18.922739Z K 7 svn:log V 39 Fix reported errno. MFC after: 3 days END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2012-04-19T13:11:17.721850Z K 7 svn:log V 69 Use the same pattern for mbuf logging everywhere. MFC after: 3 days END K 10 svn:author V 2 ed K 8 svn:date V 27 2012-04-19T15:28:15.123777Z K 7 svn:log V 228 Properly use SHA1_Final() instead of SHA_Final(). In this case it doesn't really matter, as long as we turn a TTY name into a set of shuffled bytes. Still, for correctness we should use the proper function. MFC after: 2 weeks END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-19T15:29:09.921238Z K 7 svn:log V 60 Document swi_remove(9). Reviewed by: jhb MFC after: 1 week END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2012-04-19T15:30:15.402187Z K 7 svn:log V 39 Whitespace changes. MFC after: 3 days END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-04-19T16:13:15.494064Z K 7 svn:log V 114 - Update the rest of struct ithd references. - net_ih and softclock_ih cookies have gone away. MFC after: 1 week END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-19T18:03:24.336783Z K 7 svn:log V 1288 MFC of 233627, 234024, 234025, and 234026 Restore per mount-point counts of synchronous and asynchronous reads and writes associated with UFS and MSDOS filesystems. MFS 233627: Keep track of the mount point associated with a special device to enable the collection of counts of synchronous and asynchronous reads and writes for its associated filesystem. The counts are displayed using `mount -v'. Ensure that buffers used for paging indicate the vnode from which they are operating so that counts of paging I/O operations from the filesystem are collected. This checkin only adds the setting of the mount point for the UFS/FFS filesystem, but it would be trivial to add the setting and clearing of the mount point at filesystem mount/unmount time for other filesystems too. Reviewed by: kib MFC 234024: Drop an unnecessary setting of si_mountpt when updating a UFS mount point. Clearly it must have been set when the mount was done. Reviewed by: kib MFC 234025: Add I/O accounting to msdos filesystem. Suggested and reviewed by: kib MFC 234026: Expand locking around identification of filesystem mount point when accounting for I/O counts at completion of I/O operation. Also switch from using global devmtx to vnode mutex to reduce contention. Suggested and reviewed by: kib END K 10 svn:author V 4 jkim K 8 svn:date V 27 2012-04-19T20:11:43.360624Z K 7 svn:log V 477 MFC: r234350 - When interrupt is not requested for VM86 call, make a fake exit point and push the address onto stack as we do for INTn emulation. This avoids stack underflow when we encounter RETF instruction in VM86 mode. Lack of this exit point actually caused page fault in VM86 mode with VESA module when we resume from suspend state. - Remove unnecessary CLI and STI instructions from BIOS interrupt emulation. INTn and IRET must be able to emulate the flag correctly. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2012-04-19T20:44:40.074578Z K 7 svn:log V 332 MFV r234164/MFC r234165: The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes. This change was noticed by ISC at: https://lists.isc.org/pipermail/bind-users/2012-April/087345.html and verified by me both by comparing the contents of the old and new distfiles and by verifying the PGP signature on the new distfile. END K 10 svn:author V 2 ed K 8 svn:date V 27 2012-04-19T21:12:08.513571Z K 7 svn:log V 450 Do a better job at determining the username of the login session. When multiple users share the same UID, the old code will simply pick an arbitrary username to attach to the utmpx entries. Make the code a bit more accurate by first checking whether getlogin() returns a username which corresponds to the uid of the calling process. If this fails, simply fall back to picking an arbitrary username. Reported by: saurik on GitHub MFC after: 2 weeks END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-19T22:22:21.699313Z K 7 svn:log V 2639 MFC of 233817: A file cannot be deallocated until its last name has been removed and it is no longer referenced by a user process. The inode for a file whose name has been removed, but is still referenced at the time of a crash will still be allocated in the filesystem, but will have no references (e.g., they will have no names referencing them from any directory). With traditional soft updates these unreferenced inodes will be found and reclaimed when the background fsck is run. When using journaled soft updates, the kernel must keep track of these inodes so that it can find and reclaim them during the cleanup process. Their existence cannot be stored in the journal as the journal only handles short-term events, and they may persist for days. So, they are tracked by keeping them in a linked list whose head pointer is stored in the superblock. The journal tracks them only until their linked list pointers have been commited to disk. Part of the cleanup process involves traversing the list of unreferenced inodes and reclaiming them. This bug was triggered when confusion arose in the commit steps of keeping the unreferenced-inode linked list coherent on disk. Notably, a race between the link() system call adding a link-count to a file and the unlink() system call removing a link-count to the file. Here if the unlink() ran after link() had looked up the file but before link() had incremented the link-count of the file, the file's link-count would drop to zero before the link() incremented it back up to one. If the file was referenced by a user process, the first transition through zero made it appear that it should be added to the unreferenced-inode list when in fact it should not have been added. If the new name created by link() was deleted within a few seconds (with the file still referenced by a user process) it would legitimately be a candidate for addition to the unreferenced-inode list. The result was that there were two attempts to add the same inode to the unreferenced-inode list which scrambled the unreferenced-inode list's pointers leading to a panic. The fix is to detect and avoid the false attempt at adding it to the unreferenced-inode list by having the link() system call check to see if the link count is zero before it increments it. If it is, the link() fails with ENOENT (showing that it has failed the link()/unlink() race). While tracking down this bug, we have added additional assertions to detect the problem sooner and also simplified some of the code. Reported by: Kirk Russell Fix submitted by: Jeff Roberson Tested by: Peter Holm PR: kern/159971 END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-19T22:28:42.989591Z K 7 svn:log V 36 MFC of 234157: Whitespace cleanup. END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-19T22:37:24.943941Z K 7 svn:log V 36 MFC of 234157: Whitespace cleanup. END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-19T22:42:28.017284Z K 7 svn:log V 345 MFC of 234158: Export vinactive() from kern/vfs_subr.c (e.g., make it no longer static and declare its prototype in sys/vnode.h) so that it can be called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c) instead of the body of vinactive() being cut and pasted into process_deferred_inactive(). Reviewed by: kib MFC after: 2 weeks END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-19T23:04:35.956473Z K 7 svn:log V 324 MFC of 234158: Export vinactive() from kern/vfs_subr.c (e.g., make it no longer static and declare its prototype in sys/vnode.h) so that it can be called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c) instead of the body of vinactive() being cut and pasted into process_deferred_inactive(). Reviewed by: kib END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-04-20T00:34:15.896894Z K 7 svn:log V 4 MFC END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2012-04-20T00:45:23.753425Z K 7 svn:log V 187 MFC r233949,233957,233964,234149,234155: More PMAP concurrency and performance improvements by only flushing icaches when needed and executing ptesync only when architecturally required. END K 10 svn:author V 4 gber K 8 svn:date V 27 2012-04-20T02:38:41.202381Z K 7 svn:log V 211 nandfs: Fix build with clang - fix error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks END K 10 svn:author V 4 gber K 8 svn:date V 27 2012-04-20T02:47:35.737212Z K 7 svn:log V 104 nandtool: Adjust man page. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks END K 10 svn:author V 4 gber K 8 svn:date V 27 2012-04-20T03:02:07.401822Z K 7 svn:log V 970 nandfs: Fixes. - replace error numbers with proper macros - get rid of some unused fields in fsdata and super block - when erasing segment invalidate gc buffers that still point to it - flag segments that are going to be erased (this flag should never hit storage - it is only so that cleaner does not try to clear one segment twice) - place some asserts - add veryfing FS revision at mount time - rmdir without this operation left invalid data in inode - file created right after deleted directory appeared as directory - reduce inode size of removed directory to 0 (similar to ext2fs, msdosfs) - check if inode has any links during lookup (similar to ufs) - protect write entry points by very same lock used to protect segment construction - this servers as our own version of vfs_write_suspend - ignore MNT_LAZY syncs - this is a hack used to ignore periodic syncs from mnt_syncer Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks END K 10 svn:author V 4 gber K 8 svn:date V 27 2012-04-20T03:12:02.400339Z K 7 svn:log V 162 nandfs: Revert changes in sys/kern files. Those workarounds are not needed anymore. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks END K 10 svn:author V 7 delphij K 8 svn:date V 27 2012-04-20T04:40:39.433174Z K 7 svn:log V 11 Fix build. END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-20T06:50:44.403289Z K 7 svn:log V 749 This change creates a new list of active vnodes associated with a mount point. Active vnodes are those with a non-zero use or hold count, e.g., those vnodes that are not on the free list. Note that this list is in addition to the list of all the vnodes associated with a mount point. To avoid adding another set of linkage pointers to the vnode structure, the active list uses the existing linkage pointers used by the free list (previously named v_freelist, now renamed v_actfreelist). This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2012-04-20T07:00:28.982886Z K 7 svn:log V 1451 This update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point to replace MNT_VNODE_FOREACH_ALL in the vfs_msync, ffs_sync_lazy, and qsync routines. The vfs_msync routine is run every 30 seconds for every writably mounted filesystem. It ensures that any files mmap'ed from the filesystem with modified pages have those pages queued to be written back to the file from which they are mapped. The ffs_lazy_sync and qsync routines are run every 30 seconds for every writably mounted UFS/FFS filesystem. The ffs_lazy_sync routine ensures that any files that have been accessed in the previous 30 seconds have had their access times queued for updating in the filesystem. The qsync routine ensures that any files with modified quotas have those quotas queued to be written back to their associated quota file. In a system configured with 250,000 vnodes, less than 1000 are typically active at any point in time. Prior to this change all 250,000 vnodes would be locked and inspected twice every minute by the syncer. For UFS/FFS filesystems they would be locked and inspected six times every minute (twice by each of these three routines since each of these routines does its own pass over the vnodes associated with a mount point). With this change the syncer now locks and inspects only the tiny set of vnodes that are active. Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks END K 10 svn:author V 2 np K 8 svn:date V 27 2012-04-20T07:24:54.629770Z K 7 svn:log V 10 Fix typo. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-04-20T08:26:05.166148Z K 7 svn:log V 1063 Introduce the matching PCI ath(4) fixup code from ar71xx_pci into ar724x_pci.c. * Move out the code which populates the firmware into ar71xx_fixup.c * Shuffle around the ar724x fixup code to match what the ar71xx fixup code does. I've validated this on an AR7240 with AR9285 on-board NIC. It doesn't yet load, as the AR9285 EEPROM code needs to be made "flash aware." TODO: * Validate that I haven't broken AR71xx * Test AR9285/AR9287 onboard NICs, complete with EEPROM code changes * Port over the needed BAR hacks for AR7240, AR7241 and AR7242 from Linux OpenWRT. The current WAR has only been tested on the AR7240 and I'm not sure the way the BAR register is treated is "right". The "fixup" method here is right when setting the BAR for local access - ie, the BAR address is either 0xffff (AR7240) or 0x1000ffff (AR7241/AR7242), but the ath9k-fixup.c code (Linux OpenWRT) does this when setting the initial "fixup" BAR. It then restores the original BAR. I'll have to read the ar724x PCI bus glue to see what other special cases await. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-04-20T09:43:42.482103Z K 7 svn:log V 90 Use monotonic time_uptime to drive expiry of states, source nodes, fragments, thresholds. END