Commit Graph

7011 Commits

Author SHA1 Message Date
Jaakko Heinonen
5fcb06f86e Check the return value of sbuf_finish(). 2012-08-23 16:25:36 +00:00
John Baldwin
0a26f85822 Revert r239356 and use an alternate algorithm.
First, don't exit when the link goes down on an interface.  Instead,
teach dhclient to track changes in link state and to enter the reboot
state when the link on an interface goes up causing dhclient to attempt
to renew its existing lease.

Second, remove the change I added to clear the old lease when dhclient
exits due to an error (such as ifconfig down).  If an interface is
using autoconfiguration it should keep its autoconfiguration as much as
possible.  If the next time it needs a configuration it is able to reuse
the previous autoconfiguration, then leaving the settings intact allows
existing connections to survive temporary outages, etc.

PR:		bin/166656
MFC after:	1 month
2012-08-22 13:53:37 +00:00
Sergey Kandaurov
affe7c8f84 Avoid segfault in the 'smpphylist' subcommand.
Initialize devlist.dev_queue tail queue early enough before its any
potential traversal in freebusdevlist() when in smpphylist error path.

Reported by:	Pavel Polyakov <bsd kobyla org> (on irc)
Reviewed by:	ken
MFC after:	5 days
2012-08-20 20:40:14 +00:00
John Baldwin
83f745b8b9 Fix dhclient to properly exit and teardown the configured lease when
link is lost.  devd will start a new dhclient instance when link is
restored.

PR:		bin/166656
Submitted by:	Peter Jeremy (mostly)
Reviewed by:	brooks (earlier version from Peter)
MFC after:	1 month
2012-08-17 15:53:43 +00:00
Dimitry Andric
3283f9d4f5 Make sure the compiler knows g_gate_xvlog() and g_gate_xlog() do not
return.  This silences a warning from clang 3.2 about uninitialized use
of the variable 'mediasize' in sbin/ggate/shared/ggate.c.

Reviewed by:	pjd
MFC after:	1 week
2012-08-06 21:02:40 +00:00
Dimitry Andric
db58456d4c In sbin/camcontrol/camcontrol.c, function smpcmd(), initialize the
'error' variable to zero, to avoid returning garbage in several cases.

