]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoIFC @ r245509
neel [Thu, 17 Jan 2013 07:04:37 +0000 (07:04 +0000)]
IFC @ r245509

11 years agoUse the VA_UTIMES_NULL flag to detect when NULL was passed to utimes()
jhb [Wed, 16 Jan 2013 21:52:31 +0000 (21:52 +0000)]
Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes()
instead of comparing the desired time against the current time as a
heuristic.

Reviewed by: rmacklem
MFC after: 1 week

11 years agoAdd myself and my mentor relationship.
carl [Wed, 16 Jan 2013 19:05:49 +0000 (19:05 +0000)]
Add myself and my mentor relationship.

Approved by: jimharris (mentor)

11 years agoUse a different way to silence clang analyzer as done in r245494 by
delphij [Wed, 16 Jan 2013 18:15:25 +0000 (18:15 +0000)]
Use a different way to silence clang analyzer as done in r245494 by
explicitly telling the compiler that we are on the exit route.

X-MFC: together with r245494

11 years agoFix style bugs
ganbold [Wed, 16 Jan 2013 08:04:55 +0000 (08:04 +0000)]
Fix style bugs
Use defined constant instead of variable for reg_shift
Change u_int32_t to uint32_t

Approved by: gonzo
Suggested by: bde, wkoszek

11 years agoRemove the filtering of the acceptable mount options for nullfs, added
kib [Wed, 16 Jan 2013 05:32:49 +0000 (05:32 +0000)]
Remove the filtering of the acceptable mount options for nullfs, added
in r245004.  Although the report was for noatime option which is
non-functional for the nullfs, other standard options like nosuid or
noexec are useful with it.

Reported by: Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au>
MFC after: 3 days

11 years agoFree memory before exiting in order to silence a warning from the clang
eadler [Wed, 16 Jan 2013 05:03:52 +0000 (05:03 +0000)]
Free memory before exiting in order to silence a warning from the clang
static analyzer

Approved by: cperciva
MFC after:  3 days

11 years agoRemove unused variables
eadler [Wed, 16 Jan 2013 05:03:49 +0000 (05:03 +0000)]
Remove unused variables

Approved by: cperciva
MFC After: 3 days

11 years agoCorrect prefix for "locally installed things"
eadler [Wed, 16 Jan 2013 05:03:46 +0000 (05:03 +0000)]
Correct prefix for "locally installed things"

Approved by: cperciva
MFC After: 3 days

11 years agoAvoid clobbering errno with a call to fprintf
eadler [Wed, 16 Jan 2013 05:00:51 +0000 (05:00 +0000)]
Avoid clobbering errno with a call to fprintf

PR: bin/173923
Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: cperciva
MFC After: 3 days

11 years agoAdd D-Link DFE-520TX (rev. C1) to HARDWARE section.
yongari [Wed, 16 Jan 2013 02:22:56 +0000 (02:22 +0000)]
Add D-Link DFE-520TX (rev. C1) to HARDWARE section.

MFC After: 1 week

11 years agoAdd D-Link DFE-520TX rev C1.
yongari [Wed, 16 Jan 2013 01:30:46 +0000 (01:30 +0000)]
Add D-Link DFE-520TX rev C1.

Tested by: Ruslan Makhmatkhanov < cvs-src <> yandex dot ru >
MFC After: 1 week

11 years agoReports pools which have a removed l2cache disk under -x as this is what
smh [Tue, 15 Jan 2013 23:34:24 +0000 (23:34 +0000)]
Reports pools which have a removed l2cache disk under -x as this is what
happens when a cache device is dropped for any reason.

Reviewed by: pjd
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoUse armv7_drain_writebuf() and armv7_context_switch, instead of the arm11
cognet [Tue, 15 Jan 2013 22:11:28 +0000 (22:11 +0000)]
Use armv7_drain_writebuf() and armv7_context_switch, instead of the arm11
variants.

11 years agoOnly spin on the blocked_lock for SCHED_ULE+SMP, as it's done on the other
cognet [Tue, 15 Jan 2013 22:09:11 +0000 (22:09 +0000)]
Only spin on the blocked_lock for SCHED_ULE+SMP, as it's done on the other
arches.

11 years ago- More properly handle interrupted NFS requests on an interruptible mount
jhb [Tue, 15 Jan 2013 22:08:17 +0000 (22:08 +0000)]
- More properly handle interrupted NFS requests on an interruptible mount
  by returning an error of EINTR rather than EACCES.
- While here, bring back some (but not all) of the NFS RPC statistics lost
  when krpc was committed.

Reviewed by: rmacklem
MFC after: 1 week

