]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFix mdoc, typos, contractions.
brueffer [Fri, 18 Sep 2009 14:05:56 +0000 (14:05 +0000)]
Fix mdoc, typos, contractions.

This includes:
PR: 135520
Submitted by: Nobuyuki Koganemaru
Patch by: gavin
MFC after: 3 days

14 years agoDon't allocate new unnecessary pages when devstat_alloc() looses the
attilio [Fri, 18 Sep 2009 13:48:38 +0000 (13:48 +0000)]
Don't allocate new unnecessary pages when devstat_alloc() looses the
run for re-acuiring the lock, but recheck if new pages are allocatable
from the pool and free the previously allocated ones.

Tested by: pho, Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>

14 years agoSpell Israel correctly.
ed [Fri, 18 Sep 2009 13:44:39 +0000 (13:44 +0000)]
Spell Israel correctly.

Submitted by: Alexey Savartsov <asavartsov gmail com>
PR: bin/138580

14 years agoCall mwl_rxdma_cleanup() if there was an error setting up the RX DMA.
rpaulo [Fri, 18 Sep 2009 12:25:31 +0000 (12:25 +0000)]
Call mwl_rxdma_cleanup() if there was an error setting up the RX DMA.

14 years agoStyle fix - break too long a line in two.
zec [Fri, 18 Sep 2009 09:03:23 +0000 (09:03 +0000)]
Style fix - break too long a line in two.

Spotted by: bz
MFC after: 3 days

14 years agoo DragonflyBSD 2.4.0 added.
maxim [Fri, 18 Sep 2009 07:07:34 +0000 (07:07 +0000)]
o DragonflyBSD 2.4.0 added.

14 years agoVarious mdoc, spelling etc fixes.
brueffer [Fri, 18 Sep 2009 00:33:47 +0000 (00:33 +0000)]
Various mdoc, spelling etc fixes.

MFC after: 3 days

14 years agoFixed markup.
ru [Thu, 17 Sep 2009 19:15:49 +0000 (19:15 +0000)]
Fixed markup.

14 years agoChange the default transport protocol for use by the Mount protocol
rmacklem [Thu, 17 Sep 2009 19:08:15 +0000 (19:08 +0000)]
Change the default transport protocol for use by the Mount protocol
from UDP to TCP, so that it is consistent with TCP for NFS, which
became the default at r176198. Without this change, doing an NFS mount
against a server that only supports UDP would result in an unusable
mount point if a transport protocol option wasn't specified for the
mount.

Approved by: kib (mentor)
MFC after: 3 days

14 years agoAdd a knob to show 'Starting foo:' messages when faststart is used,
dougb [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.
rdivacky [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
rdivacky [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
pjd [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)
rrs [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
pjd [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
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
kan [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.
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.
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.
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 [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:
scottl [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.
scottl [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
scottl [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
scottl [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
sepotvin [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:
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(),
vanhu [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 [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 [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
dds [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.
dds [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
silby [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.
sson [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.
sson [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.
sson [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.
sson [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 [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
-This line, and those below, will be ignored--
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    sys/conf/options
M    sys/kern/uipc_socket.c
M    sys/netinet/tcp_subr.c
M    sys/netinet/tcp_usrreq.c

14 years agoReverting the previous change for now. Some users reports the patch
qingli [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.
dds [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
qingli [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
qingli [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 [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 [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
pjd [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
pjd [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
mjacob [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".
qingli [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
qingli [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
ken [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.
jkim [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
qingli [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.
rpaulo [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
pjd [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)
pjd [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.
emaste [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.
rpaulo [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().
rpaulo [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
n_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
rpaulo [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 [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.
delphij [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 [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
emaste [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
pjd [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.
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
bz [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 [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:
rrs [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.
pjd [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
pjd [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 [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 [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.
deischen [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:
nyan [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.
rnoland [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
rnoland [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
pjd [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".
pjd [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.
pjd [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
pjd [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

15 years agoIn expire_mfc(), add an assert on the multicast forwarding cache mutex.
bms [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

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

15 years agoUse is_wired_interface() instead of hard-coded interface device
hrs [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

15 years agoThe following changes are added because of
hrs [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

15 years agoAdd an extension of set_rcvar(), a new function set_rcvar_obsolete(),
hrs [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

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

MFC after: 3 days

15 years agoDocument accept_rev_ethip_ver and send_rev_ethip_ver flags of
hrs [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

15 years agoAdd support for ND6_IFF_IFDISABLED and ND6_IFF_ACCEPT_RTADV to
hrs [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

15 years ago- Add "AUTO" keyword support in $rtadvd_interfaces.
hrs [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

15 years agoIntegrate rc.d/network_ipv6 into rc.d/netif:
hrs [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

15 years agoImprove flexibility of receiving Router Advertisement and
hrs [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

15 years agoMake sure callouts are not processed one tick late.
luigi [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

15 years agoComment some flawed assumptions in inp_join_group() about
bms [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

15 years agoDon't allow joins w/o source on an existing group.
bms [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

15 years agoUse C99 initialization for struct filterops.
rwatson [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

15 years ago- Protect reclaim with z_teardown_inactive_lock.
pjd [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

15 years agoTighten input checking in inp_join_group():
bms [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

15 years agoTighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
pjd [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

15 years agoFix an obvious logic error in the IPv4 multicast leave processing,
bms [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