]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoAdd a knob to show 'Starting foo:' messages when faststart is used,
Doug Barton [Thu, 17 Sep 2009 19:05:47 +0000 (19:05 +0000)]
Add a knob to show 'Starting foo:' messages when faststart is used,
such as at boot time.

14 years agoFix the style of the previous commit.
Roman Divacky [Thu, 17 Sep 2009 17:48:13 +0000 (17:48 +0000)]
Fix the style of the previous commit.

Approved by: ed (mentor, implicit)

14 years agoMake these argument/variable unsigned as the defines for them don't fit
Roman Divacky [Thu, 17 Sep 2009 17:41:28 +0000 (17:41 +0000)]
Make these argument/variable unsigned as the defines for them don't fit
into signed 32bit integer.

Approved by: ed (mentor, implicit)
Approved by: sson

14 years agoPurge file system namecache when receiving incremental stream and rolling back
Pawel Jakub Dawidek [Thu, 17 Sep 2009 15:14:28 +0000 (15:14 +0000)]
Purge file system namecache when receiving incremental stream and rolling back
to it.

MFC after: 3 days

14 years agoSupport for VNET in SCTP (hopefully)
Randall Stewart [Thu, 17 Sep 2009 15:11:12 +0000 (15:11 +0000)]
Support for VNET in SCTP (hopefully)

14 years agoPurge namecache for the file system being rolled back, so it doesn't point at
Pawel Jakub Dawidek [Thu, 17 Sep 2009 14:58:21 +0000 (14:58 +0000)]
Purge namecache for the file system being rolled back, so it doesn't point at
invalid vnodes after the rollback resulting in EIO errors when trying to access
files which are in the namecache.

Reported by: des
MFC after: 3 days

14 years agoV_irtualize the lltables list, making ARP and ND reasonably
Marko Zec [Thu, 17 Sep 2009 14:52:15 +0000 (14:52 +0000)]
V_irtualize the lltables list, making ARP and ND reasonably
usable again with options VIMAGE kernels.

Submitted by: bz (the original version, probably identical to this one)
Reviewed by: many @ DevSummit Cambridge
MFC after: 3 days

14 years agoMake libc.a provide __stack_chk_fail_local weak alias. This is
Alexander Kabaev [Thu, 17 Sep 2009 13:21:53 +0000 (13:21 +0000)]
Make libc.a provide __stack_chk_fail_local weak alias. This is
needed to satisfy static libraries that are compiled with -fpic
and linked into static binary afterwards. Several libraries in
gcc are examples of such static libs.

14 years agoCorrect a sysctl name.
Christian Brueffer [Thu, 17 Sep 2009 13:12:24 +0000 (13:12 +0000)]
Correct a sysctl name.

PR: 137689
Submitted by: Thomas Mueller <tmueller@sysgo.com>
MFC after: 3 days

14 years agoFix an xref.
Christian Brueffer [Thu, 17 Sep 2009 13:09:08 +0000 (13:09 +0000)]
Fix an xref.

PR: 138833
Submitted by: Alex Keda <admin@lissyara.su>
MFC after: 3 days

14 years agoFix the example, -w is the right switch for write failure probability.
Christian Brueffer [Thu, 17 Sep 2009 13:04:46 +0000 (13:04 +0000)]
Fix the example, -w is the right switch for write failure probability.

PR: 136219
Submitted by: Kouki Hashimoto <hsmtkk@gmail.com>
Patch by: gavin
MFC after: 3 days

14 years agoAllocate space for the group array in a static credential used in
Brooks Davis [Thu, 17 Sep 2009 12:35:13 +0000 (12:35 +0000)]
Allocate space for the group array in a static credential used in
the quota code.  One case was correctly handled in r194498, but
this one was missed.

PR: kern/138657
Tested by: PR submitter
MFC after: 3 days

14 years agoSync driver with Yahoo:
Scott Long [Wed, 16 Sep 2009 23:27:14 +0000 (23:27 +0000)]
Sync driver with Yahoo:

- Implement MSI support (MSIX support was already there)
- Use a table to drive MSI/MSIX exceptions
- Pre-calculate the command address instead of wasting cycles doing the
  calculation on every i/o.

14 years agoFix locking around copyout() operations.
Scott Long [Wed, 16 Sep 2009 23:17:22 +0000 (23:17 +0000)]
Fix locking around copyout() operations.

14 years agoMake MSI and PERFORMANT interrupts work correctly. Only require the minimum
Scott Long [Wed, 16 Sep 2009 23:10:10 +0000 (23:10 +0000)]
Make MSI and PERFORMANT interrupts work correctly.  Only require the minimum
number of MSIX interrupts that are needed, and don't strictly check for 4.
Enable enough interrupt mask bits so that the controller will generate
interrupts in PERFORMANT mode.  This fixes the hang-on-boot issues that
people were seeing with newer controllers.

14 years agoIncrease CISS_MAX_PHYSTGT to 256 so that it matches what the controller might
Scott Long [Wed, 16 Sep 2009 22:52:20 +0000 (22:52 +0000)]
Increase CISS_MAX_PHYSTGT to 256 so that it matches what the controller might
give us.  Without this, certain data structures get sized incorrectly, leading
to a panic on certain cards that want to use high-value target numbers.

