]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoAdd myself to calendars.freebsd.
dim [Mon, 30 Aug 2010 21:20:24 +0000 (21:20 +0000)]
Add myself to calendars.freebsd.

Approved by: rpaulo (mentor)

13 years agoSave MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
jkim [Mon, 30 Aug 2010 21:19:42 +0000 (21:19 +0000)]
Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.

13 years agoAdd myself to committers-src.dot.
dim [Mon, 30 Aug 2010 21:18:59 +0000 (21:18 +0000)]
Add myself to committers-src.dot.

Approved by: rpaulo (mentor)

13 years agoVendor update to version 3.80.06.003 to fix a panic with ZFS when under
delphij [Mon, 30 Aug 2010 19:15:04 +0000 (19:15 +0000)]
Vendor update to version 3.80.06.003 to fix a panic with ZFS when under
heavy I/O load.

Many thanks to LSI for continuing to support FreeBSD.

PR: kern/149968
Submitted by: LSI (Tom Couch)
Reported by: Kai Kockro <kkockro web de>
Tested by: Kai Kockro, jpaetzel
MFC after: 7 days

13 years agoWhen DTrace is enabled, make sure we don't overwrite the IDT_DTRACE_RET
rpaulo [Mon, 30 Aug 2010 18:12:21 +0000 (18:12 +0000)]
When DTrace is enabled, make sure we don't overwrite the IDT_DTRACE_RET
entry with an IRQ for some hardware component.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation

13 years agoexecve(2) has a special check for file permissions: a file must have at
jh [Mon, 30 Aug 2010 16:30:18 +0000 (16:30 +0000)]
execve(2) has a special check for file permissions: a file must have at
least one execute bit set, otherwise execve(2) will return EACCES even
for an user with PRIV_VFS_EXEC privilege.

Add the check also to vaccess(9), vaccess_acl_nfs4(9) and
vaccess_acl_posix1e(9). This makes access(2) to better agree with
execve(2). Because ZFS doesn't use vaccess(9) for VEXEC, add the check
to zfs_freebsd_access() too. There may be other file systems which are
not using vaccess*() functions and need to be handled separately.

PR: kern/125009
Reviewed by: bde, trasz
Approved by: pjd (ZFS part)

13 years agoRegen
kib [Mon, 30 Aug 2010 14:26:02 +0000 (14:26 +0000)]
Regen

13 years agoMake the syscalls reserved for AFS usable by OpenAFS port.
kib [Mon, 30 Aug 2010 14:24:44 +0000 (14:24 +0000)]
Make the syscalls reserved for AFS usable by OpenAFS port.

Submitted by: Benjamin Kaduk <kaduk mit edu>
MFC after: 2 weeks

13 years agoMove debug.h to the the rge driver directory. rge.c is the only user of
jchandra [Mon, 30 Aug 2010 13:26:07 +0000 (13:26 +0000)]
Move debug.h to the the rge driver directory. rge.c is the only user of
debug.h. Remove debug.h references from other files.

13 years agoClean up header files in RMI platform code (sys/mips/rmi), and remove
jchandra [Mon, 30 Aug 2010 13:05:21 +0000 (13:05 +0000)]
Clean up header files in RMI platform code (sys/mips/rmi), and remove
unused files.

- remove clock.c and clock.h, these are not used after the new timer
  code was added.
- remove duplicated include files, fix header file ordering, remove
  some unneeded includes.
- rename mips/rmi/shared_structs.h which contains the RMI boot loader
  interface to mips/rmi/rmi_boot_info.h. Remove unused files
  mips/rmi/shared_structs_func.h and sys/mips/rmi/shared_structs_offsets.h
- merge mips/rmi/xlrconfig.h and mips/rmi/rmi_mips_exts.h, and remove
  duplicated functions.
- nlge - minor change to remove unneeded argument.
- Add FreeBSD svn keyword for headers

13 years agoo Some programs could send broadcast/multicast traffic to ipfw
maxim [Mon, 30 Aug 2010 09:29:51 +0000 (09:29 +0000)]
o Some programs could send broadcast/multicast traffic to ipfw
pseudo-interface.  This leads to a panic due to uninitialized
if_broadcastaddr address.  Initialize it and implement ip_output()
method to prevent mbuf leak later.