This fixes the following clang 3.2 warnings:

  sbin/camcontrol/camcontrol.c:4634:8: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                          if (amt_written == -1) {
                              ^~~~~~~~~~~~~~~~~
  sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here
          return (error);
                  ^~~~~

  sbin/camcontrol/camcontrol.c:4619:7: warning: variable 'error' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
                  if (fd_response == 0) {
                      ^~~~~~~~~~~~~~~~
  sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here
          return (error);
                  ^~~~~

  sbin/camcontrol/camcontrol.c:4617:6: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
          if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here
          return (error);
                  ^~~~~

MFC after:	1 week
2012-08-05 12:16:11 +00:00
Jim Harris
ad8131190f Document "destroy" as an alias for "stop". 2012-08-03 20:30:40 +00:00
Thomas Quinot
71ee4ef0d9 New command "gmultipath prefer" to force selection of a specified
provider in an Active/Passive configuration.

Reviewed by:	mav
MFC after:	4 weeks
2012-08-03 14:55:35 +00:00
Konstantin Belousov
2db8baa956 fsck_ffs shall accept the configured journal size, and not refuse to
operate on it if journal size is greater then SUJ_MAX. The later
constant is only to select maximal journal size when user did not
specified size explicitely.

Submitted by:	Andrey Zonov <andrey@zonov.org>
Reviewed by:	mckusick
MFC after:	1 week
2012-08-02 10:39:54 +00:00
Dag-Erling Smørgrav
39faed57b6 Restore a piece of BSD history.
PR:		169127
Submitted by:	Ruben de Groot <ruben@hacktor.com>
MFC after:	1 week
2012-08-01 09:10:21 +00:00
Xin LI
edd4c16f78 Teach md5(1) about sha512.
MFC after:	1 month
2012-08-01 00:36:12 +00:00
Luigi Rizzo
a4a16855c3 remove the last __unused instance in sbin/ipfw.
This particular function (show_prerequisites() ) we should actually
remove the argument from the callers as well, but i'll do it at a
later time.
2012-07-30 11:02:22 +00:00
Luigi Rizzo
6a7bb02d77 Fix some compile errors at high WARNS, including one
for an uninitialized variable.

unused parameters and variables are annotated with
	(void)foo;	/* UNUSED */
instead of __unused, because this code needs to build
also on linux and windows.
2012-07-30 10:55:23 +00:00
Joel Dahl
72a1e3395c Remove trailing whitespace. 2012-07-30 10:14:37 +00:00
Isabell Long
3dd75dbc2b The ad(4) driver no longer exists in FreeBSD CURRENT or 9, so change the
references to it in gsched(8) to the existing ada(4) driver.

PR:		docs/170085
Submitted by:	olgeni
Approved by:	gavin
MFC after:	5 days
2012-07-26 17:30:34 +00:00
Isabell Long
8e68324104 In ipfw(8), make the text about dynamic rules consistent.
PR:		docs/120539
Approved by:	gabor (mentor)
MFC after:	5 days
2012-07-16 22:15:30 +00:00
Mikolaj Golub
cfbd0d18bb Metaflush on/off values don't need quotes.
Reviewed by:	pjd
MFC after:	3 days
2012-07-16 20:43:28 +00:00
Eitan Adler
747943148c Document the behavior of mount with failok specified.
PR:		docs/163742
Submitted by:	gcooper
Discussion by:	gcooper
Discussion by:	bjk
Approved by:	gabor
MFC after:	3 days
2012-07-12 15:20:20 +00:00
Hiroki Sato
8efbd296e0 Make ipfw0 logging pseudo-interface clonable. It can be created automatically
by $firewall_logif rc.conf(5) variable at boot time or manually by ifconfig(8)
after a boot.

Discussed on:	freebsd-ipfw@
2012-07-09 07:16:19 +00:00
Hiroki Sato
f6c336fe66 Remove "prefer_source" address selection option. FreeBSD has had an
implementation of RFC 3484 for this purpose for a long time and "prefer_source"
was never implemented actually.  ND6_IFF_PREFER_SOURCE macro is left intact.
2012-07-09 06:21:46 +00:00
Edward Tomasz Napierala
dc604f0cf6 Make it possible to resize md(4) devices.
Reviewed by:	kib
Sponsored by:	FreeBSD Foundation
2012-07-07 20:32:21 +00:00
Eitan Adler
089d61ec12 Remove unneeded variable reported by gcc46 which stopped being used in
r234178.

Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:25:36 +00:00
Eitan Adler
eb5f456981 Remove ancient vnconfig symlink
Submitted by:	ak
Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:20:27 +00:00
Pawel Jakub Dawidek
c66ee1b31e Make use of GEOM Gate direct reads feature. This allows HAST to serve
reads with native speed of the underlying provider.
There are three situations when direct reads are not used:
1. Data is being synchronized and synchronization source is the secondary
   node, which means secondary node has more recent data and we should read
   from it.
2. Local read failed and we have to try to read from the secondary node.
3. Local component is unavailable and all I/O requests are served from the
   secondary node.

Sponsored by:	Panzura, http://www.panzura.com
MFC after:	1 month
2012-07-04 20:20:48 +00:00
Pawel Jakub Dawidek
a894d53ea0 Improve description of various key used by GELI.
PR:		docs/169089
Submitted by:	John W. O'Brien <john@saltant.com>
MFC after:	3 days
2012-07-04 17:59:26 +00:00
Isabell Long
82cecbea69 - Make ipfw's sched rules case insensitive, for user-friendliness.
- Add a note to the ipfw(8) man page about the rules no longer being
case sensitive.
- Fix some typos in the man page.

PR:		docs/164772
Reviewed by:	bz
Approved by:	gabor (doc mentor, src committer)
MFC after:	2 weeks
2012-07-03 08:42:48 +00:00
Xin LI
6959b14df6 Use timeclear() instead of home grown version.
MFC after:	2 weeks
2012-07-02 02:38:27 +00:00
Pawel Jakub Dawidek
4c13f63cba Check if there is cmsg at all.
MFC after:	3 days
2012-07-01 16:26:07 +00:00
Gavin Atkinson
b45c4eb9ae The -S option, to specify the sector size, has been usable on all types of
memory disks since r135340.  Update the man page to reflect this.

Noticed by:	avg
MFC after:	3 days
2012-06-27 12:19:28 +00:00
Warren Block
77b722fce4 Use possessive "its", no apostrophe.
MFC after:	1 day
2012-06-27 01:44:48 +00:00
Kenneth D. Merry
7027b9cda4 Change 'camcontrol defects' to first probe a drive to find out how much
defect information it has before grabbing the full defect list.

This works around a bug with some Hitachi drives that generate data overrun
errors when they are asked for more defect data than they have.

The change is done in a spec-compliant way, so it should have no negative
impact on drives that don't have this issue.

This is based on work originally done at Sandvine.

scsi_da.h:	Add a define for the maximum amount of data that can be
		contained in a defect list.

camcontrol.c:	Update the readdefects() function to issue an initial
		command to determine the length of the defect list, and
		then use that length in the request for the full defect
		list.

camcontrol.8:	Add a note that some drives will report 0 defects available
		if you don't request either the PLIST or GLIST.

Submitted by:	Mark Johnston <markjdb@gmail.com> (original version)
MFC after:	3 days
2012-06-22 18:57:06 +00:00
Scott Long
cfc0a49549 Add progress.c and progress.h, missed in the previous commit to camcontrol.
Submitted by:   Garrett Cooper
Obtained from:  Netflix, Inc.
2012-06-20 04:11:34 +00:00
Scott Long
3ff78f8218 Update the 'fwdownload' command to also flash disks connected over an
ATA/SATA transport.  The detection logic is automatic, so it should Just
Work.  While here, also improve the progress meter that is displayed
during firmware download.

Submitted by:	Alistair Crooks
Obtained from:	Netflix, Inc.
MFC after:	3 days
2012-06-20 00:17:29 +00:00
Navdeep Parhar
09fe63205c - Updated TOE support in the kernel.
- Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs.
  These are available as t3_tom and t4_tom modules that augment cxgb(4)
  and cxgbe(4) respectively.  The cxgb/cxgbe drivers continue to work as
  usual with or without these extra features.

- iWARP driver for Terminator 3 ASIC (kernel verbs).  T4 iWARP in the
  works and will follow soon.

Build-tested with make universe.

30s overview
============
What interfaces support TCP offload?  Look for TOE4 and/or TOE6 in the
capabilities of an interface:
# ifconfig -m | grep TOE

Enable/disable TCP offload on an interface (just like any other ifnet
capability):
# ifconfig cxgbe0 toe
# ifconfig cxgbe0 -toe

Which connections are offloaded?  Look for toe4 and/or toe6 in the
output of netstat and sockstat:
# netstat -np tcp | grep toe
# sockstat -46c | grep toe

Reviewed by:	bz, gnn
Sponsored by:	Chelsio communications.
MFC after:	~3 months (after 9.1, and after ensuring MFC is feasible)
2012-06-19 07:34:13 +00:00
Konstantin Belousov
364e72457f For incompleted block allocations or frees, the inode block count usage
must be recalculated. The blk_check pass of suj checker explicitely marks
inodes which owned such blocks as needing block count adjustment. But
ino_adjblks() is only called by cg_trunc pass, which is performed before
blk_check. As result, the block use count for such inodes is left wrong.
This causes full fsck run after journaled run to still find inconsistencies
like 'INCORRECT BLOCK COUNT I=14557 (328 should be 0)' in phase 1.

Fix this issue by running additional adj_blk pass after blk_check, which
updates the field.

Reviewed by:	jeff, mckusick
MFC after:	1 week
2012-06-12 21:37:27 +00:00
Hans Petter Selasky
4f2380c0cf Revert: r236909
Pointyhat: me
2012-06-11 20:27:52 +00:00
Hans Petter Selasky
9ae652f11f Use the correct clock source when computing timeouts.
MFC after:	1 week
2012-06-11 19:20:59 +00:00
Alexander V. Chernikov
2bd61de08c Update maximum number of tables available in ipfw to reflect
changes done in r233478.

Approved by:      kib(mentor)
MFC after:        3 days
2012-06-09 20:47:58 +00:00
Joel Dahl
9760b0e0c5 mdoc: fix a few badly nested blocks. 2012-06-09 10:43:33 +00:00
Joel Dahl
21c2aa5e52 mdoc: minor improvements to a few lists with tags. 2012-06-09 07:18:53 +00:00
Joel Dahl
a4dec862ed Remove repeated words. 2012-06-05 18:19:52 +00:00
Joel Dahl
19769ec2c7 Minor spelling fixes. 2012-06-05 18:07:20 +00:00
Alexander Motin
fbfb753fad Add -p argument for camcontrol debug to allow enabling CAM_DEBUG_PROBE
added at r208911.
2012-06-04 10:42:09 +00:00
Pawel Jakub Dawidek
4c71d26341 Simplify the code by using snprlcat().
MFC after:	3 days
2012-06-03 10:50:46 +00:00
Joel Dahl
29e758c263 Minor mdoc improvements. 2012-06-03 07:45:42 +00:00
Alexander Motin
b9c473b2ed Rewrite enabling NCQ for SATA devices in a way more alike to SCSI TCQ.
This allows to control it with `camcontrol negotiate adaX -T (en|dis)able`
on the fly, same as for SCSI devices.

Sponsored by:	iXsystems, Inc.
2012-06-02 08:29:07 +00:00
Dimitry Andric
5d586d29dd Make devd build with libc++.
MFC after:	3 days
2012-06-01 06:56:35 +00:00
Eitan Adler
903892c793 Fix a variety of compile errors with gcc48 and clang
PR:		bin/165699
Submitted by:	Arne Meyer <meyer.arne83@gmail.com>
Approved by:	cperciva
MFC after:	1 week
2012-05-31 08:22:02 +00:00
Eitan Adler
5e4cc10b6d Add missing flag enable when certain arguments are parsed
PR:		bin/163053
Submitted by:	Peter <pmc@citylink.dinoex.sub.org>
Approved by:	cperciva
MFC after:	1 week
2012-05-30 03:54:10 +00:00
Kevin Lo
544c5e5b53 Make sure that each va_start has one and only one matching va_end,
especially in error cases.
2012-05-29 01:48:06 +00:00