14 years agoThe buffer returned by fgenln is not a "C" string and might not be NUL
Stephane E. Potvin [Wed, 16 Sep 2009 19:53:29 +0000 (19:53 +0000)]
The buffer returned by fgenln is not a "C" string and might not be NUL
terminated. Make sure that it is before using it.

Reviewed by: marck@
MFC after: 3 days

14 years agoFix a bug reported by Daniel Mentz:
Michael Tuexen [Wed, 16 Sep 2009 14:23:31 +0000 (14:23 +0000)]
Fix a bug reported by Daniel Mentz:
When authenticating DATA chunks some DATA chunks
might get stuck when the MTU gets decreased via
an ICMP message.

Approved by: rrs (mentor)
MFC after: immediately

14 years agoWhen checking traffic endpoint's adresses families in key_spdadd(),
VANHULLEBUS Yvan [Wed, 16 Sep 2009 11:56:44 +0000 (11:56 +0000)]
When checking traffic endpoint's adresses families in key_spdadd(),
compare them together instead of comparing each one with respective
tunnel endpoint.

PR: kern/138439
Submitted by: aurelien.ansel@netasq.com
Obtained from: NETASQ
MFC after: 1 m

14 years agoRemove trailing spaces.
Edwin Groothuis [Wed, 16 Sep 2009 07:55:02 +0000 (07:55 +0000)]
Remove trailing spaces.

14 years agoExtend the keyboard character size to 24 bits.
Ed Schouten [Wed, 16 Sep 2009 07:01:11 +0000 (07:01 +0000)]
Extend the keyboard character size to 24 bits.

Because we use an int to store keyboard chacacters and their flags, we
can easily store the flags in the top byte instead of the second byte.
This means it's a lot easier to make Unicode work.

The only change that still needs to be made, is that keyent_t's map is
extended to u_int.

Obtained from: //depot/projects/newcons/sys/sys/kbio.h

14 years agoFix an off-by-one error in the marking of the O_CH operator
Diomidis Spinellis [Wed, 16 Sep 2009 06:32:23 +0000 (06:32 +0000)]
Fix an off-by-one error in the marking of the O_CH operator
following an OOR2 operator.

PR: 130504
MFC after: 2 weeks

14 years agoAdd a couple of debugging statements.
Diomidis Spinellis [Wed, 16 Sep 2009 06:29:23 +0000 (06:29 +0000)]
Add a couple of debugging statements.

14 years agoAdd the ability to see TCP timers via netstat -x. This can be a useful
Mike Silbersack [Wed, 16 Sep 2009 05:33:15 +0000 (05:33 +0000)]
Add the ability to see TCP timers via netstat -x.  This can be a useful
feature when you have a seemingly stuck socket and want to figure
out why it has not been closed yet.

No plans to MFC this, as it changes the netstat sysctl ABI.

Reviewed by: andre, rwatson, Eric Van Gyzen

14 years agoAdd EV_RECEIPT to kevents.
Stacey Son [Wed, 16 Sep 2009 03:49:54 +0000 (03:49 +0000)]
Add EV_RECEIPT to kevents.

EV_RECEIPT is useful to disambiguating error conditions when multiple
events structures are passed to kevent(2).  The error code is returned
in the data field and EV_ERROR is set.

Approved by: rwatson (co-mentor)

14 years agoAdd the EV_DISPATCH flag to kevents.
Stacey Son [Wed, 16 Sep 2009 03:37:39 +0000 (03:37 +0000)]
Add the EV_DISPATCH flag to kevents.

When the EV_DISPATCH flag is used the event source will be disabled
immediately after the delivery of an event.   This is similar to the
EV_ONESHOT flag but it doesn't delete the event.

Approved by: rwatson (co-mentor)

14 years agoAdd EVFILT_USER to kevents.
Stacey Son [Wed, 16 Sep 2009 03:30:12 +0000 (03:30 +0000)]
Add EVFILT_USER to kevents.

Add user events support to kernel events which are not associated with any
kernel mechanism but are triggered by user level code.  This is useful for
adding user level events to an event handler that may also be monitoring
kernel events.

Approved by: rwatson (co-mentor)

14 years agoAdd optional touch event filter hooks to kevents.
Stacey Son [Wed, 16 Sep 2009 03:15:57 +0000 (03:15 +0000)]
Add optional touch event filter hooks to kevents.

The touch event filter is called when a kernel event data is possibly
updated.  There are two hook points.  First, during a kevent() system
call.  Second, when an event has been triggered.

Approved by: rwatson (co-mentor)

14 years ago-Put the optimized soreceive_stream() under a compile time option called
Andre Oppermann [Tue, 15 Sep 2009 22:23:45 +0000 (22:23 +0000)]
-Put the optimized soreceive_stream() under a compile time option called
TCP_SORECEIVE_STREAM for the time being.

Requested by: brooks

Once compiled in make it easily switchable for testers by using a tuneable
 net.inet.tcp.soreceive_stream