11 years agoDon't define rel/acq variants of some atomic operations as the regular
cognet [Tue, 15 Jan 2013 22:08:03 +0000 (22:08 +0000)]
Don't define rel/acq variants of some atomic operations as the regular
version for armv6.

11 years agoDo not require a filter-only interrupt handler for puc ports that are not
jhb [Tue, 15 Jan 2013 20:13:25 +0000 (20:13 +0000)]
Do not require a filter-only interrupt handler for puc ports that are not
serial devices (such as printer ports).  This allows ppc devices attached
to puc to correctly setup an interrupt handler and work.

Tested by: Andre Albsmeier  Andre.Albsmeier@siemens.com
MFC after: 1 week

11 years agoDo not autotune ncallout to be greater than 18508.
alfred [Tue, 15 Jan 2013 19:26:17 +0000 (19:26 +0000)]
Do not autotune ncallout to be greater than 18508.

When maxusers was unrestricted and maxfiles was allowed to autotune
much higher the result was that ncallout which was based on maxfiles
and maxproc grew much higher than was needed.

To fix this clip autotuning to the same number we would get with
the old maxusers algorithm which would stop scaling at 384
maxusers.

Growing ncalout higher is not likely to be needed since most consumers
of timeout(9) are gone and any higher value for ncallout causes the
callwheel hashes to be much larger than will even be needed for
most applications.

MFC after:      1 month

Reviewed by: mav

11 years agocxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open).
np [Tue, 15 Jan 2013 18:50:40 +0000 (18:50 +0000)]
cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open).

MFC after: 1 week

11 years agocxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open).
np [Tue, 15 Jan 2013 18:38:51 +0000 (18:38 +0000)]
cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open).

MFC after: 1 week

11 years agoAdd some new debugging options for the ath(4) and ath_hal(4) drivers.
adrian [Tue, 15 Jan 2013 18:04:15 +0000 (18:04 +0000)]
Add some new debugging options for the ath(4) and ath_hal(4) drivers.

11 years agoImplement frame (data) transmission using if_transmit(), rather than
adrian [Tue, 15 Jan 2013 18:01:23 +0000 (18:01 +0000)]
Implement frame (data) transmission using if_transmit(), rather than
if_start().

This removes the overlapping data path TX from occuring, which
solves quite a number of the potential TX queue races in ath(4).
It doesn't fix the net80211 layer TX queue races and it doesn't
fix the raw TX path yet, but it's an important step towards this.

This hasn't dropped the TX performance in my testing; primarily
because now the TX path can quickly queue frames and continue
along processing.

This involves a few rather deep changes:

* Use the ath_buf as a queue placeholder for now, as we need to be
  able to support queuing a list of mbufs (ie, when transmitting
  fragments) and m_nextpkt can't be used here (because it's what is
  joining the fragments together)

* if_transmit() now simply allocates the ath_buf and queues it to
  a driver TX staging queue.

* TX is now moved into a taskqueue function.

* The TX taskqueue function now dequeues and transmits frames.

* Fragments are handled correctly here - as the current API passes
  the fragment list as one mbuf list (joined with m_nextpkt) through
  to the driver if_transmit().

* For the couple of places where ath_start() may be called (mostly
  from net80211 when starting the VAP up again), just reimplement
  it using the new enqueue and taskqueue methods.

What I don't like (about this work and the TX code in general):

* I'm using the same lock for the staging TX queue management and the
  actual TX.  This isn't required; I'm just being slack.

* I haven't yet moved TX to a separate taskqueue (but the taskqueue is
  created); it's easy enough to do this later if necessary.  I just need
  to make sure it's a higher priority queue, so TX has the same
  behaviour as it used to (where it would preempt existing RX..)

* I need to re-review the TX path a little more and make sure that
  ieee80211_node_*() functions aren't called within the TX lock.
  When queueing, I should just push failed frames into a queue and
  when I'm wrapping up the TX code, unlock the TX lock and
  call ieee80211_node_free() on each.

* It would be nice if I could hold the TX lock for the entire
  TX and TX completion, rather than this release/re-acquire behaviour.
  But that requires that I shuffle around the TX completion code
  to handle actual ath_buf free and net80211 callback/free outside
  of the TX lock.  That's one of my next projects.

* the ic_raw_xmit() path doesn't use this yet - so it still has
  sequencing problems with parallel, overlapping calls to the
  data path.  I'll fix this later.

Tested:

* Hostap - AR9280, AR9220
* STA - AR5212, AR9280, AR5416

11 years agoRemove the use of the ifnet send queue and if_start() in the power
adrian [Tue, 15 Jan 2013 17:50:07 +0000 (17:50 +0000)]
Remove the use of the ifnet send queue and if_start() in the power
save queue code.

