summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r266483marck2014-05-281-0/+24
| | | | | | Document VMware-related filesystems additions. Reviewed by: jmg
* MFC 262695, 262708, 262709, 262710, 262711, 262728, 262870, 262877, 262880,ian2014-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 262885, 262891, 262903, imx6: Add a tunable to set the number of active cores, enable SMP by default. ffec: Fix multicast filtering. Allwinner a10/a20... - Add gpio and clock bits for A10/A20's EMAC ethernet controller driver - EMAC gpio configuration - EMAC clock activation - Add Static Random Access Memory controller driver for A10/A20. A10/A20's SRAM is used by devices, such as CPU, EMAC, for extra fast memory or as cache. - Add EMAC 10/100 Ethernet controller driver for A10/A20. It is available mostly in A10 devices like Hackberry, Marsboard, Mele A1000, A2000, A100 HTPC, cubieboard1 and A20 device like cubieboard2. TX performance can be improved using both channels 0 and 1. RX performance is poor and needs improvement with the assistance of external DMA controller in case there - Add EMAC and SRAM controller entries to FDT. - Add EMAC device to kernel config files and enable EMAC, SRAM drivers. OMAP: When calculating the MPU freq, make sure not to overflow. Vybrid: - Add driver for Port control and interrupts (PORT). - Export panel info to DTS - Reset all the layers before setup first one - Enable display nandfs: Slight code reordering to make error branch last. Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configs that have it individually. Concensus on freebsd-arm@ is that it should be included in all ARM kernels. Fix the arm sys_sigreturn(): its argument is a struct ucontext, not a struct sigframe containing the struct ucontext.
* MFC: r265535marius2014-05-141-98/+90
| | | | | | | | | - Sprinkle const and static as appropriate. - Fix whitespace bugs. - Remove pointless returns in void functions. - Nuke pointless switch cases mirroring the default. Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC: r256561marius2014-05-141-7/+10
| | | | | | Prevent an unlikely, but real double free issue in gvinum(8). Coverity ID: 1018965
* MFC: r265454marius2014-05-142-21/+36
| | | | | | | | | - Allow foot shooting with the resetconfig command via the -f option. - Fix typos preventing -f to actually work with the create command. - Initialize flags to zero rather than using stack garbage when handling the grow command. Sponsored by: Bally Wulff Games & Entertainment GmbH
* Merge r260524,r260540melifaro2014-05-083-3/+42
| | | | | | | | | | | r260524: Add -4/-6 shorthand for -finet/-finet6 in route(8) and netstat(8). r260540: Bump dates in nestat(1) and route(8) man pages. Fix several small errors introduced by r260524. Suggested by: glebius
* Merge r258708, r258711, r260247, r261117.melifaro2014-05-082-10/+37
| | | | | | | | | | | | | | | | | | | | r258708: Check ipfw table numbers in both user and kernel space before rule addition. Found by: Saychik Pavel <umka@localka.net> r258711: Simplify O_NAT opcode handling. r260247: Use rnh_matchaddr instead of rnh_lookup for longest-prefix match. rnh_lookup is effectively the same as rnh_matchaddr if called with empy network mask. r261117: Reorder struct ip_fw_chain: * move rarely-used fields down * move uh_lock to different cacheline * remove some usused fields
* Merge r258677.melifaro2014-05-081-2/+13
| | | | | | | | | Fix key lookup in ipfw(8) broken since r232865. Print warning for IPv4 address strings which are valid in inet_aton() but not valid in inet_pton(). (1) Found by: Özkan KIRIK <ozkan.kirik@gmail.com> Submitted by: Ian Smith <smithi@nimnet.asn.au> (1)
* MFC r264863smh2014-05-081-0/+26
| | | | | | Add information about supported NCQ functionality to camcontrol identify. Sponsored by: Multiplay
* MFC r260509:mav2014-05-081-22/+30
| | | | | | | | Replace several instances of -1 with appropriate CAM_*_WILDCARD and types. It was equal before r259397, but for good or bad, not any more for LUNs. This change fixes at least CAM debugging.
* MFC r260381:jimharris2014-05-071-2/+2
| | | | | | For "nvmecontrol devlist", show namespace sizes in terms of MB instead of GB to improve granularity of the reporting - especially for namespaces that are on the order of 1 or 2 GB.
* MFC r258071:jimharris2014-05-071-11/+24
| | | | | | Check for special status code from FIRMWARE_ACTIVATE command signifying that a reboot is required to complete activation of the requested firmware image.
* MFC: r265248marius2014-05-072-7/+11
| | | | | | Allow GEOM_VINUM to be statically compiled into the kernel. Submitted by: gleb
* MFC r262775:markj2014-04-291-1/+1
| | | | | Log the name of the file that we failed to open rather than an uninitialized buffer.
* MFC various moves of tools/regressions/ tests to the new infrastructure.jmmv2014-04-2714-0/+1155
| | | | | | | | | | | | | | | | - r263220 Migrate tools/regression/sbin/ to the new tests layout. - r263222 Add Makefile missed in r263220. - r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout. - r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout. - r263345 Expand tabs that sneaked in into spaces. - r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout. - r263348 Add Makefiles missed in r263346. - r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout. - r263388 Mark multi_test as requiring /usr/share/dict/words. - r263814 Fix path to the run.pl script to let these tests run. - r264742 Prevent building tests when bootstrapping make. This is 'make tinderbox' clean.
* MFC: r264489brueffer2014-04-231-0/+1
| | | | | | | Add a missing break in option parsing. CID: 1011452 Found with: Coverity Prevent(tm)
* MFC: r264479brueffer2014-04-231-1/+1
| | | | | | | Fix double fclose() in an error case. CID: 1006120 Found with: Coverity Prevent(tm)
* MFC r263778:dim2014-04-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC r263833: Enable parallel building for gnu/usr.bin and usr.bin/clang too.
* MFC r264039:ae2014-04-091-1/+26
| | | | Document more parition types.
* MFC r263758:mjg2014-03-311-4/+4
| | | | | | Update userspace users of hw.bus.devctl_disable. This switches the code to use hw.bus.devctl_queue instead.
* MFC r263774:dim2014-03-291-1/+0
| | | | | | | | Revert r263694, and apply a better fix to squelch unnecessary warnings from clang about possible keywords being treated as identifiers for the remainder of the translation unit (a.k.a. -Wkeyword-compat), when using libstdc++ in combination with -Wsystem-headers. This will not only fix devd, but any C++ program using libstdc++.
* MFC r262914asomers2014-03-282-13/+19
| | | | | | | sbin/devd/devd.8 sbin/devd/devd.cc Add a -q flag to devd that will suppress syslog logging at LOG_NOTICE or below.
* MFC r263694:dim2014-03-271-0/+1
| | | | | | | Apply a temporary band-aid for building devd with clang 3.4, libstdc++ and -Wsystem-headers enabled (which is the default for any non-zero WARNS level, crazily enough!). This is primarily meant to be MFC'd as soon as possible.
* MFC of 263062:mckusick2014-03-222-9/+13
| | | | | | | | | | | | | | | | | | | Avoid segment fault when attempting to clean up cylinder group buffer cache. PR: 187221 Submitted by: Petr Lampa <lampa@fit.vutbr.cz> Obtained from: Petr Lampa <lampa@fit.vutbr.cz> MFC after: 1 week MFC of 262488: Arguments for malloc and calloc should be size_t, not int. Use proper bounds check when trying to free cached memory. Spotted by: Xin Li Tested by: Dmitry Sivachenko MFC after: 2 weeks
* Bulk sync of pf changes from head, in attempt to fixup broken build Iglebius2014-03-123-2/+15
| | | | | | | | | made in r263029. Merge r257186,257215,257349,259736,261797. These changesets split pfvar.h into several smaller headers and make userland utilities to include only some of them.
* Merge r261882, r261898, r261937, r262760, r262799:glebius2014-03-111-6/+7
| | | | | | | | | | | | | | Once pf became not covered by a single mutex, many counters in it became race prone. Some just gather statistics, but some are later used in different calculations. A real problem was the race provoked underflow of the states_cur counter on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this value is used in pf_state_expires() and any state created by this rule is immediately expired. Thus, make fields states_cur, states_tot and src_nodes of struct pf_rule be counter(9)s.
* MFH (r256768): don't report an error for no-op add / removedes2014-02-271-2/+2
|
* MFC 261517,261520:jhb2014-02-181-3/+0
| | | | | Convert the license on files where I am the sole copyright holder to 2 clause BSD licenses.
* Refer newfs and growfs users to fsck_ffs instead ofbrueffer2014-02-162-2/+2
| | | | | | | fsck, the latter does not accept the referred to "-b" flag. PR: 82720 Submitted by: David D.W. Downey
* MFC: r261566brueffer2014-02-132-2/+2
| | | | | | | | Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT. PR: 185382 (based on) Submitted by: Loganaden Velvindron Reviewed by: pjd
* MFC: r261500brueffer2014-02-111-4/+36
| | | | | | Add a license (1) and do some cleanup. Approved by: Stefan Bethke (original author, by private mail) (1)
* MFC: r261496brueffer2014-02-111-3/+3
| | | | | | | | Unbreak mount_udf by passing the correct iovec length into nmount(). This has been broken since r247861. PR: bin/186193 Submitted by: Arnot Belohlavek
* MFH: r260483, r260484, r260594, r260595, r260596, r260597bapt2014-01-201-1/+16
| | | | | | | | Improve error message shown to the user when trying to load a module that is already loaded or compiled withing the kernel Point the user to dmesg(1) to get informations about why loading a module did fail instead of printing the cryptic "Exec format error" Update the BUGS section of kld(4) according the recent changes in kldload(8)
* MFC 259339asomers2014-01-101-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbin/devd/devd.cc Increase the size of devd's client socket's send buffer from the default (8k) to 128k. This prevents clients from getting POLLHUPped during event storms. For example, during zpool creation, the kernel emits a resource.fs.zfs.statechange event for every vdev in the pool. A 128k buffer is large enough to hold the statechange events for a pool with nearly 800 drives. MFC 259362 sbin/devd/devd.cc Promoting the SIGINFO handler's log message from LOG_INFO to LOG_NOTICE, and promoting the "Processing event ..." message from LOG_DEBUG to LOG_INFO. Setting the logfile to LOG_NOTICE with this change will have the same result as setting it to LOG_INFO without this change. Setting it to LOG_INFO with this change will include the useful "Processing event ..." messages that were previously at LOG_DEBUG, without including useless messages like "Pushing table". The intent of this change is that one can log "Processing event ..." without logging "Pushing table" and related messages that are sent for every event. The number of lines actually logged is reduced by about 75% by making this change and setting syslog to LOG_INFO vs setting syslog to LOG_DEBUG. etc/syslog.conf Changing the recommended loglevel to notice instead of info.
* MFC r259634:ae2014-01-102-1/+20
| | | | | | | | | | | | | | | | | | Prevent users from deactivating the last component of a mirror. MFC r259929: Add an ability to stop gmirror and clear its metadata in one command. This fixes the problem, when gmirror starts again just after stop. The problem occurs when gmirror's component has geom label with equal size. E.g. gpt and gptid have the same size as partition, diskid has the same size as entire disk. When gmirror's geom has been destroyed, glabel creates its providers and this initiate retaste. Now "gmirror destroy" command is available. It destroys geom and also erases gmirror's metadata. PR: 184985
* MFC r258357:ae2014-01-102-1/+118
| | | | | | | Add "resize" verb to gmirror(8) and such functionality to geom_mirror(4). Now it is easy to expand the size of the mirror when all its components are replaced. Also add g_resize method to geom_mirror class. It will write updated metadata to new last sector, when parent provider is resized.
* MFC r258659:trasz2014-01-021-2/+2
| | | | | | Fix warnings to not append "No error: 0". Sponsored by: The FreeBSD Foundation
* MFC r259502:trasz2014-01-021-5/+4
| | | | | | Reword the part about mutual CHAP. Sponsored by: The FreeBSD Foundation
* MFC r260068, r260069, r260076scottl2014-01-0212-109/+349
| | | | | | | | | | | | | | | | | | | | | | Add the -R option to allow fsck_ffs to restart itself when too many critical errors have been detected in a particular run. Clean up the global state variables so that a restart can happen correctly. Separate the global variables in fsck_ffs and fsdb to their own file. This fixes header sharing with fscd. Correctly initialize, static-ize, and remove global variables as needed in dir.c. This fixes a problem with lost+found directories that was causing a segfault. Correctly initialize, static-ize, and remove global variables as needed in suj.c. Initialize the suj globals before allocating the disk object, not after. Also ensure that 'preen' mode doesn't conflict with 'restart' mode Obtained from: Netflix
* MFC r260059, r260087:scottl2014-01-022-8/+31
| | | | | | | Add the '-b' flag to 'camcontrol devlist'. This prints only the existing buses and their parent sims, useful for creating a sim->bus->device map. Obtained from: Netflix
* MFC: r259089rmacklem2013-12-301-1/+14
| | | | | Document the noncontigwr NFS mount option. This is a content change.
* MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196:trociny2013-12-289-150/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257155: Make hastctl list command output current queue sizes. Reviewed by: pjd r257582 (pjd): Correct alignment. r259191: For memsync replication, hio_countdown is used not only as an indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk r259192: Add some macros to make the code more readable (no functional chages). r259193: Fix compiler warnings. r259194: In remote_send_thread, if sending a request fails don't take the request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. r259195: Send wakeup to threads waiting on empty queue before releasing the lock to decrease spurious wakeups. Submitted by: davidxu r259196: Check remote protocol version only for the first connection (when it is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection.
* MFC r258469:pluknet2013-12-251-6/+4
| | | | | | | - Purge one more reference to ad(4)[1]. - NSWAPDEV limit has gone. Noticed by: Sergey V. Dyatko [1]
* MFC r259677: swapon: Fix buffer overflow when configuring swap on GBDE.jilles2013-12-241-1/+2
| | | | PR: bin/184950
* MFC 257006asomers2013-12-131-3/+31
| | | | | | | | | sbin/geom/class/part/geom_part.c Always validate the return of find_geomcfg(). It could be NULL, for example when the geom is withering. Approved by: ken (mentor) Sponsored by: Spectra Logic Corporation
* MFC r256448, r257029;pfg2013-12-112-2/+2
| | | | | | | | | | | | | Make di_blocks unsigned in UFS1 as is the case already for UFS2. Most of the code between UFS1 and UFS2 is shared so this change is pretty safe. Not only this makes UFS1 and 2 consistent but it also matches what NetBSD and MacOS X have for some years now. UFS2: make di_extsize unsigned. di_extsize is the EA size and as such it should be unsigned. Adjust related types for consistency. Reviewed by: mckusick
* MFC r257345,257382,257388:nwhitehorn2013-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Implement extended LUN support. If PIM_EXTLUNS is set by a SIM, encode the upper 32-bits of the LUN, if possible, into the target_lun field as passed directly from the REPORT LUNs response. This allows extended LUN support to work for all LUNs with zeros in the lower 32-bits, which covers most addressing modes without breaking KBI. Behavior for drivers not setting PIM_EXTLUNS is unchanged. No user-facing interfaces are modified. Extended LUNs are stored with swizzled 16-bit word order so that, for devices implementing LUN addressing (like SCSI-2), the numerical representation of the LUN is identical with and without PIM_EXTLUNS. Thus setting PIM_EXTLUNS keeps most behavior, and user-facing LUN IDs, unchanged. This follows the strategy used in Solaris. A macro (CAM_EXTLUN_BYTE_SWIZZLE) is provided to transform a lun_id_t into a uint64_t ordered for the wire. This is the second part of work for full 64-bit extended LUN support and is designed to a bridge for stable/10 to the final 64-bit LUN code. The third and final part will involve widening lun_id_t to 64 bits and will not be MFCed. This third part will break the KBI but will keep the KPI unchanged so that all drivers that will care about this can be updated now and not require code changes between HEAD and stable/10. Reviewed by: scottl
* MFC r257531:jimharris2013-11-051-2/+0
| | | | | | | Do not exit with error status after printing data for perftest. Sponsored by: Intel Approved by: re (glebius)
* MFC r257154:trociny2013-10-311-1/+1
| | | | | | | | | | | | Merging local and remote bitmaps must be protected by hr_amp lock. This is believed to fix hastd crashes, which might occur during synchronization, triggered by the failed assertion: Assertion failed: (amp->am_memtab[ext] > 0), function activemap_write_complete, file activemap.c, line 351. Approved by: re (glebius)
* Merge r256824 from head:glebius2013-10-291-2/+2
| | | | | | | | | | | | | | | | Provide a working example line for an interface with 1 address running with CARP. Currently, we've got a problem that interface isn't IFF_UP at the time we assign it a redundant address, and the latter gets stuck in INIT state. Additional SIOCSIFFLAGS from ifconfig(8) kicks it to a working state. A proper fix is kernel side and appeared to be non-trivial, not to be checked in before 10.0-RELEASE. Submitted by: Ole Myhre <ole.myhre dataoppdrag.no> Approved by: re (kib)
OpenPOWER on IntegriCloud