and a corresponding read-only sysctl to report the current state.

Suggested by: rwatson

MFC after: 2 days

14 years agoReverting the previous change for now. Some users reports the patch
Qing Li [Tue, 15 Sep 2009 22:09:42 +0000 (22:09 +0000)]
Reverting the previous change for now. Some users reports the patch
fixes their issues but one reports a failure in NFS ROOT. Revert
the change for now pending further investigation.

Reviewed by: bz
MFC after: immediately

14 years agoAdd two test cases from PR 130504.
Diomidis Spinellis [Tue, 15 Sep 2009 21:15:29 +0000 (21:15 +0000)]
Add two test cases from PR 130504.
An additional one coming from http://www.research.att.com/~gsf/testregex/
was not added; at some point the entire AT&T regression test harness
should be imported here.
But that would also mean commitment to fix the uncovered errors.

PR: 130504
Submitted by: Chris Kuklewicz

14 years agoSelf pointing routes are installed for configured interface addresses
Qing Li [Tue, 15 Sep 2009 19:18:34 +0000 (19:18 +0000)]
Self pointing routes are installed for configured interface addresses
and address aliases. After an interface is brought down and brought
back up again, those self pointing routes disappeared. This patch
ensures after an interface is brought back up, the loopback routes
are reinstalled properly.

Reviewed by: bz
MFC after: immediately

14 years agoThis patch enables the node to respond to ARP requests for
Qing Li [Tue, 15 Sep 2009 18:39:27 +0000 (18:39 +0000)]
This patch enables the node to respond to ARP requests for
configured proxy ARP entries.

Reviewed by: bz
MFC after: immediately

14 years agoUse explicit int values for the device states in order to allow,
Attilio Rao [Tue, 15 Sep 2009 16:59:52 +0000 (16:59 +0000)]
Use explicit int values for the device states in order to allow,
if necessary, in the future, adds of new states without breaking ABI
between revisions.

Proposed by: kib
Approved by: imp

14 years agoFix sched_switch_migrate():
Attilio Rao [Tue, 15 Sep 2009 16:56:17 +0000 (16:56 +0000)]
Fix sched_switch_migrate():
- In 8.x and above the run-queue locks are nomore shared even in the
  HTT case, so remove the special case.
- The deadlock explained in the removed comment here is still possible
  even with different locks, with the contribution of tdq_lock_pair().
  An explanation is here:
  (hypotesis: a thread needs to migrate on another CPU, thread1 is doing
  sched_switch_migrate() and thread2 is the one handling the sched_switch()
  request or in other words, thread1 is the thread that needs to migrate
  and thread2 is a thread that is going to be preempted, most likely an
  idle thread. Also, 'old' is referred to the context (in terms of
  run-queue and CPU) thread1 is leaving and 'new' is referred to the
  context thread1 is going into.  Finally, thread3 is doing tdq_idletd()
  or sched_balance() and definitively doing tdq_lock_pair())

  * thread1 blocks its td_lock. Now td_lock is 'blocked'
  * thread1 drops its old runqueue lock
  * thread1 acquires the new runqueue lock
  * thread1 adds itself to the new runqueue and sends an IPI_PREEMPT
    through tdq_notify() to the new CPU
  * thread1 drops the new lock
  * thread3, scanning the runqueues, locks the old lock
  * thread2 received the IPI_PREEMPT and does thread_lock() with td_lock
    pointing to the new runqueue
  * thread3 wants to acquire the new runqueue lock, but it can't because
    it is held by thread2 so it spins
  * thread1 wants to acquire old lock, but as long as it is held by
    thread3 it can't
  * thread2 going further, at some point wants to switchin in thread1,
    but it will wait forever because thread1->td_lock is in blocked state

This deadlock has been manifested mostly on 7.x and reported several time
on mailing lists under the voice 'spinlock held too long'.
Many thanks to des@ for having worked hard on producing suitable textdumps
and Jeff for help on the comment wording.

Reviewed by: jeff
Reported by: des, others
Tested by: des, Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>
(STABLE_7 based version)

14 years agoForced unmounts work just fine in my tests under heavy load. There might
Pawel Jakub Dawidek [Tue, 15 Sep 2009 11:42:08 +0000 (11:42 +0000)]
Forced unmounts work just fine in my tests under heavy load. There might
still be a problem, but it isn't worth a warning.

14 years agoWe believe ZFS is ready for production use. Remove a warning about it being
Pawel Jakub Dawidek [Tue, 15 Sep 2009 11:34:53 +0000 (11:34 +0000)]
We believe ZFS is ready for production use. Remove a warning about it being
experimental. :)

14 years agoAccomodate old style XPT_IMMED_NOTIFY and XPT_NOTIFY_ACK so that
Matt Jacob [Tue, 15 Sep 2009 02:25:03 +0000 (02:25 +0000)]
Accomodate old style XPT_IMMED_NOTIFY and XPT_NOTIFY_ACK so that
we at least don't panic.

We don't really support dual role mode (INITIATOR/TARGET) any more. We
should but it's broken and will take a fair amount of effort to fix
and correctly manage both initiator and target roles sharing the port
database. So, for now, disallow it.