Instead, use if_transmit() directly - and handle the cases where frame
transmission fails.

I don't necessarily like this and I think at this point the M_ENCAP check,
node freeing upon fail and the actual if_transmit() call should be done
in methods in ieee80211_freebsd.c, but I digress slightly..

This removes one of the last few uses of if_start() and the ifnet
if_snd queue.  The last major offender is ieee80211_output.c, where
ieee80211_start() implements if_start() and uses the ifnet queue
directly.

(There's a couple of gotchas here, where the if_start pointer is
compared to ieee80211_start(), but that's a later problem.)

11 years agoAdd gjb as my co-mentor now that I have a full doc/www bit.
rene [Tue, 15 Jan 2013 17:17:54 +0000 (17:17 +0000)]
Add gjb as my co-mentor now that I have a full doc/www bit.

Approved by: remko (mentor)

11 years agoSatisfy the intent of kern/151564: [ciss] ciss(4) should increase
sbruno [Tue, 15 Jan 2013 14:35:35 +0000 (14:35 +0000)]
Satisfy the intent of kern/151564: [ciss] ciss(4) should increase
CISS_MAX_LOGICAL to 107

Submitter wanted to increase the number of logical disks supported by ciss(4)
by simply raising the CISS_MAX_LOGICAL value even higher.  Instead, consult
the documentation for the raid controller (OPENCISS) and poke the controller
bits to ask it for how many logical/physical disks it can handle.

Revert svn R242089 that raised CISS_MAX_LOGICAL to 64 for all controllers.

For older controllers that don't support this mechanism, fallback to the old
value of 16 logical disks.  Tested on P420, P410, P400 and 6i model ciss(4)
controllers.

This should will be MFC'd back to stable/9 stable/8 and stable/7 after the MFC
period.

PR: kern/151564
Reviewed by: scottl@freebsd.org
MFC after: 2 weeks

11 years ago- Use standard RETURN VALUES section.
zont [Tue, 15 Jan 2013 14:09:08 +0000 (14:09 +0000)]
- Use standard RETURN VALUES section.

Approved by: kib (mentor)
MFC after: 1 week

11 years ago- Detect when we are in KVM.
zont [Tue, 15 Jan 2013 14:05:59 +0000 (14:05 +0000)]
- Detect when we are in KVM.

Silence on: emulation
Approved by: kib (mentor)
MFC after: 1 week

11 years agoAllow to insert new component to geom_raid3 without specifying number.
mav [Tue, 15 Jan 2013 10:06:35 +0000 (10:06 +0000)]
Allow to insert new component to geom_raid3 without specifying number.

PR: kern/160562
MFC after: 2 weeks

11 years agoAdd mistakenly removed third clause to license
ganbold [Tue, 15 Jan 2013 09:56:20 +0000 (09:56 +0000)]
Add mistakenly removed third clause to license

Reviewed by: joel

11 years agoFix formatting of license according to share/examples/etc/bsd-style-copyright
ganbold [Tue, 15 Jan 2013 09:39:11 +0000 (09:39 +0000)]
Fix formatting of license according to share/examples/etc/bsd-style-copyright

Reviewed by: joel

11 years agoFix license to follow standard license template
ganbold [Tue, 15 Jan 2013 09:31:13 +0000 (09:31 +0000)]
Fix license to follow standard license template

Reviewed by: joel

11 years agoInitial support for Allwinner A10 SoC (Cubieboard)
ganbold [Tue, 15 Jan 2013 08:26:16 +0000 (08:26 +0000)]
Initial support for Allwinner A10 SoC (Cubieboard)
Add simple console driver
Add interrupt handling and timer codes
Add kernel config file
Add dts file
Approved by: gonzo

11 years agocxgbe/tom: Basic CLIP table management.
np [Tue, 15 Jan 2013 07:07:29 +0000 (07:07 +0000)]
cxgbe/tom: Basic CLIP table management.

This is the Compressed Local IPv6 table on the chip.  To save space, the
chip uses an index into this table instead of a full IPv6 address in
some of its hardware data structures.

For now the driver fills this table with all the local IPv6 addresses
that it sees at the time the table is initialized.  I'll improve this
later so that the table is updated whenever new IPv6 addresses are
configured or existing ones deleted.

MFC after: 1 week

11 years agoAdd myself as a port committer (with eadler@ and bdrewery@ as mentors).
dbn [Tue, 15 Jan 2013 05:33:40 +0000 (05:33 +0000)]
Add myself as a port committer (with eadler@ and bdrewery@ as mentors).

While in the repository, add myself to calendar.freebsd.

Approved by: eadler/bdrewery (mentor)

11 years agoIn case somebody still use it, fix legacy ataraid(4) to work on combined
mav [Tue, 15 Jan 2013 02:18:04 +0000 (02:18 +0000)]
In case somebody still use it, fix legacy ataraid(4) to work on combined
PATA+AHCI controllers, such as JMicron JMB363.

PR: kern/159271
MFC after: 1 week

11 years agoAlike to r242314 for GRAID make GRAID3 more aggressive in marking volumes
mav [Tue, 15 Jan 2013 01:27:04 +0000 (01:27 +0000)]
Alike to r242314 for GRAID make GRAID3 more aggressive in marking volumes
as clean on shutdown and move that action from shutdown_pre_sync stage to
shutdown_post_sync to avoid extra flapping.

ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAID
to shutdown gracefully.  To handle that, mark volume as clean just when
shutdown time comes and there are no active writes.

MFC after: 2 weeks

11 years agoAlike to r242314 for GRAID make GMIRROR more aggressive in marking volumes
mav [Tue, 15 Jan 2013 01:13:55 +0000 (01:13 +0000)]
Alike to r242314 for GRAID make GMIRROR more aggressive in marking volumes
as clean on shutdown and move that action from shutdown_pre_sync stage to
shutdown_post_sync to avoid extra flapping.

ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAID
to shutdown gracefully.  To handle that, mark volume as clean just when
shutdown time comes and there are no active writes.

PR: kern/113957
MFC after: 2 weeks

11 years agocxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow).
np [Tue, 15 Jan 2013 00:24:01 +0000 (00:24 +0000)]
cxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow).