ipfw pseudo-interface should never send anything therefore call
panic(9) in if_start() method.

PR: kern/149807
Submitted by: Dmitrij Tejblum
MFC after: 2 weeks

13 years agoRemove misleading comment in pte.h. MIPS PTE entries are software managed
jchandra [Mon, 30 Aug 2010 08:23:22 +0000 (08:23 +0000)]
Remove misleading comment in pte.h. MIPS PTE entries are software managed
and does not need atomics.

Submitted by: alc

13 years agoMake flags in usage() and SYNOPSYS more style(9)-ish.
maxim [Mon, 30 Aug 2010 07:29:27 +0000 (07:29 +0000)]
Make flags in usage() and SYNOPSYS more style(9)-ish.

Suggested by: brian
MFC after: 3 days

13 years agoExecute hook when connection between the nodes is established or lost.
pjd [Mon, 30 Aug 2010 00:31:30 +0000 (00:31 +0000)]
Execute hook when connection between the nodes is established or lost.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoExecute hook when split-brain is detected.
pjd [Mon, 30 Aug 2010 00:12:10 +0000 (00:12 +0000)]
Execute hook when split-brain is detected.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoUse sigtimedwait(2) for signals handling in primary process.
pjd [Mon, 30 Aug 2010 00:06:05 +0000 (00:06 +0000)]
Use sigtimedwait(2) for signals handling in primary process.
This fixes various races and eliminates use of pthread* API in signal handler.

Pointed out by: kib
With help from: jilles
MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years ago- Move functionality responsible for checking one connection to separate
pjd [Sun, 29 Aug 2010 22:55:21 +0000 (22:55 +0000)]
- Move functionality responsible for checking one connection to separate
  function to make code more readable.
- Be sure not to reconnect too often in case of signal delivery, etc.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoCorrect value for _POSIX_AIO_LISTIO_MAX in <limits.h>.
jilles [Sun, 29 Aug 2010 22:22:15 +0000 (22:22 +0000)]
Correct value for _POSIX_AIO_LISTIO_MAX in <limits.h>.

All the "Minimum Values" (POSIX.1-2008 XBD 13 Headers <limits.h>) are now
correct. These should all be exactly as they are in the specification; the
possibly higher values we support are announced differently.

PR: standards/104743
Submitted by: gcooper
MFC after: 2 weeks

13 years agoDisconnect after logging errors.
pjd [Sun, 29 Aug 2010 22:17:53 +0000 (22:17 +0000)]
Disconnect after logging errors.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years ago- Call hook on role change.
pjd [Sun, 29 Aug 2010 21:42:45 +0000 (21:42 +0000)]
- Call hook on role change.
- Document new event.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoAllow to run hooks from the main hastd process.
pjd [Sun, 29 Aug 2010 21:41:53 +0000 (21:41 +0000)]
Allow to run hooks from the main hastd process.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years ago- Add hook_fini() which should be called after fork() from the main hastd
pjd [Sun, 29 Aug 2010 21:39:49 +0000 (21:39 +0000)]
- Add hook_fini() which should be called after fork() from the main hastd
  process, once it start to use hooks.
- Add hook_check_one() in case the caller expects different child processes
  and once it can recognize it, it will pass pid and status to hook_check_one().

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoImplement mtx_destroy() and rw_destroy().
pjd [Sun, 29 Aug 2010 21:37:21 +0000 (21:37 +0000)]
Implement mtx_destroy() and rw_destroy().

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agosh: Weaken builtins/command4 test to only require a nonzero exit status.
jilles [Sun, 29 Aug 2010 20:53:24 +0000 (20:53 +0000)]
sh: Weaken builtins/command4 test to only require a nonzero exit status.

This matches what is in POSIX; various other shells use different exit
statuses.

Note that it is still required that there be no output.

13 years agoGive user a hint what to do when /usr/lib/zfs/pyzfs.py is missing.
pjd [Sun, 29 Aug 2010 20:25:25 +0000 (20:25 +0000)]
Give user a hint what to do when /usr/lib/zfs/pyzfs.py is missing.

MFC after: 2 weeks

13 years agoPrint errors on stderr.
pjd [Sun, 29 Aug 2010 20:21:10 +0000 (20:21 +0000)]
Print errors on stderr.