14 years agoSimply remove the code instead of using "#if 0".
Qing Li [Tue, 15 Sep 2009 02:22:57 +0000 (02:22 +0000)]
Simply remove the code instead of using "#if 0".

Pointed out by sam

14 years agoThe bootp code installs an interface address and the nfs client
Qing Li [Tue, 15 Sep 2009 01:01:03 +0000 (01:01 +0000)]
The bootp code installs an interface address and the nfs client
module tries to install the same address again. This extra code
is removed, which was discovered by the removal of a call to
in_ifscrub() in r196714. This call to in_ifscrub is put back here
because the SIOCAIFADDR command can be used to change the prefix
length of an existing alias.

Reviewed by:    kmacy

14 years agoFix some instances where CAM rescans get hung up or take a long time to
Kenneth D. Merry [Tue, 15 Sep 2009 00:15:24 +0000 (00:15 +0000)]
Fix some instances where CAM rescans get hung up or take a long time to
complete.

Also, allow xpt_rescan() to rescan a LUN instead of a full bus.

MFC after: 3 days
Sponsored by: Copan Systems, Inc.

14 years agoRestore (undocumented) support for early revisions and add more comments.
Jung-uk Kim [Mon, 14 Sep 2009 23:08:19 +0000 (23:08 +0000)]
Restore (undocumented) support for early revisions and add more comments.

Reported by: kris

14 years agoPreviously local end of point-to-point interface is not reachable
Qing Li [Mon, 14 Sep 2009 22:19:47 +0000 (22:19 +0000)]
Previously local end of point-to-point interface is not reachable
within the system that owns the interface. Packets destined to
the local end point leak to the wire towards the default gateway
if one exists. This behavior is changed as part of the L2/L3
rewrite efforts. The local end point is now reachable within the
system. The inpcb code needs to consider this fact during the
address selection process.

Reviewed by: bz
MFC after: immediately

14 years agoUse %zu for size_t.
Rui Paulo [Mon, 14 Sep 2009 21:33:00 +0000 (21:33 +0000)]
Use %zu for size_t.
Fix printf format string (again)

Pointed out by: bde, ed

14 years ago- Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular
Pawel Jakub Dawidek [Mon, 14 Sep 2009 21:10:40 +0000 (21:10 +0000)]
- Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular
  df(1) and mount(8) output. This is a bit smilar to OpenSolaris and follows
  ZFS route of not listing snapshots by default with 'zfs list' command.
- Add UPDATING entry to note that ZFS snapshots are no longer visible in
  mount(8) and df(1) output by default.

Reviewed by: kib
MFC after: 3 days

14 years agoModify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
Pawel Jakub Dawidek [Mon, 14 Sep 2009 21:08:22 +0000 (21:08 +0000)]
Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
does. This is not POLA violation, because there is no single file system in the
base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with
MNT_IGNORE after next commit.

Reviewed by: kib
MFC after: 3 days

14 years agoProtect cross-script invocation by checking that the target script exists.
Ed Maste [Mon, 14 Sep 2009 16:52:38 +0000 (16:52 +0000)]
Protect cross-script invocation by checking that the target script exists.
This allows pruning of rc.d scripts without getting too many ugly boottime
error messages.

Inspired by phk's r128714 change to netif.

14 years agoFix previous commit. I got it backwards.
Rui Paulo [Mon, 14 Sep 2009 16:16:07 +0000 (16:16 +0000)]
Fix previous commit. I got it backwards.

MFC after: 1 week

14 years agoFix printf format string in asmc_key_dump().
Rui Paulo [Mon, 14 Sep 2009 15:53:30 +0000 (15:53 +0000)]
Fix printf format string in asmc_key_dump().

Spotted by: tinderbox
MFC after: 1 week

14 years agoJohn Baldwin suggested that 'stolen memory' only happens in the case of
Nick Hibma [Mon, 14 Sep 2009 13:16:16 +0000 (13:16 +0000)]
John Baldwin suggested that 'stolen memory' only happens in the case of
i810 and therefore is useful info there. Aperture size and stolen memory
are now printed on one line.

Submitted by: jhb

14 years agoMake the sudden motion sensor work on older models and add a bit of
Rui Paulo [Mon, 14 Sep 2009 11:46:43 +0000 (11:46 +0000)]
Make the sudden motion sensor work on older models and add a bit of
debugging.

Submitted by: Christoph Langguth <christoph at rosenkeller.org>
MFC after: 1 week

14 years agoImprove the way failure of pthread_key_create() gets detected.
Edwin Groothuis [Mon, 14 Sep 2009 11:20:45 +0000 (11:20 +0000)]
Improve the way failure of pthread_key_create() gets detected.

PR: threads/138603
Submitted by: Mikulas Patocka
MFC after: 1 week

14 years agoEnable BIOS modes on amd64.
Xin LI [Mon, 14 Sep 2009 05:38:03 +0000 (05:38 +0000)]
Enable BIOS modes on amd64.

Submitted by: paradox <ddkprog at yahoo com>