- Teach find_best_mtu_idx() to deal with IPv6 endpoints.

- Install correct protosw in offloaded TCP/IPv6 sockets when DDP is
  enabled.

- Move set_tcp_ddp_ulp_mode to t4_tom.c so that t4_tom.h can be included
  without having to drag in t4_msg.h too.  This was bothering the iWARP
  driver for some reason.

MFC after: 1 week

11 years agoAdd an option DB_FROM_SRC to use src/etc's user/group databases when
brooks [Tue, 15 Jan 2013 00:12:34 +0000 (00:12 +0000)]
Add an option DB_FROM_SRC to use src/etc's user/group databases when
installing.  This allows things like running installworld for 10-CURRENT
on a 9.0-RELEASE system without adding extra users and groups to the
passwd and group files.

To prevent potentially risky uid/gid mismatches on systems with
non-standard local values, require that DESTDIR be set if DB_FROM_SRC is
set.

Sponsored by: DARPA, AFRL
Reviewed by: peter

11 years agoDon't use f_show_msg() unless printf(1) syntax is required (this reduces the
dteske [Mon, 14 Jan 2013 21:03:34 +0000 (21:03 +0000)]
Don't use f_show_msg() unless printf(1) syntax is required (this reduces the
number of unnecessary forks).

11 years agoRemember the . in .\" in the WITH_NMTREE file and regenerate the output.
brooks [Mon, 14 Jan 2013 20:38:32 +0000 (20:38 +0000)]
Remember the . in .\" in the WITH_NMTREE file and regenerate the output.

Reported by: joeld

11 years agocxgbe(4): Updates to the hardware L2 table management code.
np [Mon, 14 Jan 2013 20:36:22 +0000 (20:36 +0000)]
cxgbe(4): Updates to the hardware L2 table management code.

- Add full support for IPv6 addresses.

- Read the size of the L2 table during attach.  Do not assume that PCIe
  physical function 4 of the card has all of the table to itself.

- Use FNV instead of Jenkins to hash L3 addresses and drop the private
  copy of jhash.h from the driver.

MFC after: 1 week

11 years agoKeep value of orig_config_id metadata field. Windows driver writes there
mav [Mon, 14 Jan 2013 20:31:45 +0000 (20:31 +0000)]
Keep value of orig_config_id metadata field.  Windows driver writes there
previous value of config_id when it is changed in some cases.  I guess it
may be used do avoid some split-brain conditions.

11 years agoAdd CLOCK_PROCESS_CPUTIME_ID to <time.h>, to synchronize the CLOCK_*
dim [Mon, 14 Jan 2013 18:01:19 +0000 (18:01 +0000)]
Add CLOCK_PROCESS_CPUTIME_ID to <time.h>, to synchronize the CLOCK_*
values with those in <sys/time.h>.  Otherwise, if a program includes
<time.h> before <sys/time.h>, the CLOCK_PROCESS_CPUTIME_ID macro never
gets defined.

Reviewed by: davidxu
X-MFC-With: 239347