MFC after: 2 weeks

13 years agoFix 'zfs allow' (maybe not only) returning:
pjd [Sun, 29 Aug 2010 20:18:06 +0000 (20:18 +0000)]
Fix 'zfs allow' (maybe not only) returning:

cannot access dataset system/usr/home: Operation not supported

by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to
be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM
when buffer is too small and sets field zc_nvlist_dst_size to the size that
will be big enough for the data. In FreeBSD case ioctl() doesn't copy data
structure back in case of a failure. We work-around it in kernel and libzfs by
returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't
changed. For this work-around to work in pyzfs we need this compatible ioctl()
which is implemented in libzfs_impl.h.

MFC after: 2 weeks

13 years agoFix the the SCTP_WITH_NO_CSUM option when used in combination with
tuexen [Sun, 29 Aug 2010 18:50:30 +0000 (18:50 +0000)]
Fix the the SCTP_WITH_NO_CSUM option when used in combination with
interface supporting CRC offload. While at it, make use of the
feature that the loopback interface provides CRC offloading.

MFC after: 4 weeks

13 years agoAvoid a race in the allocation of new segment IDs that could result in
nwhitehorn [Sun, 29 Aug 2010 18:17:38 +0000 (18:17 +0000)]
Avoid a race in the allocation of new segment IDs that could result in
memory corruption on heavily loaded SMP systems.

MFC after: 2 weeks

13 years agoUse NULL instead of 0 for pointer in example.
kib [Sun, 29 Aug 2010 16:38:08 +0000 (16:38 +0000)]
Use NULL instead of 0 for pointer in example.

MFC after: 3 days

13 years agoTouch the man page date after updating the ustar limitations.
brian [Sun, 29 Aug 2010 12:17:16 +0000 (12:17 +0000)]
Touch the man page date after updating the ustar limitations.

MFC after: 3 weeks

13 years agoAdd a Makefile for tools/regression/bin and support 'all' in
brian [Sun, 29 Aug 2010 12:14:53 +0000 (12:14 +0000)]
Add a Makefile for tools/regression/bin and support 'all' in
pax/Makefile.

MFC after: 3 weeks

13 years agoCorrect an out-by-one error when earlying out ustar filenames that
brian [Sun, 29 Aug 2010 11:56:56 +0000 (11:56 +0000)]
Correct an out-by-one error when earlying out ustar filenames that
are too long.  Filenames escaping this test are caught later on,
so the bug doesn't cause any breakage.

Document the correct ustar limitations in pax.  As I have no access
to the IEEE 1003.2 spec, I can only assume that the limitations
imposed are in fact correct.

Add regression tests for the filename limitations imposed by pax.

MFC after: 3 weeks

13 years agogsched(8): fix example usage, mdoc nits
uqs [Sun, 29 Aug 2010 11:32:41 +0000 (11:32 +0000)]
gsched(8): fix example usage, mdoc nits

- ad0 was referred to as da0
- wrong parameter -s instead of -a in example
- use double quotes consistently

PR:            docs/150082
Submitted by:  N.J. Mann <njm@njm.me.uk>
MFC after:     2 weeks

13 years agoApply MIPS pmap clean up patch from alc@ (with minor change to KASSERT):
jchandra [Sun, 29 Aug 2010 05:39:21 +0000 (05:39 +0000)]
Apply MIPS pmap clean up patch from alc@ (with minor change to KASSERT):

  PMAP_DIAGNOSTIC was eliminated from amd64/i386, and, in fact, the
  non-MIPS parts of the kernel, several years ago.  Any of the interesting
  checks were turned into KASSERT()s.  Basically, the motivation was that
  lots of people run with INVARIANTS but no one runs with DIAGNOSTIC.

  panic strings needn't and shouldn't have a terminating newline.

  Finally, there is one functional change.  The sched_pin() in
  pmap_remove_pages() is an artifact of the way we temporarily map page
  table pages on i386.  (The mappings are processor private.  We don't do
  a system-wide shootdown.)  It isn't needed by MIPS.

Tested by: jchandra

Submitted by: alc