14 years agoLast character is a space for the international currency symbol.
Edwin Groothuis [Sun, 13 Sep 2009 22:17:23 +0000 (22:17 +0000)]
Last character is a space for the international currency symbol.

14 years agoANSIfy, whitespace and comment adjustments, to simplify comparing these
Ed Maste [Sun, 13 Sep 2009 21:51:01 +0000 (21:51 +0000)]
ANSIfy, whitespace and comment adjustments, to simplify comparing these
files with NetBSD / OpenBSD versions.

14 years agoSupport both case: when snapshot is already mounted and when it is not yet
Pawel Jakub Dawidek [Sun, 13 Sep 2009 21:40:36 +0000 (21:40 +0000)]
Support both case: when snapshot is already mounted and when it is not yet
mounted.

MFC after: 3 days

14 years agoLock the ifnet list while iterating over it.
Marko Zec [Sun, 13 Sep 2009 21:30:18 +0000 (21:30 +0000)]
Lock the ifnet list while iterating over it.

Submitted by: julian
MFC after: 3 days

14 years agoCorrect a copy and paste error using the variable name from the
Bjoern A. Zeeb [Sun, 13 Sep 2009 20:19:02 +0000 (20:19 +0000)]
Correct a copy and paste error using the variable name from the
legacy IP handling rather than the IPv6 version.

Reported by: Pegasus Mc Cleaft (ken mthelicon.com)
Tested by: Pegasus Mc Cleaft (ken mthelicon.com)
MFC after: 2 days
X-MFX with: r197139

14 years agoMake sure we never place the cursor outside the screen.
Ed Schouten [Sun, 13 Sep 2009 18:45:59 +0000 (18:45 +0000)]
Make sure we never place the cursor outside the screen.

For some vague reason, it may be possible that scp->cursor_pos exceeds
scp->ysize * scp->xsize. This means that teken_set_cursor() may get
called with an invalid position. Just ignore the old cursor position in
this case.

Reported by: Paul B. Mahol <onemda gmail com>
MFC after: 1 month

14 years agoFixes two bugs:
Randall Stewart [Sun, 13 Sep 2009 17:45:31 +0000 (17:45 +0000)]
Fixes two bugs:
1) A lock issue, if we ever had to try again
   we would double lock the INP lock.
2) We were allowing (at wrap) associd 0... which really
   we cannot allow since 0 normally means in most socket
   API calls that we are wishing to effect something on
   the INP not TCB.

MFC after: 1 week

14 years agoAdd missing \n.
Pawel Jakub Dawidek [Sun, 13 Sep 2009 17:30:56 +0000 (17:30 +0000)]
Add missing \n.

Reported by: marck

14 years agoWork-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
Pawel Jakub Dawidek [Sun, 13 Sep 2009 16:05:20 +0000 (16:05 +0000)]
Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
by just returning EOPNOTSUPP. This will allow NFS server to fall back to
regular READDIR.

Note that converting inode number to snapshot's vnode is expensive operation.
Snapshots are stored in AVL tree, but based on their names, not inode numbers,
so to convert inode to snapshot vnode we have to interate over all snalshots.

This is not a problem in OpenSolaris, because in their READDIRPLUS
implementation they use VOP_LOOKUP() on d_name, instead of VFS_VGET() on
d_fileno as we do.

PR: kern/125149
Reported by: Weldon Godfrey <wgodfrey@ena.com>
Analysis by: Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 3 days

14 years agoRevert r196779 in order to implement a different scheme for newbus locking
Attilio Rao [Sun, 13 Sep 2009 15:08:19 +0000 (15:08 +0000)]
Revert r196779 in order to implement a different scheme for newbus locking
methodology.

Requested by: imp

14 years agoFactor out the duplicated macro for the device type used in the
Marius Strobl [Sun, 13 Sep 2009 14:47:31 +0000 (14:47 +0000)]
Factor out the duplicated macro for the device type used in the
OFW device tree for PCI bridges and add a new one for PCI Express.
While at it, take advantage of the former for the rman(9) work-
around in jbusppm(4).

14 years agoBump our namespace version for 9.0.
Daniel Eischen [Sun, 13 Sep 2009 13:15:36 +0000 (13:15 +0000)]
Bump our namespace version for 9.0.

Add a comment about keeping the private namespace at the end of
the dependency chain.

14 years agoMFi386:
Yoshihiro Takahashi [Sun, 13 Sep 2009 11:20:17 +0000 (11:20 +0000)]
MFi386:

Move the loader's entry point to 0x200000.  This change is also needed
for pc98.

MFC after: 3 days

14 years agoAdd a couple of small fixes from the AMD folks.
Robert Noland [Sun, 13 Sep 2009 11:10:38 +0000 (11:10 +0000)]
Add a couple of small fixes from the AMD folks.

- max tex height is 8192
- increment src/dst by the full transfer amount

MFC after: 3 days

14 years agoAdd missing pci id for Radeon 4850 X2
Robert Noland [Sun, 13 Sep 2009 11:08:06 +0000 (11:08 +0000)]
Add missing pci id for Radeon 4850 X2