11 years agoAdd new u3g device quirk.
hselasky [Mon, 14 Jan 2013 17:41:04 +0000 (17:41 +0000)]
Add new u3g device quirk.

Submitted by: Lowell Gilbert
MFC after: 1 week

11 years agosh: Simplify cd-hash interaction.
jilles [Mon, 14 Jan 2013 16:40:50 +0000 (16:40 +0000)]
sh: Simplify cd-hash interaction.

Instead of rechecking relative paths for all hashed utilities after a cd,
track if any utility in cmdtable depends on a relative path in PATH.
If there is such a utility, cd clears the entire table.

As a result, the '*' in hash no longer happens.

11 years agoSmall cosmetic tuning of the IRRT status constants.
mav [Mon, 14 Jan 2013 16:38:43 +0000 (16:38 +0000)]
Small cosmetic tuning of the IRRT status constants.

11 years agoQuiesce some clang warnings while we're here doing stuff.
sbruno [Mon, 14 Jan 2013 15:05:22 +0000 (15:05 +0000)]
Quiesce some clang warnings while we're here doing stuff.

Submitted by: Hiren Panchasara <hiren.panchasara@gmail.com>
Obtained from: Yahoo! Inc

11 years agoPrint some more metadata fields.
mav [Mon, 14 Jan 2013 13:06:35 +0000 (13:06 +0000)]
Print some more metadata fields.

11 years agosh: Pass $? to command substitution containing compound/multiple commands.
jilles [Mon, 14 Jan 2013 12:20:55 +0000 (12:20 +0000)]
sh: Pass $? to command substitution containing compound/multiple commands.

Example:
  false; echo $(echo $?; :)

11 years ago- Get rid of unused function vmspace_wired_count().
zont [Mon, 14 Jan 2013 12:12:56 +0000 (12:12 +0000)]
- Get rid of unused function vmspace_wired_count().

Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week

11 years agoRemove stray tabs.
jlh [Mon, 14 Jan 2013 11:06:50 +0000 (11:06 +0000)]
Remove stray tabs.

Submitted by: kib
Approved by: kib (mentor)
MFC after: 1 week

11 years agoAllow commands without any additional arguments, as stated in the
jlh [Mon, 14 Jan 2013 11:03:13 +0000 (11:03 +0000)]
Allow commands without any additional arguments, as stated in the
manpage.  While here, exit early when there is nothing to do.

PR:            168415
Submitted by:  Zhihao Yuan (initial version)
MFC after:     1 week
Approved by:   kib (mentor)

11 years agoUpdate sigcode to use both the current ABI and FreeBSD's version of the
andrew [Mon, 14 Jan 2013 09:11:18 +0000 (09:11 +0000)]
Update sigcode to use both the current ABI and FreeBSD's version of the
ARM EABI syscall calling convention.

The current ABI encodes the syscall number in the instruction. This causes
issues with the thumb mode as it only has 8 bits to encode this value and
we have too many system calls and by using a register will simplify the
code to get the syscall number in the kernel.

With the ARM EABI we reuse the Linux calling convention by storing the
value in r7. Because of this we use both methods to encode the syscall
number in this function.

11 years agoSwitch the default CPU to an arm9. This removes compiler support for the
andrew [Mon, 14 Jan 2013 08:39:48 +0000 (08:39 +0000)]
Switch the default CPU to an arm9. This removes compiler support for the
unsupported 26-bit addressing mode. This change is required for moving to
the ARM EABI.

11 years agoDirectly uses calloc(3) instread of malloc(3) + memset(3)
bapt [Mon, 14 Jan 2013 07:17:38 +0000 (07:17 +0000)]
Directly uses calloc(3) instread of malloc(3) + memset(3)

Reported by: Jeremy Chadwick <jdc@koitsu.org>
MFC after: 3 days

11 years agoAdd a trivial comment to record the proper commit log for r245407:
kib [Mon, 14 Jan 2013 05:52:23 +0000 (05:52 +0000)]
Add a trivial comment to record the proper commit log for r245407:

Set the v_hash for a new vnode in the getnewvnode() to the value
calculated based on the vnode structure address.  Filesystems using
vfs_hash_insert() override the v_hash using the standard formula of
(inode_number + mnt_hashseed).  For other filesystems, the
initialization allows the vfs_hash_index() to provide useful hash too.

Suggested, reviewed and tested by: peter
Sponsored by: The FreeBSD Foundation
MFC after: 5 days