13 years agoAdd acquisition of a reference count on nfsv4root_lock to the
rmacklem [Sat, 28 Aug 2010 23:50:09 +0000 (23:50 +0000)]
Add acquisition of a reference count on nfsv4root_lock to the
nfsd_recalldelegation() function, since this function is called
by nfsd threads when they are handling NFSv2 or NFSv3 RPCs, where
no reference count would have been acquired.

MFC after: 2 weeks

13 years agoThe timer routine in the experimental NFS server did not acquire
rmacklem [Sat, 28 Aug 2010 21:41:18 +0000 (21:41 +0000)]
The timer routine in the experimental NFS server did not acquire
the correct mutex when checking nfsv4root_lock. Although this
could be fixed by adding mutex lock/unlock calls, zack.kirsch at
isilon.com suggested a better fix that uses a non-blocking
acquisition of a reference count on nfsv4root_lock. This fix
allows the weird NFSLOCKSTATE(); NFSUNLOCKSTATE(); synchronization
to be deleted. This patch applies this fix.

Tested by: zack.kirsch at isilon.com
MFC after: 2 weeks

13 years agoBugfix: Do not send a packet drop report in response to a received
tuexen [Sat, 28 Aug 2010 21:15:00 +0000 (21:15 +0000)]
Bugfix: Do not send a packet drop report in response to a received
        INIT-ACK with incorrect CRC.

13 years agoNow that we default to the proper endian, we don't need these for mips
imp [Sat, 28 Aug 2010 21:06:13 +0000 (21:06 +0000)]
Now that we default to the proper endian, we don't need these for mips

13 years agoReturn NULL pointer instead of B_FALSE as it is done in the vendor code.
pjd [Sat, 28 Aug 2010 19:29:06 +0000 (19:29 +0000)]
Return NULL pointer instead of B_FALSE as it is done in the vendor code.

Obtained from: //depot/user/pjd/zfs/...

13 years agoMove ZUT_OBJS in the same place that is used in vendor code.
pjd [Sat, 28 Aug 2010 19:28:12 +0000 (19:28 +0000)]
Move ZUT_OBJS in the same place that is used in vendor code.

Obtained from: //depot/user/pjd/zfs/...

13 years agoNew driver nlge for XLR/XLS Network Accelerator. This will support the XGMAC
jchandra [Sat, 28 Aug 2010 19:02:51 +0000 (19:02 +0000)]
New driver nlge for XLR/XLS Network Accelerator. This will support the XGMAC
and XAUI 10G interfaces in addition RGMII/SGMII 1G interfaces.  This driver
is work in progress.

board.c and board.h expanded to include more info.

Only one of rge and nlge can be enabled at a time, rge will be deprecated
when nlge stabilizes.

Submitted by: Sriram Gorti <srgorti at netlogicmicro com>

13 years agoFix the switching on/off of CMT using sysctl and socket option.
tuexen [Sat, 28 Aug 2010 17:59:51 +0000 (17:59 +0000)]
Fix the switching on/off of CMT using sysctl and socket option.
Fix the switching on/off of PF and NR-SACKs using sysctl.
Add minor improvement in handling malloc failures.
Improve the address checks when sending.

MFC after: 4 weeks

13 years agoFor some file types, select code registers two selfd structures. E.g.,
kib [Sat, 28 Aug 2010 17:42:08 +0000 (17:42 +0000)]
For some file types, select code registers two selfd structures. E.g.,
for socket, when specified POLLIN|POLLOUT in events, you would have one
selfd registered for receiving socket buffer, and one for sending. Now,
if both events are not ready to fire at the time of the initial scan,
but are simultaneously ready after the sleep, pollrescan() would iterate
over the pollfd struct twice. Since both times revents is not zero,
returned value would be off by one.

Fix this by recalculating the return value in pollout().

PR: kern/143029
MFC after: 2 weeks

13 years agoTest the poll(2) return value.
kib [Sat, 28 Aug 2010 17:38:40 +0000 (17:38 +0000)]
Test the poll(2) return value.

MFC after: 2 weeks

13 years agoAdd the MAP_PREFAULT_READ option to mmap(2).
alc [Sat, 28 Aug 2010 16:57:07 +0000 (16:57 +0000)]
Add the MAP_PREFAULT_READ option to mmap(2).

Reviewed by: jhb, kib