MFC after: 3 days

14 years agoWhen zfs.ko is compiled with debug, make sure that znode and vnode point at
Pawel Jakub Dawidek [Sun, 13 Sep 2009 10:33:51 +0000 (10:33 +0000)]
When zfs.ko is compiled with debug, make sure that znode and vnode point at
each other.

MFC after: 3 days

14 years agoExtend scope of the z_teardown_lock lock for consistency and "just in case".
Pawel Jakub Dawidek [Sun, 13 Sep 2009 10:29:51 +0000 (10:29 +0000)]
Extend scope of the z_teardown_lock lock for consistency and "just in case".

MFC after: 3 days

14 years agoBe sure not to overflow struct fid.
Pawel Jakub Dawidek [Sun, 13 Sep 2009 10:25:33 +0000 (10:25 +0000)]
Be sure not to overflow struct fid.

MFC after: 3 days

14 years agoThere is a bug where mze_insert() can trigger an assert() of inserting
Pawel Jakub Dawidek [Sun, 13 Sep 2009 10:12:29 +0000 (10:12 +0000)]
There is a bug where mze_insert() can trigger an assert() of inserting
the same entry twice. This bug is not fixed yet, but leads to situation
where when try to access corrupted directory the kernel will panic.
Until the bug is properly fixed, try to recover from it and log that it
happened.

Reported by: marck
OpenSolaris bug: 6709336
MFC after: 3 days

14 years agoIn expire_mfc(), add an assert on the multicast forwarding cache mutex.
Bruce M Simpson [Sun, 13 Sep 2009 01:00:24 +0000 (01:00 +0000)]
In expire_mfc(), add an assert on the multicast forwarding cache mutex.

PR: 138666

14 years agoAdd missing comments and whitespace clean-ups.
Hiroki Sato [Sat, 12 Sep 2009 23:01:36 +0000 (23:01 +0000)]
Add missing comments and whitespace clean-ups.

14 years agoUse is_wired_interface() instead of hard-coded interface device
Hiroki Sato [Sat, 12 Sep 2009 23:00:01 +0000 (23:00 +0000)]
Use is_wired_interface() instead of hard-coded interface device
names.

Pointed out by: sam

14 years agoThe following changes are added because of
Hiroki Sato [Sat, 12 Sep 2009 22:22:31 +0000 (22:22 +0000)]
The following changes are added because of
network_ipv6->rc.d/netif integration:

- $ipv6_enable is now obsolete.  Instead, IPv6 is enabled by
  default if the kernel supports it, and $ipv6_network_interfaces
  is "none" by default.  If you want to use IPv6, define
  $ipv6_network_interfaces and $ifconfig_xxx_ipv6.

  An interface which is in $network_interfaces and not in
  $ipv6_network_interfaces will be marked as "inet6
  -auto_linklocal ifdisabled" (see ifconfig(8)).

- $ipv6_ifconfig_xxx is renamed to ifconfig_xxx_ipv6 for
  consistency with other address families.  The old variables
  still work but can be removed in the future.  Note that
  ipv6_ifconfig_xxx="..." should be replaced with
  ifconfig_xxx_ipv6="inet6 ...".

- Receiving ICMPv6 Router Advertisement is not automatically
  enabled even if there is no manual configuration of IPv6 in
  rc.conf.  If you want it, define
  ifconfig_xxx_ipv6="inet6 ... accept_rtadv".

- The rc.d/ip6addrctl now chooses address selection policy based
  on $ipv6_prefer, not $ipv6_enable.  The default is
  ipv6_prefer=NO.

- $router* and $ipv6_router* are replaced with $routed_* and
  $route6d_* for consistency.  The old variables still work but
  can be removed in the future.

MFC after: 3 days

14 years agoAdd an extension of set_rcvar(), a new function set_rcvar_obsolete(),
Hiroki Sato [Sat, 12 Sep 2009 22:19:48 +0000 (22:19 +0000)]
Add an extension of set_rcvar(), a new function set_rcvar_obsolete(),
and $desc.

The set_rcvar_obsolete() is for displaying an obsolete variable
and the new one.  More specifically, a warning is displayed when
a variable is removed or changed in the source tree and the user
still defines the old one.

$router* and $ipv6_router* are replaced with $routed_* and
$route6d_* for consistency.  The old variables still work but
can be removed in the future.

MFC after: 3 days

14 years agoUse RCng coding convention.
Hiroki Sato [Sat, 12 Sep 2009 22:17:52 +0000 (22:17 +0000)]
Use RCng coding convention.

MFC after: 3 days

14 years agoDocument accept_rev_ethip_ver and send_rev_ethip_ver flags of
Hiroki Sato [Sat, 12 Sep 2009 22:17:13 +0000 (22:17 +0000)]
Document accept_rev_ethip_ver and send_rev_ethip_ver flags of
EtherIP (gif(4) + if_bridge(8)).

MFC after: 3 days

14 years agoAdd support for ND6_IFF_IFDISABLED and ND6_IFF_ACCEPT_RTADV to
Hiroki Sato [Sat, 12 Sep 2009 22:14:58 +0000 (22:14 +0000)]
Add support for ND6_IFF_IFDISABLED and ND6_IFF_ACCEPT_RTADV to
the -F flag.