11 years agoRearrange the struct bufobj and struct vnode layouts to reduce
kib [Mon, 14 Jan 2013 05:46:49 +0000 (05:46 +0000)]
Rearrange the struct bufobj and struct vnode layouts to reduce
padding.  On the amd64 kernel with INVARIANTS turned off, size of the
struct vnode is reduced from 496 to 472 bytes, saving 24 bytes of
memory and KVA per vnode.

Noted and reviewed by: peter
Tested by: pho
Sponsored by: The FreeBSD Foundation

11 years agoFor zfs vnodes, use the standard inode number based hash algorithm.
kib [Mon, 14 Jan 2013 05:45:33 +0000 (05:45 +0000)]
For zfs vnodes, use the standard inode number based hash algorithm.

Reviewed and tested by: peter
Sponsored by: The FreeBSD Foundation
MFC after: 5 days

11 years agoThe current default size of the nullfs hash table used to lookup the
kib [Mon, 14 Jan 2013 05:44:47 +0000 (05:44 +0000)]
The current default size of the nullfs hash table used to lookup the
existing nullfs vnode by the lower vnode is only 16 slots.  Since the
default mode for the nullfs is to cache the vnodes, hash has extremely
huge chains.

Size the nullfs hashtbl based on the current value of
desiredvnodes. Use vfs_hash_index() to calculate the hash bucket for a
given vnode.

Pointy hat to:     kib
Diagnosed and reviewed by: peter
Tested by:    peter, pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 5 days

11 years agodiff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
kib [Mon, 14 Jan 2013 05:42:54 +0000 (05:42 +0000)]
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 7c243b6..0bdaf36 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW,
 #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt)
 #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt)

+static int vnsz2log;

 /*
  * Initialize the vnode management data structures.
@@ -293,6 +294,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW,
 static void
 vntblinit(void *dummy __unused)
 {
+ u_int i;
  int physvnodes, virtvnodes;

  /*
@@ -332,6 +334,9 @@ vntblinit(void *dummy __unused)
  syncer_maxdelay = syncer_mask + 1;
  mtx_init(&sync_mtx, "Syncer mtx", NULL, MTX_DEF);
  cv_init(&sync_wakeup, "syncer");
+ for (i = 1; i <= sizeof(struct vnode); i <<= 1)
+ vnsz2log++;
+ vnsz2log--;
 }
 SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vntblinit, NULL);

@@ -1067,6 +1072,14 @@ alloc:
  }
  rangelock_init(&vp->v_rl);

+ /*
+  * For the filesystems which do not use vfs_hash_insert(),
+  * still initialize v_hash to have vfs_hash_index() useful.
+  * E.g., nullfs uses vfs_hash_index() on the lower vnode for
+  * its own hashing.
+  */
+ vp->v_hash = (uintptr_t)vp >> vnsz2log;
+
  *vpp = vp;
  return (0);
 }

11 years agoAdd exported vfs_hash_index() function, which calculates the canonical
kib [Mon, 14 Jan 2013 05:41:40 +0000 (05:41 +0000)]
Add exported vfs_hash_index() function, which calculates the canonical
pre-masked hash for the given vnode.  The function assumes that
vp->v_hash is initialized by the filesystem vnode instantiation
function.  At the moment, it is only done if filesystem uses
vfs_hash_insert().

Reviewed by: peter
Tested by: peter, pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 5 days

11 years agoRename vfs_hash_index() to vfs_hash_bucket().
kib [Mon, 14 Jan 2013 05:40:21 +0000 (05:40 +0000)]
Rename vfs_hash_index() to vfs_hash_bucket().

Reviewed by: peter
Tested by: peter, pho
Sponsored by: The FreeBSD Foundation
MFC after: 5 days

11 years agoAdd new f_yesno/f_noyes wrapper functions (which take printf(1) syntax).
dteske [Mon, 14 Jan 2013 01:15:25 +0000 (01:15 +0000)]
Add new f_yesno/f_noyes wrapper functions (which take printf(1) syntax).

11 years agoAdd missing dialog(1) arguments to internationalize "Help"-button label.
dteske [Mon, 14 Jan 2013 01:09:23 +0000 (01:09 +0000)]
Add missing dialog(1) arguments to internationalize "Help"-button label.

11 years agoWindows driver writes relative volume IDs to metadata field. Use that value
mav [Mon, 14 Jan 2013 00:38:51 +0000 (00:38 +0000)]
Windows driver writes relative volume IDs to metadata field.  Use that value
as a hint for raid/rX device number to make it persistent across reboots.

11 years ago - Add checks for Intel metadata version and attributes. Ignore disks with
mav [Sun, 13 Jan 2013 23:00:40 +0000 (23:00 +0000)]
 - Add checks for Intel metadata version and attributes. Ignore disks with