13 years agoFix incorrect usage of 'assure' and 'insure'.
brucec [Sat, 28 Aug 2010 16:32:01 +0000 (16:32 +0000)]
Fix incorrect usage of 'assure' and 'insure'.

Approved by: rrs (mentor)

13 years agoFix breakage introduced in r211725 and improve functionality of truss on
nwhitehorn [Sat, 28 Aug 2010 15:04:53 +0000 (15:04 +0000)]
Fix breakage introduced in r211725 and improve functionality of truss on
64-bit powerpc by adding 32-bit compatibility features.

13 years agoRepair some build breakage introduced in r211725 and garbage collect some
nwhitehorn [Sat, 28 Aug 2010 15:03:11 +0000 (15:03 +0000)]
Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.

13 years agoImport changes from OpenSolaris that provide
mm [Sat, 28 Aug 2010 09:24:11 +0000 (09:24 +0000)]
Import changes from OpenSolaris that provide
- better ACL caching and speedup of ACL permission checks
- faster handling of stat()
- lowered mutex contention in the read/writer lock (rrwlock)
- several related bugfixes

Detailed information (OpenSolaris onnv changesets and Bug IDs):

9749:105f407a2680
6802734 Support for Access Based Enumeration (not used on FreeBSD)
6844861 inconsistent xattr readdir behavior with too-small buffer

9866:ddc5f1d8eb4e
6848431 zfs with rstchown=0 or file_chown_self privilege allows user to "take" ownership

9981:b4907297e740
6775100 stat() performance on files on zfs should be improved
6827779 rrwlock is overly protective of its counters

10143:d2d432dfe597
6857433 memory leaks found at: zfs_acl_alloc/zfs_acl_node_alloc
6860318 truncate() on zfsroot succeeds when file has a component of its path set without access permission

10232:f37b85f7e03e
6865875 zfs sometimes incorrectly giving search access to a dir

10250:b179ceb34b62
6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault)

10269:2788675568fd
6868276 zfs_rezget() can be hazardous when znode has a cached ACL

10295:f7a18a1e9610
6870564 panic in zfs_getsecattr

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs)
MFC after: 2 weeks

13 years agoUpdate ZFS metaslab code from OpenSolaris.
mm [Sat, 28 Aug 2010 08:59:55 +0000 (08:59 +0000)]
Update ZFS metaslab code from OpenSolaris.
This provides a noticeable write speedup, especially on pools with
less than 30% of free space.

Detailed information (OpenSolaris onnv changesets and Bug IDs):

11146:7e58f40bcb1c
6826241 Sync write IOPS drops dramatically during TXG sync
6869229 zfs should switch to shiny new metaslabs more frequently

11728:59fdb3b856f6
6918420 zdb -m has issues printing metaslab statistics

12047:7c1fcc8419ca
6917066 zfs block picking can be improved

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6826241686922969184206917066)
MFC after: 2 weeks

13 years agoThere is a bug in vfs_allocate_syncvnode() failure handling in mount code.
pjd [Sat, 28 Aug 2010 08:57:15 +0000 (08:57 +0000)]
There is a bug in vfs_allocate_syncvnode() failure handling in mount code.
Actually it is hard to properly handle such a failure, especially in MNT_UPDATE
case. The only reason for the vfs_allocate_syncvnode() function to fail is
getnewvnode() failure. Fortunately it is impossible for current implementation
of getnewvnode() to fail, so we can assert this and make
vfs_allocate_syncvnode() void. This in turn free us from handling its failures
in the mount code.

Reviewed by: kib
MFC after: 1 month

13 years agoRemove debugging.
rpaulo [Sat, 28 Aug 2010 08:39:37 +0000 (08:39 +0000)]
Remove debugging.

Sponsored by: The FreeBSD Foundation

13 years agoRun all tasks from a proper context, with proper priority, etc.
pjd [Sat, 28 Aug 2010 08:38:03 +0000 (08:38 +0000)]
Run all tasks from a proper context, with proper priority, etc.

Reviewed by: jhb
MFC after: 1 month

13 years agoCorrect offset conversion to little endian. It was implemented in version 2,
pjd [Sat, 28 Aug 2010 08:30:20 +0000 (08:30 +0000)]
Correct offset conversion to little endian. It was implemented in version 2,
but because of a bug it was a no-op, so we were still using offsets in native
byte order for the host. Do it properly this time, bump version to 4 and set
the G_ELI_FLAG_NATIVE_BYTE_ORDER flag when version is under 4.