MFC after: 3 days

14 years ago- Add "AUTO" keyword support in $rtadvd_interfaces.
Hiroki Sato [Sat, 12 Sep 2009 22:14:21 +0000 (22:14 +0000)]
- Add "AUTO" keyword support in $rtadvd_interfaces.
- Wrap a long line.

MFC after: 3 days

14 years agoIntegrate rc.d/network_ipv6 into rc.d/netif:
Hiroki Sato [Sat, 12 Sep 2009 22:13:41 +0000 (22:13 +0000)]
Integrate rc.d/network_ipv6 into rc.d/netif:

- Add rc.d/stf and rc.d/faith for stf(4) and faith(4).
- Remove rc.d/auto_linklocal and rc.d/network_ipv6.
- Move rc.d/sysctl to just before FILESYSTEMS because rc.d/netif
  depends on some sysctl variables.

Reviewed by: brooks
MFC after: 3 days

14 years agoImprove flexibility of receiving Router Advertisement and
Hiroki Sato [Sat, 12 Sep 2009 22:08:20 +0000 (22:08 +0000)]
Improve flexibility of receiving Router Advertisement and
automatic link-local address configuration:

- Convert a sysctl net.inet6.ip6.accept_rtadv to one for the
  default value of a per-IF flag ND6_IFF_ACCEPT_RTADV, not a
  global knob.  The default value of the sysctl is 0.

- Add a new per-IF flag ND6_IFF_AUTO_LINKLOCAL and convert a
  sysctl net.inet6.ip6.auto_linklocal to one for its default
  value.  The default value of the sysctl is 1.

- Make ND6_IFF_IFDISABLED more robust.  It can be used to disable
  IPv6 functionality of an interface now.

- Receiving RA is allowed if ip6_forwarding==0 *and*
  ND6_IFF_ACCEPT_RTADV is set on that interface.  The former
  condition will be revisited later to support a "host + router" box
  like IPv6 CPE router.  The current behavior is compatible with
  the older releases of FreeBSD.

- The ifconfig(8) now supports these ND6 flags as well as "nud",
  "prefer_source", and "disabled" in ndp(8).  The ndp(8) now
  supports "auto_linklocal".

Discussed with: bz and jinmei
Reviewed by: bz
MFC after: 3 days

14 years agoMake sure callouts are not processed one tick late.
Luigi Rizzo [Sat, 12 Sep 2009 21:44:34 +0000 (21:44 +0000)]
Make sure callouts are not processed one tick late.
The problem was introduced in SVN 180608/ rev 1.114 and affects
all users of callout_reset() (including select, usleep, setitimer).
A better fix probably involves replicating 'ticks' in the
struct callout_cpu; this commit is just a temporary thing so that
we can MFC it after a suitable test time and RE approval.

MFC after: 3 days

14 years agoComment some flawed assumptions in inp_join_group() about
Bruce M Simpson [Sat, 12 Sep 2009 20:37:44 +0000 (20:37 +0000)]
Comment some flawed assumptions in inp_join_group() about
mixing SSM full-state and delta-based APIs.

ENOTIME to fix right now.  No functional changes.

MFC after: 5 days

14 years agoDon't allow joins w/o source on an existing group.
Bruce M Simpson [Sat, 12 Sep 2009 20:18:23 +0000 (20:18 +0000)]
Don't allow joins w/o source on an existing group.
This is almost always pilot error.

We don't need to check for group filter UNDEFINED state at t1,
because we only ever allocate filters with their groups, so we
unconditionally reject such calls with EINVAL.
Trying to change the active filter mode w/o going through IP_MSFILTER
is also disallowed.

Deals with the case described in PR 137164 upfront, cumulative
with the fix in svn rev 197132 which only calls imo_match_source()
if the source address family was not unspecified.

PR: 137164
MFC after: 5 days

14 years agoUse C99 initialization for struct filterops.
Robert Watson [Sat, 12 Sep 2009 20:03:45 +0000 (20:03 +0000)]
Use C99 initialization for struct filterops.

Obtained from: Mac OS X
Sponsored by: Apple Inc.
MFC after: 3 weeks

14 years ago- Protect reclaim with z_teardown_inactive_lock.
Pawel Jakub Dawidek [Sat, 12 Sep 2009 19:53:31 +0000 (19:53 +0000)]
- Protect reclaim with z_teardown_inactive_lock.
- Be prepared for dbuf to disappear in zfs_reclaim_complete() and check if
  z_dbuf field is NULL - this might happen in case of rollback or forced
  unmount between zfs_freebsd_reclaim() and zfs_reclaim_complete().
- On forced unmount wait for all znodes to be destroyed - destruction can be
  done asynchronously via zfs_reclaim_complete().

MFC after: 1 week

14 years agoTighten input checking in inp_join_group():
Bruce M Simpson [Sat, 12 Sep 2009 19:45:55 +0000 (19:45 +0000)]
Tighten input checking in inp_join_group():
 * Don't try to use the source address, when its family is unspecified.
 * If we get a join without a source, on an existing inclusive
   mode group, this is an error, as it would change the filter mode.

