Commit Graph

99969 Commits

Author SHA1 Message Date
Gleb Smirnoff
eed9bc6a5b Mechanically convert to if_inc_counter(). 2014-09-18 20:58:04 +00:00
Gleb Smirnoff
884c5b4544 Mechanically convert to if_inc_counter(). 2014-09-18 20:53:02 +00:00
Gleb Smirnoff
2127b2e232 Mechanically convert to if_inc_counter(). 2014-09-18 20:47:39 +00:00
Gleb Smirnoff
8c32392208 Mechanically convert to if_inc_counter(). 2014-09-18 20:44:53 +00:00
Gleb Smirnoff
f02c95526e Mechanically convert to if_inc_counter(). 2014-09-18 20:43:17 +00:00
Gleb Smirnoff
482dbe35e5 - Mechanically convert to if_inc_counter().
- Cut code that runs a counter backwards.
2014-09-18 20:39:23 +00:00
Steven Hartland
8caa3daf35 Remove sys/types.h include as per style (9)
SDT requries sys/param.h due to use of NULL

Reported by:	Garrett
Sponsored by:	Multiplay
2014-09-18 20:38:18 +00:00
Gleb Smirnoff
ec4a897719 Mechanically convert to if_inc_counter(). 2014-09-18 20:35:22 +00:00
Gleb Smirnoff
c0973d1f22 Mechanically convert to if_inc_counter(). 2014-09-18 20:33:25 +00:00
Gleb Smirnoff
41acb7e12c Mechanically convert to if_inc_counter(). 2014-09-18 20:30:47 +00:00
Gleb Smirnoff
1411ec550f Fix build on 32-bit machines.
Pointy hat to:	glebius
2014-09-18 20:29:17 +00:00
Gleb Smirnoff
b1ed3d645b Mechanically convert to if_inc_counter(). 2014-09-18 20:24:47 +00:00
Gleb Smirnoff
e09fdb0282 Mechanically convert to if_inc_counter(). 2014-09-18 20:23:34 +00:00
Gleb Smirnoff
8da56a6fec Mechanically convert to if_inc_counter(). 2014-09-18 20:21:46 +00:00
Gleb Smirnoff
2c705cad05 Mechanically convert to if_inc_counter(). 2014-09-18 20:18:55 +00:00
Gleb Smirnoff
908c14ce55 Mechanically convert to if_inc_counter(). 2014-09-18 20:17:27 +00:00
Gleb Smirnoff
621d4f2a50 Mechanically convert to if_inc_counter(). 2014-09-18 20:15:53 +00:00
Gleb Smirnoff
11d48ff157 Mechanically convert to if_inc_counter(). 2014-09-18 20:11:28 +00:00
Gleb Smirnoff
e1ed7fe8b1 Mechanically convert to if_inc_counter(). 2014-09-18 20:09:35 +00:00
Gleb Smirnoff
006b95da09 Mechanically convert to if_inc_counter(). 2014-09-18 20:06:10 +00:00
Gleb Smirnoff
5941b6d120 Mechanically convert to if_inc_counter(). 2014-09-18 20:03:45 +00:00
Steven Hartland
71f3caaf31 Add dtrace probe support for zfs SET_ERROR(..)
MFC after:	1 week
Sponsored by:	Multiplay
2014-09-18 20:00:36 +00:00
Gleb Smirnoff
1162f06501 Mechanically convert to if_inc_counter(). 2014-09-18 19:57:13 +00:00
Gleb Smirnoff
84047b19df - Provide if_get_counter() method for vtnet(4).
- Do not accumulate statistics on every tick.
- Accumulate statistics in vtnet_setup_stat_sysctl()
  and in vtnet_get_counter().

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-18 19:15:40 +00:00
Will Andrews
91dda985cc Remove debug.zfs_flags in favor of the new vfs.zfs.debug_flags.
Replace TUNABLE_INT with CTLFLAG_RWTUN.