MFC after: 2 weeks

13 years agoAdd the path necessary to find fasttrap_isa.h to CFLAGS.
rpaulo [Sat, 28 Aug 2010 08:18:20 +0000 (08:18 +0000)]
Add the path necessary to find fasttrap_isa.h to CFLAGS.

Sponsored by: The FreeBSD Foundation

13 years agoReplace a memory barrier with a mutex barrier.
rpaulo [Sat, 28 Aug 2010 08:13:38 +0000 (08:13 +0000)]
Replace a memory barrier with a mutex barrier.

Sponsored by: The FreeBSD Foundation

13 years agoRegister an interrupt vector for DTrace return probes. There is some
rpaulo [Sat, 28 Aug 2010 08:03:29 +0000 (08:03 +0000)]
Register an interrupt vector for DTrace return probes. There is some
code missing in lapic to make sure that we don't overwrite this entry,
but this will be done on a sequent commit.

Sponsored by: The FreeBSD Foundation

13 years agoInitial code for XLR CompactFlash driver.
jchandra [Sat, 28 Aug 2010 07:58:10 +0000 (07:58 +0000)]
Initial code for XLR CompactFlash driver.

Submitted by: Sreekanth M. S. <kanthms at netlogicmicro com>

13 years agoMFata(4):
mav [Sat, 28 Aug 2010 07:24:45 +0000 (07:24 +0000)]
MFata(4):
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

13 years agoAdd Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
mav [Sat, 28 Aug 2010 07:10:51 +0000 (07:10 +0000)]
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

Submitted by: jfv@
MFC after: 1 week

13 years agoDo not allocate multicast array memory in multicast filter
yongari [Sat, 28 Aug 2010 00:34:22 +0000 (00:34 +0000)]
Do not allocate multicast array memory in multicast filter
configuration function. For failed memory allocations, em(4)/lem(4)
called panic(9) which is not acceptable on production box.
igb(4)/ixgb(4)/ix(4) allocated the required memory in stack which
consumed 768 bytes of stack memory which looks too big.

To address these issues, allocate multicast array memory in device
attach time and make multicast configuration success under any
conditions. This change also removes the excessive use of memory in
stack.

Reviewed by: jfv

13 years agoAdd Intel Cougar Point PCH HD Audio Controller ID
jfv [Sat, 28 Aug 2010 00:23:13 +0000 (00:23 +0000)]
Add Intel Cougar Point PCH HD Audio Controller ID

MFC in a week

13 years agoIf em(4) failed to allocate RX buffers, do not call panic(9).
yongari [Sat, 28 Aug 2010 00:16:49 +0000 (00:16 +0000)]
If em(4) failed to allocate RX buffers, do not call panic(9).
Just showing some buffer allocation error is more appropriate
action for drivers. This should fix occasional panic reported on
em(4) when driver encountered resource shortage.

Reviewed by: jfv

13 years agoAdd Intel Cougar Point PCH LPC Controller Device IDs
jfv [Sat, 28 Aug 2010 00:09:46 +0000 (00:09 +0000)]
Add Intel Cougar Point PCH LPC Controller Device IDs
for watchdog support. Also add additional Intel Ibex
Peak (5 Series/3400 Series) PCH IDs.

MFC after a week

13 years agoDo not call voluntary panic(9) in case of if_alloc() failure.
yongari [Sat, 28 Aug 2010 00:09:19 +0000 (00:09 +0000)]
Do not call voluntary panic(9) in case of if_alloc() failure.

Reviewed by: jfv

13 years agoMake sure not to access unallocated stats memory.
yongari [Fri, 27 Aug 2010 23:50:13 +0000 (23:50 +0000)]
Make sure not to access unallocated stats memory.

Reviewed by: jfv

13 years agoAdd support for Intel Cougar Point SMBus controller.
jfv [Fri, 27 Aug 2010 23:24:08 +0000 (23:24 +0000)]
Add support for Intel Cougar Point SMBus controller.

MFC afer 1 week