Fix a problem with the handling of in_mfilter for new memberships:
 * Do not rely on imf being NULL; it is explicitly initialized to a
   non-NULL pointer when constructing a membership.
 * Explicitly initialize *imf to EX mode when the source address
   is unspecified.

This fixes a problem with in_mfilter slot recycling in the join path.

PR: 138690
Submitted by: Stef Walter
MFC after: 5 days

14 years agoTighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
Pawel Jakub Dawidek [Sat, 12 Sep 2009 19:27:54 +0000 (19:27 +0000)]
Tighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
NULL, but also can point to dead vnode, take that into account.

PR: kern/132068
Reported by: Edward Fisk" <7ogcg7g02@sneakemail.com>, kris
Fix based on patch from: Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 1 week

14 years agoFix an obvious logic error in the IPv4 multicast leave processing,
Bruce M Simpson [Sat, 12 Sep 2009 19:07:03 +0000 (19:07 +0000)]
Fix an obvious logic error in the IPv4 multicast leave processing,
where the filter mode vector was not updated correctly after the leave.

PR: 138691
Submitted by: Stef Walter
MFC after: 5 days

14 years agoFix an API issue in leave processing for IPv4 multicast groups.
Bruce M Simpson [Sat, 12 Sep 2009 18:55:15 +0000 (18:55 +0000)]
Fix an API issue in leave processing for IPv4 multicast groups.
 * Do not assume that the group lookup performed by imo_match_group()
   is valid when ifp is NULL in this case.
 * Instead, return EADDRNOTAVAIL if the ifp cannot be resolved for the
   membership we are being asked to leave.

Caveat user:
 * The way IPv4 multicast memberships are implemented in the inpcb layer
   at the moment, has the side-effect that struct ip_moptions will
   still hold the membership, under the old ifp, until ip_freemoptions()
   is called for the parent inpcb.
 * The underlying issue is: the inpcb layer does not get notification
   of ifp being detached going away in a thread-safe manner.
   This is non-trivial to fix.

But hey, at least the kernel should't panic when you unplug a card.

PR: 138689
Submitted by: Stef Walter
MFC after: 5 days

14 years agointpm: add support for smbus controller found in AMD SB700
Andriy Gapon [Sat, 12 Sep 2009 18:24:31 +0000 (18:24 +0000)]
intpm: add support for smbus controller found in AMD SB700

According to the specifications AMD/ATI SMBus controller is very
similar to SMBus controller found in PIIX4.
Some notable differences:
 o different bit for enabling/signalling regular interrupt mode
 o in practice seems to support only polling mode
Thus, intpm driver is modified to support polling-only mode
and to recognize SB700 PCI ID and differences.

Tested on: SB700 and PIIX4E platforms
Reviewed by: jhb
MFC after: 2 weeks
X-Perhaps-ToDo: rename the driver to reflect its function
and supported hardware

14 years agoifconfig now needs -ljail
Luigi Rizzo [Sat, 12 Sep 2009 15:50:08 +0000 (15:50 +0000)]
ifconfig now needs -ljail
(this needs to go to RELENG_8 as well after the release is out)

MFC after: 1 month

14 years agoCommit a change that I missed in the previous commit.
Ed Schouten [Sat, 12 Sep 2009 14:46:22 +0000 (14:46 +0000)]
Commit a change that I missed in the previous commit.

I ran `svn commit' in sys/teken/, instead of sys/.

14 years agoCommit all local modifications I have to libteken:
Ed Schouten [Sat, 12 Sep 2009 12:44:21 +0000 (12:44 +0000)]
Commit all local modifications I have to libteken:

- Make xterm/cons25 support runtime configurable. This allows me to
  share libteken between syscons and my new vt driver.
- Add a fix to print blanks after printing a double width character to
  prevent rendering artifacts.
- Add some more utility functions that I use in the vt driver.

14 years agoSmall style(9) bug introduced in the previous commit.
Ed Schouten [Sat, 12 Sep 2009 10:41:32 +0000 (10:41 +0000)]
Small style(9) bug introduced in the previous commit.

14 years agoMake 8-bit support run-time configurable.
Ed Schouten [Sat, 12 Sep 2009 10:34:34 +0000 (10:34 +0000)]
Make 8-bit support run-time configurable.

Now to do the same for xterm support. This means people can eventually
toy around with xterm+UTF-8 without recompiling their kernel.

14 years agoMake resizing of teken terminals a bit more safe.
Ed Schouten [Sat, 12 Sep 2009 08:19:24 +0000 (08:19 +0000)]
Make resizing of teken terminals a bit more safe.

Just perform a full reset when resizing the terminal. This means the
cursor, scrolling region, etc. are never positioned outside the
terminal.

14 years agoFix typo in example.
Dag-Erling Smørgrav [Sat, 12 Sep 2009 01:37:22 +0000 (01:37 +0000)]
Fix typo in example.

Noticed by: rookie@
MFC after: 1 week