Submitted by:	avg (debug.zfs_flags removal), smh (TUNABLE_INT replacement)
2014-09-18 18:46:38 +00:00
Will Andrews
138ebd1b64 Start the process of cleaning up FreeBSD's firewire driver.
sys/dev/firewire/firewire.c:
sys/dev/firewire/firewire.h:
sys/dev/firewire/firewirereg.h:
sys/dev/firewire/fwcrom.c:
sys/dev/firewire/fwdev.c:
sys/dev/firewire/fwdma.c:
sys/dev/firewire/fwmem.c:
sys/dev/firewire/fwohci.c:
sys/dev/firewire/fwohci_pci.c:
sys/dev/firewire/fwohcivar.h:
sys/dev/firewire/if_fwe.c:
sys/dev/firewire/if_fwip.c:
sys/dev/firewire/sbp.c:
sys/dev/firewire/sbp_targ.c:
	Unifdef the code, removing support for DragonflyBSD
	and FreeBSD prior to version 5.

Submitted by:	gibbs
MFC after:	1 month
Sponsored by:	Spectra Logic
MFSpectraBSD:	1081188 on 2014/08/01
2014-09-18 17:28:21 +00:00
Alexander Motin
71d8e97e35 When updating device media size use cached cdevsw pointer.
Using pointer from the cdev directly is dangerous since we have no reference
on it, and it may change any time.  That caused panic if device has gone.

While there, report capacity change only if it really changed.

MFC after:	3 days
2014-09-18 17:25:20 +00:00
Will Andrews
6ad82d5feb Silence noisy firewire logging.
MFC after:	1 month
Sponsored by:	Spectra Logic
MFSpectraBSD:	974594 on 2013/08/02
2014-09-18 17:22:42 +00:00
Will Andrews
f8c2f66a6c Enable ZFS debug flags to be modified via vfs.zfs.debug_flags.
This is primarily only of interest to ZFS developers, but it makes it
easier to get additional debugging.

Submitted by:	gibbs
MFC after:	1 month
Sponsored by:	Spectra Logic
MFSpectraBSD:	517074 on 2011/12/15 (by will), 662343 on 2013/03/20 (by gibbs)
2014-09-18 16:55:41 +00:00
Gleb Smirnoff
1e99b3f4e3 - Use if_get_counter() to fetch ifnet statistics.
- Report IFCOUNTER_OQDROPS to linprocfs. Wasn't there before.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-18 16:44:28 +00:00
Will Andrews
cf0a1157d7 Reorder sysctls for spa.c global tunables; add sysctl for ccw_retry_interval.
MFC after:	1 month
Sponsored by:	Spectra Logic
2014-09-18 16:38:03 +00:00
Adrian Chadd
0936a8208b Fix the handling of EOP in status descriptors for if_igb(4) and don't
double-free mbufs.

Like ixgbe(4) chipsets, EOP is only set on the final descriptor
in a chain of descriptors.  So, to free the whole list of descriptors,
we should free the current slot _and_ the assembled list of descriptors
that make up the fragment list.

The existing code was setting discard once it saw EOP + an error status;
it then freed all the subsequent descriptors until the next EOP. That's
totally the wrong order.
2014-09-18 16:20:17 +00:00
Gleb Smirnoff
d2a707cdfa Remove a bunch of methods that are superseded by if_inc_counter().
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-18 16:17:20 +00:00
Gleb Smirnoff
df3601781d - Use if_inc_counter() to increment various counters.
- Do not ever set a counter to a value. For those counters
  that we don't increment, but return directly from hardware
  create cases in if_get_counter() method.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-18 15:56:14 +00:00
Will Andrews
cf7a096e72 bpobj_iterate_impl(): Close a refcount leak iterating on a sublist.
If bpobj_space() returned non-zero here, the sublist would have been
left open, along with the bonus buffer hold it requires.  This call
does not invoke any calls to bpobj_close() itself.

This bug doesn't have any known vector, but was found on inspection.