13 years agoMFp4 CH=182972:
bz [Fri, 27 Aug 2010 23:22:58 +0000 (23:22 +0000)]
MFp4 CH=182972:

Add explicit linkstate UP/DOWN for the epair.  This is needed by carp(4)
and other things to work.

MFC after: 5 days

13 years agoUse ZFS_CTLDIR_NAME instead of hardcoding ".zfs".
pjd [Fri, 27 Aug 2010 21:31:15 +0000 (21:31 +0000)]
Use ZFS_CTLDIR_NAME instead of hardcoding ".zfs".

13 years agoWhen SIGTERM or SIGINT is received, terminate worker processes.
pjd [Fri, 27 Aug 2010 21:28:02 +0000 (21:28 +0000)]
When SIGTERM or SIGINT is received, terminate worker processes.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoWhen logging to stdout/stderr, flush after each log.
pjd [Fri, 27 Aug 2010 21:26:55 +0000 (21:26 +0000)]
When logging to stdout/stderr, flush after each log.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoCorrect when we log interrupted synchronization.
pjd [Fri, 27 Aug 2010 21:20:32 +0000 (21:20 +0000)]
Correct when we log interrupted synchronization.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoCheck if no signals were delivered just before going to sleep.
pjd [Fri, 27 Aug 2010 20:49:06 +0000 (20:49 +0000)]
Check if no signals were delivered just before going to sleep.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoAdd hooks execution.
pjd [Fri, 27 Aug 2010 20:48:12 +0000 (20:48 +0000)]
Add hooks execution.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoDo not call __pthread_cxa_finalize with invalid struct dl_phdr_info.
kib [Fri, 27 Aug 2010 19:57:17 +0000 (19:57 +0000)]
Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info.

Reported and tested by: Fabian Keil <freebsd-listen fabiankeil de>
MFC after: 17 days

13 years agoRevamp XLR interrupt handling, the previous scheme does not work well on
jchandra [Fri, 27 Aug 2010 19:53:57 +0000 (19:53 +0000)]
Revamp XLR interrupt handling, the previous scheme does not work well on
SMP.

We used to route all PIC based interrupts to cpu 0, and used the per-CPU
interrupt mask to enable/disable interrupts. But the interrupt threads can
run on any cpu on SMP, and the interrupt thread will re-enable the interrupts
on the CPU it runs on when it is done, and not on cpu0 where the PIC will
still send interrupts to.

The fix is move the disable/enable for PIC based interrupts to PIC, we will
ack on PIC only when the interrupt thread is done, and we do not use the
per-CPU interrupt mask.

The changes also introduce a way for subsystems to add a function that
will be called to clear the interrupt on the subsystem. Currently This is
used by the PCI/PCIe for doing additional work during the interrupt
handling.

13 years agoSimplify the tcp pcblist estimate logic slightly.
jhb [Fri, 27 Aug 2010 18:17:46 +0000 (18:17 +0000)]
Simplify the tcp pcblist estimate logic slightly.

MFC after: 3 days

13 years agoDocument new 'exec' parameter.
pjd [Fri, 27 Aug 2010 15:20:31 +0000 (15:20 +0000)]
Document new 'exec' parameter.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoAllow to execute specified program on various HAST events.
pjd [Fri, 27 Aug 2010 15:16:52 +0000 (15:16 +0000)]
Allow to execute specified program on various HAST events.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years ago- Run hooks in background - don't block waiting for them to finish.
pjd [Fri, 27 Aug 2010 14:38:12 +0000 (14:38 +0000)]
- Run hooks in background - don't block waiting for them to finish.
- Keep all hooks we're running in a global list, so we can report when
  they finish and also report when they are running for too long.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoWhen logging to stdout/stderr don't close those descriptors after fork().
pjd [Fri, 27 Aug 2010 14:35:39 +0000 (14:35 +0000)]
When logging to stdout/stderr don't close those descriptors after fork().

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoReduce indent where possible.
pjd [Fri, 27 Aug 2010 14:28:39 +0000 (14:28 +0000)]
Reduce indent where possible.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoImplement keepalive mechanism inside HAST protocol so we can detect secondary
pjd [Fri, 27 Aug 2010 14:26:37 +0000 (14:26 +0000)]
Implement keepalive mechanism inside HAST protocol so we can detect secondary
node failures quickly for HAST resources that are rarely modified.