unsupported metadata types like Intel Smart Response to not corrupt them.
 - Improve setting of these things during metadata writing to protect from
incapable BIOS'es and other implementations.

11 years agoIf we're doing a kickpcu, make sure we flush the whole RX list rather than
adrian [Sun, 13 Jan 2013 22:41:58 +0000 (22:41 +0000)]
If we're doing a kickpcu, make sure we flush the whole RX list rather than
stopping after 128 frames.

Whilst here, add in some code that lets me optionally flip back to the
original behaviour of calling ath_startrecv().

11 years agosh: Add testcase that $? is preserved into a simple command substitution.
jilles [Sun, 13 Jan 2013 22:35:51 +0000 (22:35 +0000)]
sh: Add testcase that $? is preserved into a simple command substitution.

The test builtins/trap6.0 already uses this but having it separate eases
diagnosis if this would break.

11 years agolibutil: fix typo in comment for gr_fini.
mjg [Sun, 13 Jan 2013 22:08:18 +0000 (22:08 +0000)]
libutil: fix typo in comment for gr_fini.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

11 years agoEnable syscons framebuffer support for bcm2835. It makes possible to run Xorg
ray [Sun, 13 Jan 2013 22:05:46 +0000 (22:05 +0000)]
Enable syscons framebuffer support for bcm2835. It makes possible to run Xorg
on Raspberry Pi.
o convert mmap address to physical.
o add FBIOGTYPE ioctl handler - allow to get screen resolution by new
    xf86-video-scfb driver.
Originally designed for "Efika MX" project.

Sponsored by: FreeBSD Foundation

11 years agoRemove accidentally copypasted comment
gonzo [Sun, 13 Jan 2013 21:32:40 +0000 (21:32 +0000)]
Remove accidentally copypasted comment

Spotted by: gavin

11 years agolibutil: utilize strsep instead of strcat in a loop in gr_make
mjg [Sun, 13 Jan 2013 21:28:47 +0000 (21:28 +0000)]
libutil: utilize strsep instead of strcat in a loop in gr_make

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

11 years agolibutil: move group_line_format into the scop of its only user.
mjg [Sun, 13 Jan 2013 21:26:57 +0000 (21:26 +0000)]
libutil: move group_line_format into the scop of its only user.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

11 years agolibutil: eliminate 'found' variable in gr_equal
mjg [Sun, 13 Jan 2013 21:25:43 +0000 (21:25 +0000)]
libutil: eliminate 'found' variable in gr_equal

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

11 years agosh: Add some testcases related to subshells.
jilles [Sun, 13 Jan 2013 19:39:13 +0000 (19:39 +0000)]
sh: Add some testcases related to subshells.

These failed in earlier attempts to execute more subshells without forking.
The patches are uncommitted.

11 years agosh: Fix crash when parsing '{ } &'.
jilles [Sun, 13 Jan 2013 19:26:33 +0000 (19:26 +0000)]
sh: Fix crash when parsing '{ } &'.

MFC after: 1 week

11 years agosh: Don't lose $? when backquoted command ends with semicolon or newline.
jilles [Sun, 13 Jan 2013 19:19:40 +0000 (19:19 +0000)]
sh: Don't lose $? when backquoted command ends with semicolon or newline.

An empty simple command was added and overwrote the exit status with 0.

This affects `...` but not $(...).

Example:
  v=`false;`; echo $?

11 years agoMerge Perforce changeset 219952 to head:
rwatson [Sun, 13 Jan 2013 16:57:11 +0000 (16:57 +0000)]
Merge Perforce changeset 219952 to head:

  Make different bus attachments for Altera and Terasice
  device drivers share the same devclass_t.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219944 to head:
rwatson [Sun, 13 Jan 2013 16:53:31 +0000 (16:53 +0000)]
Partially merge Perforce changeset 219944 to head:

  Consistently use the vendor name "sri-cambridge" for device
  compatibility strings on the BERI platform.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219942 to head:
rwatson [Sun, 13 Jan 2013 16:51:57 +0000 (16:51 +0000)]
Partially merge Perforce changeset 219942 to head:

  Implement an FDT attachment for altera_avgen(4).

Portions of the changeset updating DTS and device.hints will be merged
separately.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219941 to head:
rwatson [Sun, 13 Jan 2013 16:44:45 +0000 (16:44 +0000)]
Merge Perforce changeset 219941 to head:

  Copy altera_avgen(4) nexus attachment as a starting point for an
  FDT attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219940 to head:
rwatson [Sun, 13 Jan 2013 16:43:59 +0000 (16:43 +0000)]
Merge Perforce changeset 219940 to head:

  Rework altera_avgen(4) to cleanly(ish) separate nexus bus
  attachment from the driver itself.  This should allow us to
  plug in an fdt attachment more easily.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219939 to head:
