summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Improve grammar and readability.hiren2013-09-201-3/+3
| | | | | Reviewed by: sbruno, loos Approved by: re (gjb)
* Fix a range check and a display string.hiren2013-09-201-2/+2
| | | | | | Reviewed by: loos Approved by: sbruno (mentor, implicit) Approved by: re (glebius)
* Fix comments.trociny2013-09-191-3/+2
| | | | | Approved by: re (marius) MFC after: 3 days
* When updating the map of dirty extents, most recently used extents aretrociny2013-09-192-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | kept dirty to reduce the number of on-disk metadata updates. The sequence of operations is: 1) acquire the activemap lock; 2) update in-memory map; 3) if the list of keepdirty extents is changed, update on-disk metadata; 4) release the lock. On-disk updates are not frequent in comparison with in-memory updates, while require much more time. So situations are possible when one thread is updating on-disk metadata and another one is waiting for the activemap lock just to update the in-memory map. Improve this by introducing additional, on-disk map lock: when in-memory map is updated and it is detected that the on-disk map needs update too, the on-disk map lock is acquired and the on-memory lock is released before flushing the map. Reported by: Yamagi Burmeister yamagi.org Tested by: Yamagi Burmeister yamagi.org Reviewed by: pjd Approved by: re (marius) MFC after: 2 weeks
* Use cv_broadcast() instead of cv_signal() when waking up threadstrociny2013-09-192-3/+3
| | | | | | | | | | | | | | | | | | | | waiting on an empty queue as the queue may have several consumers. Before the fix the following scenario was possible: 2 threads are waiting on empty queue, 2 threads are inserting simultaneously. The first inserting thread detects that the queue is empty and is going to send the signal, but before it sends the second thread inserts too. When the first sends the signal only one of the waiting threads receive it while the other one may wait forever. The scenario above is is believed to be the cause of the observed cases, when ggate_recv_thread() was getting stuck on taking free request, while the free queue was not empty. Reviewed by: pjd Tested by: Yamagi Burmeister yamagi.org Approved by: re (marius) MFC after: 2 weeks
* Bring in the new iSCSI target and initiator.trasz2013-09-142-0/+2
| | | | | | Reviewed by: ken (parts) Approved by: re (delphij) Sponsored by: FreeBSD Foundation
* - Begin sentence on a new line.joel2013-09-071-14/+25
| | | | - Minor language fixes.
* newfs_msdos: fix inaccurate comments.pfg2013-09-071-2/+2
| | | | | | | | | | The fields from deMTime and deMDate in the DOS directory entry are actually the last-modified time/date. According to some online documentation these are the only timestamps available in FAT12/FAT16. MFC after: 3 days
* Update ipfilter 4.1.28 --> 5.1.2.cy2013-09-063-18/+42
| | | | | Approved by: glebius (mentor) BSD Licensed by: Darren Reed <darrenr@reed.wattle.id.au> (author)
* Bump .Dd after r255307 and r255310bryanv2013-09-061-1/+1
| | | | Requested by: joel
* Add firmware downloading support for Samsung drivesbryanv2013-09-062-0/+4
| | | | Tested on Samsung SM1625 SSDs.
* Add camcontrol support for the SCSI sanitize commandbryanv2013-09-062-1/+544
| | | | | Reviewed by: ken, mjacob (eariler version) Sponsored by: Netapp
* Style clean-ups.hrs2013-09-051-54/+48
| | | | Reviewed by: md5
* Enable "late" option when a file= option is specified in /etc/fstab.hrs2013-09-051-4/+11
| | | | | | The file= option requires rw mount where the backing store exists but it does not work because rc.d/swap runs before rc.d/fsck. Reported by: wblock
* Change the cap_rights_t type from uint64_t to a structure that we can extendpjd2013-09-053-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the future in a backward compatible (API and ABI) way. The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough. The structure definition looks like this: struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; }; The initial CAP_RIGHTS_VERSION is 0. The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements. The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future. To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg. #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) We still support aliases that combine few rights, but the rights have to belong to the same array element, eg: #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) There is new API to manage the new cap_rights_t structure: cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg: cap_rights_t rights; cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT); There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg: #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...); Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1: cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL); Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition. This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x. Sponsored by: The FreeBSD Foundation
* Typo in strtol(3).pluknet2013-08-301-1/+1
| | | | Noticed by: bde
* Add missing newlines to Fibre Channel attributes output.mav2013-08-271-3/+3
|
* Move the old iSCSI initiator source to a more appropriate placetrasz2013-08-227-7/+7
| | | | | | | | | (sys/dev/iscsi_initiator/ instead of sys/dev/iscsi/initiator/), to make room for the new one. This is also more logical location (kernel module being named iscsi_initiator.ko, for example). There is no ongoing work on this I know of, so it shouldn't make life harder for anyone. There are no functional changes, apart from "svn mv" and adjusting paths.
* Fix the zeroing loop. I must have been drunk when I wrote this...des2013-08-201-6/+6
| | | | MFC after: 3 days
* init: Set kernel login class and CPU mask on new processes.jilles2013-08-131-1/+2
| | | | | | | In particular, this makes the kernel login class on processes started from /etc/rc "daemon" instead of "default". Reviewed by: trasz
* Change <sys/diskpc98.h> to not redefine the same symbols that aremarcel2013-08-071-8/+8
| | | | | | | | | | | | | | | | being defined in <sys/diskmbr.h>. Instead give the symbols here a "PC98_" prefix. This way, both <sys/diskmbr.h> and <sys/diskpc98.h> can be included in the same C source file. The renaming is trivial. The only gotcha is that DOSBBSECTOR is also redefined from 0 to 1. This because DOSBBSECTOR was always used in conjunction with an addition of 1. The PC98_BBSECTOR symbol is defined as 1 and the expression is simplified. Note: it is not believed that ports are seriously impacted; or at all for that matter. Approved by: nyan@
* Note NULL encryption method for GELIcrees2013-08-051-3/+6
| | | | | | PR: docs/180551 Submitted by: r4721@tormail.org Approved by: gjb (mentor)
* Fix boundary check of sockaddr array.hrs2013-08-011-3/+2
| | | | Reported by: uqs
* Make two buffer variables static for now. It is not safe todelphij2013-07-311-1/+1
| | | | | | reference stack memory after return. MFC after: 2 weeks
* Resolve fflag with realpath().delphij2013-07-311-1/+3
| | | | MFC after: 2 weeks
* Document the -S flag to fsck_ffsscottl2013-07-311-1/+6
| | | | Obtained from: Netflix
* Add a 'surrender' mode to fsck_ffs. With the -S flag, once hard read errorsscottl2013-07-303-2/+18
| | | | | | | | are encountered, the fsck will stop instead of wasting time chewing through possibly other errors. Obtained from: Netflix MFC after: 3 days
* Revert r253748,253749avg2013-07-281-0/+1
| | | | | | This WIP should not have been committed yet. Pointyhat to: avg
* remove needless inclusion of machine/cpu.h in userlandavg2013-07-281-1/+0
| | | | MFC after: 21 days
* Remove duplicated parapgraph.se2013-07-241-10/+0
| | | | MFC after: 3 days
* Fix a bug in cp += SA_SIZE() in RTA_* loop. This could preventhrs2013-07-241-8/+7
| | | | | | RTA_IFP from displaying correctly in route get subcommand. Spotted by: dim
* Add a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.loos2013-07-231-1/+2
| | | | | | | | | | | | | | This fix the case when etherswitch is printing the information of port 0 vlan group (in port based vlan mode) with no member ports. Add the ETHERSWITCH_VID_VALID support to ip17x driver. Add the ETHERSWITCH_VID_VALID support to rt8366 driver. arswitch doesn't need to be updated as it doesn't support vlans management yet. Approved by: adrian (mentor)
* Fix the usage error message. The valid range is up to max. vlan - 1 since ↵loos2013-07-231-1/+3
| | | | | | vlangroups starts at 0. Approved by: adrian (mentor)
* - Use getnameinfo() for both of AF_INET and AF_INET6 in routename().hrs2013-07-211-46/+54
| | | | - Add missing "static".
* - Fix nflag in routename().hrs2013-07-211-10/+33
| | | | | | | - Display a AF_LINK address in #linkN when sdl_{nlen,alen,slen) == 0 and sdl_index != 0. - Reduce unnecessary loop in pmsg_addrs(). - Remove iso_ntoa(). This is not used.
* - Simplify getaddr() and print_getmsg() by using RTAX_* instead of RTA_*hrs2013-07-201-80/+48
| | | | | as the argument. - Reduce unnecessary loop in print_getmsg().
* Show "default" for the zero-filled address consistently when nflag == 0.hrs2013-07-201-13/+10
|
* Add cast to (void *) to the following cases to suppress warnings byhrs2013-07-201-24/+23
| | | | | | | -Wcast-align. These do not increase the alignment requirement: - rtm = (struct rt_msghdr *)(rtm + rtm->rtm_msglen) - struct sockaddr *sa = &sa0; sX = (struct sockaddr_X *)sa
* Add message when nvd disks are attached and detached.jimharris2013-07-193-8/+14
| | | | | | | | | | | | As part of this commit, add an nvme_strvis() function which borrows heavily from cam_strvis(). This will allow stripping of leading/trailing whitespace and also handle unprintable characters in model/serial numbers. This function goes into a new nvme_util.c file which is used by both the driver and nvmecontrol. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.jimharris2013-07-191-1/+1
| | | | | | | | | | Recent testing with QEMU that has variable sector size support for NVMe uncovered some of these issues. Chatham prototype boards supported only 512 byte sectors. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Use _PATH_DEV (from paths.h) for the "/dev/" string, rather thanjimharris2013-07-182-2/+4
| | | | | | | | | hard-coding it. Sponsored by: Intel Suggested by: kib Reviewed by: kib, carl MFC after: 3 days
* Simplify open_dev() by returning errno values rather than just 0 or 1.jimharris2013-07-182-15/+4
| | | | | | | | | Also remove stat() call and just rely on errno from open() call to discern whether dev node exists or not. Sponsored by: Intel Reviewed by: kib, carl MFC after: 3 days
* Minor mdoc fixes.joel2013-07-181-10/+10
|
* Fix a gcc warning.hrs2013-07-181-1/+4
| | | | Pointy hat to: hrs
* Define constants for the lengths of the serial number, model numberjimharris2013-07-172-4/+7
| | | | | | | | | | | and firmware revision in the controller's identify structure. Also modify consumers of these fields to ensure they only use the specified number of bytes for their respective fields. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Always initialize fd to 0 in open_dev().jimharris2013-07-171-0/+2
| | | | | | Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* In this GRN, Marcel Moolenaar overhauled the logic for mountingrodrigc2013-07-172-1/+253
| | | | | | | | | | | | | | | | | | the root file system on bootup: |------------------------------------------------------------------------ |r214006 | marcel | 2010-10-17 22:01:53 -0700 (Sun, 17 Oct 2010) | 20 lines | | Re-implement the root mount logic using a recursive approach, whereby each |root file system (starting with devfs and a synthesized configuration) can |contain directives for mounting another file system as root. |------------------------------------------------------------------------ This commit adds a mount.conf(8) man page which documents the root mount logic. mount.conf(8) also provides some examples for the /.mount.conf file, which can be used to change the root mount behavior. Reviewed by: marcel bjk
* Use NET_RT_DUMP.0.FIB leaf node instead of setting td_proc->p_fibnum.hrs2013-07-171-12/+2
|
* - Add support of MK_INET_SUPPORT=no.hrs2013-07-172-268/+278
| | | | | | | | | | | | - Fix a bug in sodump() which prevented struct sockaddr_in6 from displaying. - Fix a bug in in fiboptlist_csv() which could cause free() of uninitialized pointer. - Style cleanups: . Add missing "static" keywords. . Use an array of struct sockaddr_storage instead of sockunion for rtmsg. . Use err() and errx() instead of pair of fprintf(stderr, "...") + exit(1). . Use nitems() macro. . Various style(9) fixes.
* Simplify keywords.h generation.hrs2013-07-171-9/+5
|
OpenPOWER on IntegriCloud