summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
...
* Lay groundwork in CAM for recording and reporting physical path andgibbs2011-06-141-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other device attributes stored in the CAM Existing Device Table (EDT). This includes some infrastructure requried by the enclosure services driver to export physical path information. Make the CAM device advanced info interface accept store requests. sys/cam/scsi/scsi_all.c: sys/cam/scsi/scsi_all.h: - Replace scsi_get_sas_addr() with a scsi_get_devid() which takes a callback that decides whether to accept a particular descriptor. Provide callbacks for NAA IEEE Registered addresses and for SAS addresses, replacing the old function. This is needed because the old function doesn't work for an enclosure address for a SAS device, which is not flagged as a SAS address, but is NAA IEEE Registered. It may be worthwhile merging this interface with the devid match interface. - Add a few more defines for some device ID fields. sbin/camcontrol/camcontrol.c: - Update for the CCB_DEV_ADVINFO interface change. cam/cam_xpt_internal.h: - Add the new fields for the physical path string to the CAM EDT. cam/cam_ccb.h: - Rename CCB_GDEV_ADVINFO to simply CCB_DEV_ADVINFO, and the ccb structure to ccb_dev_advinfo. - Add a flag that changes this CCB's action to store, rather than the default, retrieve. - Add a new buffer type, CDAI_TYPE_PHYS_PATH, for the new CAM EDT physpath field. - Remove the never-implemented transport & proto flags. cam/cam_xpt.c: cam/cam_xpt.h: - Add xpt_getattr(), which provides a wrapper for fetching a device's attribute using the GEOM strings as key. This method currently supports "GEOM::ident" and "GEOM::physpath". Submitted by: will Reviewed by : gibbs Extend the XPT_DEV_MATCH api to allow a device search by device ID. As far as the API is concerned, device ID is a binary blob to be interpreted by the transport layer. The SCSI implementation assumes it is an array of VPD device ID descriptors. sys/cam/cam_ccb.h: Create a new structure, device_id_match_pattern, and update the XPT_DEV_MATCH datastructures and flags so that this pattern type can be used. sys/cam/cam_xpt.c: - A single pattern matching on both inquiry data and device ID is invalid. Report any violators. - Pass device ID match requests through to the new routine scsi_devid_match(). The direct call of a SCSI routine is a layering violation, but no worse than the one a few lines up that checks inquiry data. Defer cleaning this up until our future, larger, rototilling of CAM. - Zero out cam_ed and cam_et nodes on allocation. Prior to this change, device_id_len and device_id were not inialized, preventing proper detection of the presence of this information. sys/cam/scsi/scsi_all.c: sys/cam/scsi/scsi_all.h: Add the scsi_match_devid() routine. Add a helper function for extracting peripherial driver names sys/cam/cam_periph.c: sys/cam/cam_periph.h: Add the cam_periph_list() method which fills an sbuf with a comma delimited list of the peripheral instances associated with a given CAM path. Add a helper functions for SCSI commands used by the SES driver. sys/cam/scsi/scsi_all.c: sys/cam/scsi/scsi_all.h: Add structure definitions and csio filling functions for the receive diagnostic results and send diagnostic commands. Misc CAM XPT cleanups. sys/cam/cam_xpt.c: Broadcast AC_FOUND_DEVICE and AC_PATH_REGISTERED events at the time async event handlers are attached even when registering just for events on a partitular SIM. Previously, you had to register for these events on all SIMs in the system in order to get the initial broadcast even though subsequent device and path arrivals would be delivered. sys/cam/cam_xpt.c: Remove SIM mutex held asserts from path accessors. CAM paths are reference counted and it is this reference count, not the sim mutex, that garantees they are stable. Sponsored by: Spectra Logic Corporation
* Implement "global" mode for ipfw nat. It is similar to natd(8)ae2011-06-144-7/+45
| | | | | | | | | | | | | | | | "globalport" option for multiple NAT instances. If ipfw rule contains "global" keyword instead of nat_number, then for each outgoing packet ipfw_nat looks up translation state in all configured nat instances. If an entry is found, packet aliased according to that entry, otherwise packet is passed unchanged. User can specify "skip_global" option in NAT configuration to exclude an instance from the lookup in global mode. PR: kern/157867 Submitted by: Alexander V. Chernikov (previous version) Tested by: Eugene Grosbein
* Check nat id a bit more strictly.ae2011-06-141-6/+7
|
* Grab one of the ifcap bits for netmap, and enable printing in ifconfig.luigi2011-06-141-1/+1
| | | | | | | Document the fact that we might want an IFCAP_CANTCHANGE mask, even though the value is not yet used in sys/net/if.c (asked on -current a week ago, no feedback so i assume no objection).
* Implement fully asynchronous partial truncation with softupdates journalingjeff2011-06-101-36/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to resolve errors which can cause corruption on recovery with the old synchronous mechanism. - Append partial truncation freework structures to indirdeps while truncation is proceeding. These prevent new block pointers from becoming valid until truncation completes and serialize truncations. - On completion of a partial truncate journal work waits for zeroed pointers to hit indirects. - softdep_journal_freeblocks() handles last frag allocation and last block zeroing. - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it is only implemented in one place. - Block allocation failure handling moved up one level so it does not proceed with buf locks held. This permits us to do more extensive reclaims when filesystem space is exhausted. - softdep_sync_metadata() is broken into two parts, the first executes once at the start of ffs_syncvnode() and flushes truncations and inode dependencies. The second is called on each locked buf. This eliminates excessive looping and rollbacks. - Improve the mechanism in process_worklist_item() that handles acquiring vnode locks for handle_workitem_remove() so that it works more generally and does not loop excessively over the same worklist items on each call. - Don't corrupt directories by zeroing the tail in fsck. This is only done for regular files. - Push a fsync complete record for files that need it so the checker knows a truncation in the journal is no longer valid. Discussed with: mckusick, kib (ffs_pages_remove and ffs_truncate parts) Tested by: pho
* Add dump.c to the rtsol build. It is needed now that sec2str is non-staticken2011-06-081-1/+1
| | | | and used in rtsold.c.
* Add a special mount option "failok" to indicate that the administrator wantsdelphij2011-06-071-2/+14
| | | | | | | | | the system to proceed to boot without bailing out into single user mode, even when the file system can not be successfully mounted. This option is implemented in mount(8) and not passed into kernel. MFC after: 1 month
* Do not use LCM from stripesize and user specified alignment value.ae2011-06-071-7/+4
| | | | | | | | When user wants have specific alignment - do what user wants. Use stripesize as alignment value in case, when some of gpart's arguments are ommitted for automatic calculation. Suggested by: mav
* Rework parts of this man page to improve grammar.gavin2011-06-061-37/+37
| | | | | | | Inspired by, and parts submitted by... PR: docs/157467 Submitted by: Ben Kaduk <kaduk mit.edu> MFC after: 2 weeks
* Remove redundant assignments to WARNS.ed2011-06-061-2/+0
| | | | For these directories, WARNS is already implied to be 6.
* Add another example to mount(8) on using the "-o" argument.gavin2011-06-061-2/+11
| | | | | | PR: docs/157389 Submitted by: Warren Block <wblock wonkity.com> MFC after: 1 week
* Bump .Ddgavin2011-06-061-1/+1
| | | | | Forgotten by: gavin MFC after: 1 week
* Document that REQUIRES, PROVIDES and KEYWORDS are alos accepted. Thisgavin2011-06-061-0/+6
| | | | | | | | | chnage is different to the one suggested in the PR to try to avoid cluttering the man page too much. PR: docs/154494 Submitted by: kilian <kilian.klimek googlemail.com> MFC after: 1 week
* Initialize co.use_set variable before parsing each new rule.ae2011-06-061-0/+1
| | | | | PR: bin/134975 MFC after: 2 weeks
* Increase buffer size for the command line.ae2011-06-061-2/+2
| | | | | | PR: bin/125370 Submitted by: sem MFC after: 2 weeks
* - Accept Router Advertisement messages even when net.inet6.ip6.forwarding=1.hrs2011-06-062-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A new per-interface knob IFF_ND6_NO_RADR and sysctl IPV6CTL_NO_RADR. This controls if accepting a route in an RA message as the default route. The default value for each interface can be set by net.inet6.ip6.no_radr. The system wide default value is 0. - A new sysctl: net.inet6.ip6.norbit_raif. This controls if setting R-bit in NA on RA accepting interfaces. The default is 0 (R-bit is set based on net.inet6.ip6.forwarding). Background: IPv6 host/router model suggests a router sends an RA and a host accepts it for router discovery. Because of that, KAME implementation does not allow accepting RAs when net.inet6.ip6.forwarding=1. Accepting RAs on a router can make the routing table confused since it can change the default router unintentionally. However, in practice there are cases where we cannot distinguish a host from a router clearly. For example, a customer edge router often works as a host against the ISP, and as a router against the LAN at the same time. Another example is a complex network configurations like an L2TP tunnel for IPv6 connection to Internet over an Ethernet link with another native IPv6 subnet. In this case, the physical interface for the native IPv6 subnet works as a host, and the pseudo-interface for L2TP works as the default IP forwarding route. Problem: Disabling processing RA messages when net.inet6.ip6.forwarding=1 and accepting them when net.inet6.ip6.forward=0 cause the following practical issues: - A router cannot perform SLAAC. It becomes a problem if a box has multiple interfaces and you want to use SLAAC on some of them, for example. A customer edge router for IPv6 Internet access service using an IPv6-over-IPv6 tunnel sometimes needs SLAAC on the physical interface for administration purpose; updating firmware and so on (link-local addresses can be used there, but GUAs by SLAAC are often used for scalability). - When a host has multiple IPv6 interfaces and it receives multiple RAs on them, controlling the default route is difficult. Router preferences defined in RFC 4191 works only when the routers on the links are under your control. Details of Implementation Changes: Router Advertisement messages will be accepted even when net.inet6.ip6.forwarding=1. More precisely, the conditions are as follow: (ACCEPT_RTADV && !NO_RADR && !ip6.forwarding) => Normal RA processing on that interface. (as IPv6 host) (ACCEPT_RTADV && (NO_RADR || ip6.forwarding)) => Accept RA but add the router to the defroute list with rtlifetime=0 unconditionally. This effectively prevents from setting the received router address as the box's default route. (!ACCEPT_RTADV) => No RA processing on that interface. ACCEPT_RTADV and NO_RADR are per-interface knob. In short, all interface are classified as "RA-accepting" or not. An RA-accepting interface always processes RA messages regardless of ip6.forwarding. The difference caused by NO_RADR or ip6.forwarding is whether the RA source address is considered as the default router or not. R-bit in NA on the RA accepting interfaces is set based on net.inet6.ip6.forwarding. While RFC 6204 W-1 rule (for CPE case) suggests a router should disable the R-bit completely even when the box has net.inet6.ip6.forwarding=1, I believe there is no technical reason with doing so. This behavior can be set by a new sysctl net.inet6.ip6.norbit_raif (the default is 0). Usage: # ifconfig fxp0 inet6 accept_rtadv => accept RA on fxp0 # ifconfig fxp0 inet6 accept_rtadv no_radr => accept RA on fxp0 but ignore default route information in it. # sysctl net.inet6.ip6.norbit_no_radr=1 => R-bit in NAs on RA accepting interfaces will always be set to 0.
* Add the "nd6 options" line handler as af_other_status() of AF_INET6, not as anhrs2011-06-052-69/+5
| | | | | | own address family. Reviewed by: bz
* Read from the socket using the same max buffer size as we use whilesobomax2011-06-041-2/+14
| | | | | | | | | | | | | | | | | sending. What happens otherwise is that the sender splits all the traffic into 32k chunks, while the receiver is waiting for the whole packet. Then for a certain packet sizes, particularly 66607 bytes in my case, the communication stucks to secondary is expecting to read one chunk of 66607 bytes, while primary is sending two chunks of 32768 bytes and third chunk of 1071. Probably due to TCP windowing and buffering the final chunk gets stuck somewhere, so neither server not client can make any progress. This patch also protect from short reads, as according to the manual page there are some cases when MSG_WAITALL can give less data than expected. MFC after: 3 days
* Generally clean up markup.ru2011-06-031-71/+85
|
* Always use LCM when stripesize > 0.ae2011-06-021-2/+2
|
* Use stripesize and stripeoffset in the automatic calculation ofae2011-06-021-18/+33
| | | | | | | | | | partition offsets. If user requests specific alignment and provider's stripesize is not zero, then use a least common multiple from the stripesize and user specified value. Also fix "gpart resize" implementation: do not try to align the partition size, because the start offset may be not aligned. Instead align the end offset and then calculate size. Also use stripesize and stripeoffset for "gpart resize" command.
* mdoc: fix markupuqs2011-06-022-2/+4
|
* Add a sentence to the umount.8 man page to clarify the behaviourrmacklem2011-05-311-1/+4
| | | | | | | | for forced dismount when used on an NFS mount point. Requested by Jeremy Chadwick. This is a content change. MFC after: 2 weeks
* Conditionally compile in the af_inet and af_inet6, af_nd6 modules.bz2011-05-316-6/+52
| | | | | | | | | | | | | | | | | | | | | If compiled in for dual-stack use, test with feature_present(3) to see if we should register the IPv4/IPv6 address family related options. In case there is no "inet" support we would love to go with the usage() and make the address family mandatory (as it is for anything but inet in theory). Unfortunately people are used to ifconfig IF up/down etc. as well, so use a fallback of "link". Adjust the man page to reflect these minor details. Improve error handling printing a warning in addition to the usage telling that we do not know the given address family in two places. Reviewed by: hrs, rwatson Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 2 weeks
* Document kern.geom.part.check_integrity sysctl variable.ae2011-05-301-1/+17
|
* Add tablearg support for ipfw setfib.ae2011-05-302-11/+19
| | | | | PR: kern/156410 MFC after: 2 weeks
* If READ from the local node failed we send the request to the remotetrociny2011-05-291-1/+1
| | | | | | | node. There is no use in doing this for synchronization requests. Approved by: pjd (mentor) MFC after: 1 week
* Modify the umount(8) command so that it doesn't dormacklem2011-05-291-3/+4
| | | | | | | | | | | | | a sync(2) syscall before unmount(2) for the "-f" case. This avoids a forced dismount from getting stuck for an NFS mountpoint in sync() when the server is not responsive. With this commit, forced dismounts should normally work for the NFS clients, but can take up to about 1minute to complete. PR: kern/157365 Reviewed by: kib MFC after: 2 weeks
* Update the manual page to reflect the new 32K/4K defaults.mckusick2011-05-281-4/+4
| | | | Reminded by: Ivan Voras
* Add example how to create MBR and BSD schemes and install boot code.ae2011-05-271-1/+28
|
* Synchronize manpage's synopsis with program's usage. Since -l and -rae2011-05-272-5/+6
| | | | | | | keys are mutually exclusive for the `gpart show` command, then mark them so. Requested by: ru
* Raise the default blocksize for UFS/FFS filesystems frommckusick2011-05-261-2/+2
| | | | | | | | | | | | | | | | | | | 16K to 32K and the default fragment size from 2K to 4K. The rational is that most disks are now running with 4K sectors. While they can (slowly) simulate 512-byte sectors by doing a read-modify-write, it is desirable to avoid this functionality. By raising the minimum filesystem allocation to 4K, the filesystem will never trigger the small sector emulation. Also, the growth of disk sizes has lead us to double the default block size about every ten years. The rise from 8K to 16K blocks was done in 2001. So, by the 10-year metric, the time has come for 32K blocks. Discussed at: May 2011 BSDCan Developer Summit Reference: http://wiki.freebsd.org/201105DevSummit/FileSystems
* Simplify ALIGNDOWN macro.ae2011-05-241-1/+1
|
* Fix calculation of alignment for odd values. Also do not change valueae2011-05-241-2/+2
| | | | when it is already aligned.
* Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSHpjd2011-05-235-0/+64
| | | | | | | | | | | requests as well as number of activemap updates. Number of BIO_WRITEs and activemap updates are especially interesting, because if those two are too close to each other, it means that your workload needs bigger number of dirty extents. Activemap should be updated as rarely as possible. MFC after: 1 week
* To handle BIO_FLUSH and BIO_DELETE requests in secondary worker we needpjd2011-05-231-1/+7
| | | | | | | to use ioctl(2). This is why we can't use capsicum for now to sandbox secondary. Capsicum is still used to sandbox hastctl. MFC after: 1 week
* Re-encode files from ISO-8859-1 to UTF-8uqs2011-05-224-4/+4
|
* Recognize HIO_FLUSH requests.pjd2011-05-211-0/+1
| | | | MFC after: 1 week
* Document IPv6 support.pjd2011-05-201-8/+22
| | | | MFC after: 3 weeks
* If no listen address is specified, bind by default to:pjd2011-05-201-2/+0
| | | | | | | tcp4://0.0.0.0:8457 tcp6://[::]:8457 MFC after: 3 weeks
* Rename ipv4/ipv6 to tcp4/tcp6.pjd2011-05-202-10/+10
| | | | MFC after: 3 weeks
* Now that hell is fully frozen it is good time to add IPv6 support to HAST.pjd2011-05-201-75/+116
| | | | MFC after: 3 weeks
* Allow [ ] characters in strings. They might be used in IPv6 addresses.pjd2011-05-201-1/+1
| | | | MFC after: 3 weeks
* Rename tcp4 to tcp in preparation for IPv6 support.pjd2011-05-202-93/+93
| | | | MFC after: 3 weeks
* Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.pjd2011-05-202-1/+1
| | | | MFC after: 2 weeks
* In preparation for IPv6 support allow to specify multiple addresses topjd2011-05-194-68/+215
| | | | | | listen on. MFC after: 3 weeks
* - Add support for AF_INET6 sockets for %S format character.pjd2011-05-181-7/+26
| | | | | | | | - Use inet_ntop(3) instead of reimplementing it. - Use %hhu for unsigned char instead of casting it to unsigned int and using %u. MFC after: 1 week
* mdoc:pluknet2011-05-171-2/+2
| | | | | - use a proper macro for interface name ipfw0. - add missing section number for bpf cross reference.
* Some partitioning schemes want to have partitions that are alignedae2011-05-151-10/+14
| | | | | | | | | | | | | with geometry. And they do recalculation of user specified parameters. MBR, PC98, VTOC8, EBR schemes are doing that. For these schemes an auto alignment feature (ie. gpart add -a alignment) would not work. But it can work for GPT and BSD schemes. BSD scheme usualy is created inside MBR, so we can use knowledge about offset of MBR partition to calculate aligned values for BSD partitions. Use "offset" attribute of the parent provider for better alignment. MFC after: 2 weeks
* When setting media always and not just in case of switching to IFM_AUTOmarius2011-05-151-5/+1
| | | | | | | | | | | | | | | | | | clear the options of the current media, i.e. only inherit the instance, which matches what NetBSD does. Without this it's really non-intuitive that the following sequence: ifconfig bge0 media 1000baseT mediaopt full-duplex ifconfig bge0 media 100baseTX results in 100baseTX full-duplex to be set or that: ifconfig bge0 media autoselect mediaopt flowcontrol ifconfig bge0 media 1000baseT mediaopt full-duplex tries to set 1000baseT full-duplex with flowcontrol, which isn't suported und thus fails while the following: ifconfig re0 media 1000baseT mediaopt flowcontrol,full-duplex ifconfig re0 media autoselect just switches to autoselection without flowcontrol. MFC after: 2 weeks
OpenPOWER on IntegriCloud