summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* getopt returns an int, not a char, so use the correct data type forscottl2013-12-301-1/+1
| | | | | | the return value. Fixes powerpc tinderbox. MFC after: 2 days
* Add globs.c, missed in r260068,260069scottl2013-12-301-0/+165
| | | | | | Submitted by: peter Obtained from: Netflix MFC after: 3 Days
* Add globs.c to the build now that it's a separate file.scottl2013-12-301-1/+1
| | | | | | Reviewed by: max Obtained from: Netflix MFC after: 3 days
* Add the -R option to allow fsck_ffs to restart itself when too many criticalscottl2013-12-3010-108/+183
| | | | | | | | | | | | | | | | | | | | | | | | 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 Submitted by: scottl, max Reviewed by: max, mckusick (earlier version) Obtained from: Netflix MFC after: 3 days
* Add the '-b' flag to 'camcontrol devlist'. This prints only the existingscottl2013-12-292-8/+31
| | | | | | | buses and their parent sims, useful for creating a sim->bus->device map. Obtained from: Netflix MFC after: 3 days
* Improve wording slightly.joel2013-12-271-3/+1
|
* Add an ability to stop gmirror and clear its metadata in one command.ae2013-12-272-1/+20
| | | | | | | | | | | | | | 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. MFC after: 2 weeks
* Use feature_present(3) to determine whether to open an INET or anbz2013-12-264-4/+35
| | | | | | | | | | INET6 socket when needed to allow pfctl to work on noinet and noinet6 kernels (and try to provide a fallback using AF_LINK as best effort). Adjust the Makefile to also respect relevant src.conf(5) options for compile time decisions on INET and INET6 support. Reviewed by: glebius (no objections) MFC after: 1 week
* Minor grammar fixcrees2013-12-211-2/+1
| | | | | | PR: docs/185057 Submitted by: Yuri (yuri@rawbw.com) Approved by: gjb (mentor)
* swapon: Fix buffer overflow when configuring encrypted swap on GBDE.jilles2013-12-211-1/+2
| | | | | | PR: bin/184950 Tested by: Radim Kolar MFC after: 3 days
* Add net.inet.ip.fw.dyn_keep_states sysctl whichmelifaro2013-12-181-0/+5
| | | | | | | | | | | re-links dynamic states to default rule instead of flushing on rule deletion. This can be useful while performing ruleset reload (think about `atomic` reload via changing sets). Currently it is turned off by default. MFC after: 2 weeks Sponsored by: Yandex LLC
* Reword the part about mutual CHAP.trasz2013-12-171-5/+4
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* MFp4 @1189141:pjd2013-12-151-0/+2
| | | | | | Change casperd's zygote process title. MFC after: 1 week
* sbin/devd/devd.ccasomers2013-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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. Sponsored by: Spectra Logic Corp MFC after: 4 weeks
* sbin/devd/devd.ccasomers2013-12-131-1/+20
| | | | | | | | | | | | | | 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. Reviewed by: ian, imp Approved by: ken (mentor) Sponsored by: Spectra Logic Corp MFC after: 4 weeks
* Somehow stable/10 branch contains correct version, but head doesn't.glebius2013-12-121-1/+1
|
* Check remote protocol version only for the first connection (when ittrociny2013-12-101-6/+6
| | | | | | | | | is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. MFC after: 2 weeks
* Send wakeup to threads waiting on empty queue before releasing thetrociny2013-12-102-16/+7
| | | | | | | lock to decrease spurious wakeups. Submitted by: davidxu MFC after: 2 weeks
* In remote_send_thread, if sending a request fails don't take thetrociny2013-12-101-11/+2
| | | | | | | | | | | | | | | | | | 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. MFC after: 2 weeks
* Fix compiler warnings.trociny2013-12-102-4/+4
| | | | MFC after: 2 weeks
* Add some macros to make the code more readable (no functional chages).trociny2013-12-101-6/+9
| | | | MFC after: 2 weeks
* For memsync replication, hio_countdown is used not only as antrociny2013-12-101-111/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 MFC after: 2 weeks
* Some improvements to the casperd manual page.pjd2013-12-081-7/+7
| | | | Submitted by: emaste
* Document the noncontigwr NFS mount option.rmacklem2013-12-081-1/+14
| | | | | | This is a content change. MFC after: 3 weeks
* route(1): Pull static data to the top of the file.eadler2013-12-041-15/+15
| | | | | | | This is a pre-requisisite to some upcoming changes. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> Discussed on: -hackers
* route(1): Pull static buffer out of the function and into function scope.eadler2013-12-041-17/+17
| | | | | | | This will make it easier to link as a library. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> Discussed on: -hackers
* route(1): Pull static buffer out of the function and into function scope.eadler2013-12-041-13/+13
| | | | | | | This will make it easier to link as a library. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> (older version) Discussed on: -hackers
* route(1): Pull static variable out of the function and into function scope.eadler2013-12-041-3/+3
| | | | | | | This will make it easier to link as a library. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> (older version) Discussed on: -hackers
* route(1): Pull static buffer out of the function and into function scope.eadler2013-12-041-4/+5
| | | | | | | This will make it easier to link as a library. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> (older version) Discussed on: -hackers
* Add "null" backend to mdconfig(8). This does exactly what the nametrasz2013-12-042-4/+10
| | | | | | | | suggests, and is somewhat useful for benchmarking. MFC after: 1 month No objections from: kib Sponsored by: The FreeBSD Foundation
* Avoid using a static buffer in atalk_ntoa. This will help allow users to ↵eadler2013-12-041-9/+15
| | | | | | | | call route(1) as a library. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> (older version) Discussed on: -hackers Reviwed by: adri (different older version)
* Add const qualifier where appropriateeadler2013-12-041-2/+2
| | | | Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add const qualifier where appropriateeadler2013-12-041-1/+1
| | | | Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Turn 'n' into a local variable. This is required for additional changes.eadler2013-12-041-1/+2
| | | | Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Initialize cookie before use.pjd2013-12-031-0/+1
| | | | | Reported by: Coverity Coverity CID: 1135292
* Please welcome casperd daemon. It (and its services) will be responsible forpjd2013-12-026-0/+1116
| | | | | | | | | | | | | | | | | | | giving access to functionality that is not available in capability mode sandbox. The functionality can be precisely restricted. Start with the following services: - system.dns - provides API compatible to: - gethostbyname(3), - gethostbyname2(3), - gethostbyaddr(3), - getaddrinfo(3), - getnameinfo(3), - system.grp - provides getgrent(3)-compatible API, - system.pwd - provides getpwent(3)-compatible API, - system.random - allows to obtain entropy from /dev/random, - system.sysctl - provides sysctlbyname(3-compatible API. Sponsored by: The FreeBSD Foundation
* Remove trailing backslash.pjd2013-12-011-1/+1
|
* Check ipfw table numbers in both user and kernel space before rule addition.melifaro2013-11-282-10/+37
| | | | | | Found by: Saychik Pavel <umka@localka.net> MFC after: 2 weeks Sponsored by: Yandex LLC
* Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather thanjmallett2013-11-271-3/+7
| | | | | | | | | | | | only being able to create 1TB partitions: o) Use an unsigned 32-bit quantity to store the number of disk sectors. o) Detect overflow of said 32-bit quantity and clamp to 2^32. o) Rather than returning the disk sector count from get_params, return 0 on success, since its return value is only ever compared to -1 to detect failure. This would cause returning 2^32 sectors to be interpreted as an error. Reviewed by: bde ("good for a quick fix")
* Fix key lookup in ipfw(8) broken since r232865.melifaro2013-11-271-2/+13
| | | | | | | | | | 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 after: 2 weeks Sponsored by: Yandex LLC
* Fix warnings to not append "No error: 0".trasz2013-11-261-2/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Adjust introduction history.pluknet2013-11-251-2/+2
| | | | | | | Dump .Dd for this and previous changes. Discussed with: trasz MFC after: 3 days
* Remove __FreeBSD__ ifdefs.glebius2013-11-221-6/+1
|
* Rewrite usage() so that its source code resembles what is printed.glebius2013-11-221-7/+7
|
* - Purge one more reference to ad(4)[1].pluknet2013-11-221-6/+4
| | | | | | | - NSWAPDEV limit has gone. Noticed by: Sergey V. Dyatko [1] MFC after: 1 week
* Add "resize" verb to gmirror(8) and such functionality to geom_mirror(4).ae2013-11-192-1/+118
| | | | | | | | | 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. Silence from: geom@ MFC after: 1 month
* Check for special status code from FIRMWARE_ACTIVATE commandjimharris2013-11-121-11/+24
| | | | | | | | | signifying that a reboot is required to complete activation of the requested firmware image. Reported by: Joe Golio <joseph.golio@emc.com> Sponsored by: Intel MFC after: 3 days
* Fix a typo: s/wriable/writable/dteske2013-11-121-1/+1
|
* devd: lower priority of action execution logging to infoavg2013-11-071-1/+1
| | | | Reviewed by: asomers
* devd: fix a typo in a commentavg2013-11-071-1/+1
| | | | Reviewed by: asomers
OpenPOWER on IntegriCloud