rwatson [Sun, 13 Jan 2013 16:41:25 +0000 (16:41 +0000)]
Merge Perforce changeset 219939 to head:

  Start restructuring of altera_avgen(4) so that it can have an FDT
  attachment -- this requires first properly breaking out the current
  nexus attachment from the driver implementation.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219938 to head:
rwatson [Sun, 13 Jan 2013 16:27:56 +0000 (16:27 +0000)]
Partially merge Perforce changeset 219938 to head:

  Write FDT attachment for the Terasic MTL (multitouch LCD) driver.
  Exploit the fact that FDT allows multiple memory ranges to be
  assigned to a device, giving us a cleaner description than
  device.hints does.

Portions of this changeset that remove mtl from BERI device.hints and
add to DTS will be merged separately.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219937 to head:
rwatson [Sun, 13 Jan 2013 16:21:51 +0000 (16:21 +0000)]
Merge Perforce changeset 219937 to head:

  Copy Terasic MTL nexus bus attachment as a starting point for an
  FDT attachment for the same driver.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219930 to head:
rwatson [Sun, 13 Jan 2013 16:20:40 +0000 (16:20 +0000)]
Partially merge Perforce changeset 219930 to head:

  Add an Intel StrataFlash (isf) driver FDT attachment.

Portions of the original changeset hooking up FDT use for BERI will be
merged separately.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219929 to head:
rwatson [Sun, 13 Jan 2013 15:16:18 +0000 (15:16 +0000)]
Merge Perforce changeset 219929 to head:

  Replicate nexus attachment for isf(4) to become an FDT attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219927 to head:
rwatson [Sun, 13 Jan 2013 15:15:24 +0000 (15:15 +0000)]
Merge Perforce changeset 219927 to head:

  Implement an FDT attachment for the Altera SD Card driver

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219926 to head:
rwatson [Sun, 13 Jan 2013 15:13:25 +0000 (15:13 +0000)]
Merge Perforce changeset 219926 to head:

  Copy Altera SDCard nexus attachment as a starting point for the FDT
  attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219922 to head:
rwatson [Sun, 13 Jan 2013 15:12:35 +0000 (15:12 +0000)]
Merge Perforce changeset 219922 to head:

  Update nexus parts in copied DE4LED attachment to use FDT.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219921 to head:
rwatson [Sun, 13 Jan 2013 15:10:27 +0000 (15:10 +0000)]
Merge Perforce changeset 219921 to head:

  Copy DE4 LED nexus bus attachment as a starting point for an FDT
  attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219918 to head:
rwatson [Sun, 13 Jan 2013 15:08:17 +0000 (15:08 +0000)]
Merge Perforce changeset 219918 to head:

  Naive first cut at an FDT bus attachment for the Altera JTAG UART.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219917 to head:
rwatson [Sun, 13 Jan 2013 14:38:09 +0000 (14:38 +0000)]
Merge Perforce changeset 219917 to head:

  Copy Altera JTAG UART nexus bus attachment as a starting point
  for an FDT bus attachment.

Sponsored by: DARPA, AFRL

11 years agoImprove support for disabled disks. If disabled disk disconnected and then
mav [Sun, 13 Jan 2013 14:30:37 +0000 (14:30 +0000)]
Improve support for disabled disks. If disabled disk disconnected and then
reconnected back, leave it as disconnected. If new disk inserted instead of
disabled, rebuild it and leave as enabled.

11 years agoAdd VirtIO to the i386 and amd64 GENERIC kernels
bryanv [Sun, 13 Jan 2013 07:14:16 +0000 (07:14 +0000)]
Add VirtIO to the i386 and amd64 GENERIC kernels

This also removes the kludge from r239009 that covered only
the network driver.

Reviewed by: grehan
Approved by: grehan (mentor)
MFC after: 1 week

11 years agoUse the right format string for line buffer.
delphij [Sun, 13 Jan 2013 04:28:44 +0000 (04:28 +0000)]
Use the right format string for line buffer.

PR: bin/174910
Submitted by: Fabian Keil <fk fabiankeil.de>

11 years agoAdd now missing color.4th.
marcel [Sat, 12 Jan 2013 23:44:13 +0000 (23:44 +0000)]
Add now missing color.4th.

11 years agoSet WITHOUT_SVN=yes for textproc/docproj.
hrs [Sat, 12 Jan 2013 22:41:29 +0000 (22:41 +0000)]
Set WITHOUT_SVN=yes for textproc/docproj.

Submitted by: gjb