MFC after:	1 week
Sponsored by:	Spectra Logic
Affects:	All ZFS versions starting 21 May 2010 (illumos cde58dbc)
MFSpectraBSD:	r1050998 on 2014/03/26
2014-09-18 15:37:53 +00:00
Gleb Smirnoff
1b7fb1d93f While not too late rename 'ifnet_counter' to 'ift_counter'. One of the
imporant moments that we discussed with Marcel and Anuranjan was that
a converted driver should return false for 'grep ifnet if_driver.c' :)

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-18 14:47:13 +00:00
Gleb Smirnoff
b369bd548c Accidentially, ng_ppp changes leaked out with r271770. The proper
commit message should have been:

In case if ng_ppp(4) runs only IPv4, with one link, w/o any
encryption and compression, set faster rcvhook method.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>
2014-09-18 14:43:23 +00:00
Gleb Smirnoff
35853c2c60 Add a function to set if_get_counter method for an ifnet. To be used
in the drivers that are already converted to "Juniper drvapi". This
can be revisited in future.
2014-09-18 14:38:28 +00:00
Ed Maste
3bcd280e3b Switch to text mode in UEFI boot
The loader previously failed to display on MacBooks and other systems
where the UEFI firmware remained in graphics mode.

Submitted by:	Rafael Espíndola
2014-09-18 13:59:36 +00:00
Jean-Sébastien Pédron
18b21af2d2 vt(4): Use strncpy() to copy into a fixed-size buffer
CID:		1230007
MFC after:	3 days
2014-09-18 13:24:06 +00:00
Ed Maste
7f4b01c1fa Wrap long lines introduced in r268227 2014-09-18 13:00:03 +00:00
Jean-Sébastien Pédron
46867de5dd vt(4): Fix out-of-bounds array access in VT_ACTIVATE ioctl handling
CID:		1229964
MFC after:	3 days
2014-09-18 12:20:19 +00:00
Steven Hartland
d1d469e22b Remove unused ZFS ARC functions
* arc_data_buf_alloc
* arc_data_buf_free

MFC after:	1 week
Sponsored by:	Multiplay
2014-09-18 10:46:51 +00:00
Edward Tomasz Napierala
787b524980 Fix typos.
Sponsored by:	The FreeBSD Foundation
2014-09-18 10:33:23 +00:00
Gleb Smirnoff
277e067a58 While not too late rename if_get_counter_compat() to if_get_counter_default().
The compat counters will go away, but the function will remain in its place,
and in all places where it is going to be called.

Discussed with:	melifaro
2014-09-18 10:01:56 +00:00
Gleb Smirnoff
0b7b006c7f Add if_inc_counter(), a generic method to update ifnet(9) counter
w/o dereferencing the struct.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-18 09:54:57 +00:00
Konstantin Belousov
6dfc9e44fa - Use NULL instead of 0 for fpcurthread.
- Note the quirk with the interrupt enabled state of the dna handler.
- Use just panic() instead of printf() and panic().  Print tid instead
  of pid, the fpu state is per-thread.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-09-18 09:13:20 +00:00
Bjoern A. Zeeb
ea022094f2 For consistency with the shared header file (and to avoid confusion
with mbufs normally called *m in one place), rename the function
arguments to "mem".

This is a non-functional change.

Reviewed by:	gnn, eric.joyner intel.com
MFC after:	3 days
2014-09-18 08:56:25 +00:00
Bjoern A. Zeeb
581980cff8 Re-gen after r271743 implementing most of
timer_{create,settime,gettime,getoverrun,delete}.

MFC after:		3 days
Sponsored by:		DARPA, AFRL
2014-09-18 08:40:00 +00:00
Bjoern A. Zeeb
0a041f3b47 Implement most of timer_{create,settime,gettime,getoverrun,delete}
for amd64/linux32.  Fix the entirely bogus (untested) version from
r161310 for i386/linux using the same shared code in compat/linux.

It is unclear to me if we could support more clock mappings but
the current set allows me to successfully run commercial
32bit linux software under linuxolator on amd64.

Reviewed by:		jhb
Differential Revision:	D784
MFC after:		3 days
Sponsored by:		DARPA, AFRL
2014-09-18 08:36:45 +00:00