]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

13 years ago- When VFS_VGET() is not supported, switch to VOP_LOOKUP().
pjd [Thu, 26 Aug 2010 23:41:40 +0000 (23:41 +0000)]
- When VFS_VGET() is not supported, switch to VOP_LOOKUP().
- We are fine by only share-locking the vnode.
- Remove assertion that doesn't hold for ZFS where we cross mount points
  boundaries by going into .zfs/snapshot/<name>/.

Reviewed by: rmacklem
MFC after: 1 month

13 years ago- Check the result of malloc(M_NOWAIT) in replay_alloc(). The caller
pjd [Thu, 26 Aug 2010 23:33:04 +0000 (23:33 +0000)]
- Check the result of malloc(M_NOWAIT) in replay_alloc(). The caller
  (replay_alloc()) knows how to handle replay_alloc() failure.
- Eliminate 'freed_one' variable, it is not needed - when no entry is found
  rce will be NULL.
- Add locking assertions where we expect a rc_lock to be held.

Reviewed by: rmacklem
MFC after: 2 weeks

13 years agoSet de_dir for user created symbolic links. This will be needed to be
jh [Thu, 26 Aug 2010 16:01:29 +0000 (16:01 +0000)]
Set de_dir for user created symbolic links. This will be needed to be
able to resolve their parent directories.

13 years agoMake sure TARGET_ABI is defined. TARGET_ABI will die a horrible death
imp [Thu, 26 Aug 2010 15:49:52 +0000 (15:49 +0000)]
Make sure TARGET_ABI is defined.  TARGET_ABI will die a horrible death
after we get all of TBEMD merged back into head, and make mips64 imply
n64, so don't bother to make this 100% pretty.  You'll have to settle
for only 64% pretty.

13 years agoGuard against TARGET_ABI being undefined (TARGET_ABI will go away soon)
imp [Thu, 26 Aug 2010 14:54:12 +0000 (14:54 +0000)]
Guard against TARGET_ABI being undefined (TARGET_ABI will go away soon)

13 years agoMark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid
rpaulo [Thu, 26 Aug 2010 13:04:16 +0000 (13:04 +0000)]
Mark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid
segfaults when building with clang.

This comes (partly) from the LLVM svn r41105.

13 years agoMark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
rpaulo [Thu, 26 Aug 2010 13:00:29 +0000 (13:00 +0000)]
Mark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
avoid segfaults when building with clang.

Permission to backport given by Jan hubicka <jh at suse.cz>.

13 years agoInstall dtruss.
rpaulo [Thu, 26 Aug 2010 11:46:38 +0000 (11:46 +0000)]
Install dtruss.

Sponsored by: The FreeBSD Foundation

13 years agoAdd a man page for dtruss.
rpaulo [Thu, 26 Aug 2010 11:45:39 +0000 (11:45 +0000)]
Add a man page for dtruss.

Sponsored by: The FreeBSD Foundation

13 years agoSync DTrace bits with amd64 and fix the build.
rpaulo [Thu, 26 Aug 2010 11:22:12 +0000 (11:22 +0000)]
Sync DTrace bits with amd64 and fix the build.

Sponsored by: The FreeBSD Foundation

13 years agoFix typo.
kib [Thu, 26 Aug 2010 11:20:57 +0000 (11:20 +0000)]
Fix typo.

Submitted by: Ben Kaduk <minimarmot gmail com>

13 years agoeliminate unused code.
davidxu [Thu, 26 Aug 2010 09:04:27 +0000 (09:04 +0000)]
eliminate unused code.

13 years agoDecrease rdlock count only when thread unlocked a reader lock.
davidxu [Thu, 26 Aug 2010 07:09:48 +0000 (07:09 +0000)]
Decrease rdlock count only when thread unlocked a reader lock.

MFC after: 3 days

13 years agoUgly kludge to paper over some kind of ld bug and/or misuse: don't
imp [Thu, 26 Aug 2010 05:25:51 +0000 (05:25 +0000)]
Ugly kludge to paper over some kind of ld bug and/or misuse: don't
build uathload on mips n64 either.

13 years agoRescue doesn't work for n64.
imp [Thu, 26 Aug 2010 05:16:00 +0000 (05:16 +0000)]
Rescue doesn't work for n64.

13 years agoAdd mutex locking for the call to replay_prune() in
rmacklem [Wed, 25 Aug 2010 23:23:00 +0000 (23:23 +0000)]
Add mutex locking for the call to replay_prune() in
replay_setsize(), since replay_prune() expects the
rc_lock to be held when it is called.

MFC after: 2 weeks

13 years agoFix a debugging message under bootverbose. This address is not linear.
jkim [Wed, 25 Aug 2010 22:48:18 +0000 (22:48 +0000)]
Fix a debugging message under bootverbose.  This address is not linear.

13 years agoAdd an experimental feature to shadow video BIOS. Long ago, this trick was
jkim [Wed, 25 Aug 2010 22:09:02 +0000 (22:09 +0000)]
Add an experimental feature to shadow video BIOS.  Long ago, this trick was
supported by many BIOSes to improve performance of VESA BIOS calls for real
mode OSes but it is not our intention here.  However, this may help some
platforms where the video ROMs are inaccessible after suspend, for example.
Note it may consume up to 64K bytes of contiguous memory depending on video
controller model when it is enabled.  This feature can be disabled by
setting zero to 'debug.vesa.shadow_rom' loader tunable via loader(8) or
loader.conf(5).  The default is 1 (enabled), for now.