Remove XXX from a comment now that the guard thread never sleeps infinitely.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years ago- Remove redundant and incorrect 'old' word from debug message.
pjd [Fri, 27 Aug 2010 14:12:53 +0000 (14:12 +0000)]
- Remove redundant and incorrect 'old' word from debug message.
- Log disconnects as warnings.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoDon't increase number synchronized bytes in case of an error.
pjd [Fri, 27 Aug 2010 14:10:25 +0000 (14:10 +0000)]
Don't increase number synchronized bytes in case of an error.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoLog that synchronization was interrupted in a proper place.
pjd [Fri, 27 Aug 2010 14:08:10 +0000 (14:08 +0000)]
Log that synchronization was interrupted in a proper place.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoWe have sync_start() function to start synchronization, introduce sync_stop()
pjd [Fri, 27 Aug 2010 14:06:00 +0000 (14:06 +0000)]
We have sync_start() function to start synchronization, introduce sync_stop()
function to stop it.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoAdd QUEUE_INSERT() and QUEUE_TAKE() macros that simplify the code a bit.
pjd [Fri, 27 Aug 2010 14:01:28 +0000 (14:01 +0000)]
Add QUEUE_INSERT() and QUEUE_TAKE() macros that simplify the code a bit.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoAdd mtx_owned() implementation.
pjd [Fri, 27 Aug 2010 13:58:38 +0000 (13:58 +0000)]
Add mtx_owned() implementation.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoMake comment more readable.
pjd [Fri, 27 Aug 2010 13:54:17 +0000 (13:54 +0000)]
Make comment more readable.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

13 years agoUse timestamp modulo comparison macro for automatic receive buffer
andre [Fri, 27 Aug 2010 12:34:53 +0000 (12:34 +0000)]
Use timestamp modulo comparison macro for automatic receive buffer
scaling to correctly handle wrapping of ticks value.

MFC after: 1 week

13 years agoDon't attempt to write label with GEOM_BSD based method if the class is
jh [Fri, 27 Aug 2010 11:08:11 +0000 (11:08 +0000)]
Don't attempt to write label with GEOM_BSD based method if the class is
not available. This improves error reporting when bsdlabel(8) is unable
to open a device for writing. If GEOM_BSD was unavailable, only a rather
obscure error message "Class not found" was printed.

PR: bin/58390
Reviewed by: ae
Discussed with: marcel
MFC after: 1 month

13 years agoUse private namespace for visibility keyword.
kib [Fri, 27 Aug 2010 09:55:51 +0000 (09:55 +0000)]
Use private namespace for visibility keyword.

Noted by: bde
MFC after: 3 days

13 years agoFix an off-by-one error where we try to split a path name that's
brian [Fri, 27 Aug 2010 08:54:40 +0000 (08:54 +0000)]
Fix an off-by-one error where we try to split a path name that's
more than 100 characters long and the 101th last character is a
'/'.

MFC after: 3 weeks

13 years agoWhitespace fixes in mips/include, remove unused 'struct tlb' from locore.h
jchandra [Fri, 27 Aug 2010 07:45:50 +0000 (07:45 +0000)]
Whitespace fixes in mips/include, remove unused 'struct tlb' from locore.h

PR: misc/147471

13 years agopmap_mapdev() does not appear to actually need GIANT to be held here,
nwhitehorn [Fri, 27 Aug 2010 05:29:59 +0000 (05:29 +0000)]
pmap_mapdev() does not appear to actually need GIANT to be held here,
and asserting that is held breaks drm.

MFC after: 2 weeks

13 years agoUnregister thread specific data destructor when a corresponding dso
davidxu [Fri, 27 Aug 2010 05:20:22 +0000 (05:20 +0000)]
Unregister thread specific data destructor when a corresponding dso
is unloaded.

13 years agoclear lock to zero state if it is destroyed.
davidxu [Fri, 27 Aug 2010 03:23:07 +0000 (03:23 +0000)]
clear lock to zero state if it is destroyed.

13 years agoUpdate comment now that I finally committed r211854.
pjd [Thu, 26 Aug 2010 23:44:32 +0000 (23:44 +0000)]
Update comment now that I finally committed r211854.

MFC after: 1 month