]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMFV r251644:
Xin LI [Wed, 12 Jun 2013 07:07:06 +0000 (07:07 +0000)]
MFV r251644:

Poor ZFS send / receive performance due to snapshot
hold / release processing (by smh@)

Illumos ZFS issues:
  3740 Poor ZFS send / receive performance due to snapshot
       hold / release processing

MFC after:      2 weeks

11 years agoUpdate vendor/illumos/dist and vendor-sys/illumos/dist
Xin LI [Wed, 12 Jun 2013 06:56:15 +0000 (06:56 +0000)]
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14052:1a272fe1337b

Illumos ZFS issues:
  3740 Poor ZFS send / receive performance due to snapshot
       hold / release processing

11 years agoRemove the AR9285 specific structure for LNA diversity and use the HAL.
Adrian Chadd [Wed, 12 Jun 2013 06:01:53 +0000 (06:01 +0000)]
Remove the AR9285 specific structure for LNA diversity and use the HAL.

The AR9300 HAL update included the LNA diversity configuration information
so it can be used in the AR9485 configuration code.

11 years agoMerge latest NetBSD changes.
Eitan Adler [Tue, 11 Jun 2013 21:47:16 +0000 (21:47 +0000)]
Merge latest NetBSD changes.
This adds some new NetBSD releases and makes some simple formatting changes.

With this commit NetBSD and FreeBSD should have identical files.
DragonflyFBSD has the version immediately prior to this commit.

When committing to this file please try to coordinate with all three groups.

Submitted by: Alan Barrett <apb@cequrux.com>

11 years agopthread_testcancel(3): Update list of cancellation points.
Jilles Tjoelker [Tue, 11 Jun 2013 21:40:20 +0000 (21:40 +0000)]
pthread_testcancel(3): Update list of cancellation points.

This should be a fairly complete list of cancellation points in libc, libthr
and librt, including standard as well as non-standard functions.

11 years agocxgbe/tom: Allow caller to select the queue (control or data) used to
Navdeep Parhar [Tue, 11 Jun 2013 21:20:23 +0000 (21:20 +0000)]
cxgbe/tom: Allow caller to select the queue (control or data) used to
send the CPL_SET_TCB_FIELD request in t4_set_tcb_field().

MFC after: 1 week

11 years agoBorrow the algorithm from kvm_getprocs() to fix procstat_getprocs() to
John Baldwin [Tue, 11 Jun 2013 20:00:49 +0000 (20:00 +0000)]
Borrow the algorithm from kvm_getprocs() to fix procstat_getprocs() to
handle the case where the process tables grows in between the calls to
fetch the size and fetch the table.

MFC after: 1 week

11 years agoMFV r251626:
Xin LI [Tue, 11 Jun 2013 19:35:44 +0000 (19:35 +0000)]
MFV r251626:

ZFS event processing should work on R/O root filesystems

Illumos ZFS issues:
  3749 zfs event processing should work on R/O root filesystems

MFC after:      2 weeks

11 years agoMFV r251624:
Xin LI [Tue, 11 Jun 2013 19:29:31 +0000 (19:29 +0000)]
MFV r251624:

txg commit callbacks don't work

Illumos ZFS issues:
  3747 txg commit callbacks don't work

MFC after:      2 weeks

11 years agoMFV r251623:
Xin LI [Tue, 11 Jun 2013 19:25:49 +0000 (19:25 +0000)]
MFV r251623:

zpool create should treat -O mountpoint and -m the same

Illumos ZFS issues:
  3745 zpool create should treat -O mountpoint and -m the same

MFC after:      2 weeks

11 years agoMFV r251622:
Xin LI [Tue, 11 Jun 2013 19:22:20 +0000 (19:22 +0000)]
MFV r251622:

ZFS shouldn't ignore errors unmounting snapshots

Illumos ZFS issues:
  3744 zfs shouldn't ignore errors unmounting snapshots

MFC after:      2 weeks

11 years agoMFV r251621:
Xin LI [Tue, 11 Jun 2013 19:16:14 +0000 (19:16 +0000)]
MFV r251621:

ZFS needs a refcount audit

Illumos ZFS issues:
  3741 zfs needs a refcount audit

MFC after:      2 weeks

11 years agoMFV r251620:
Xin LI [Tue, 11 Jun 2013 19:12:06 +0000 (19:12 +0000)]
MFV r251620:

ZFS comments need cleaner, more consistent style

Illumos ZFS issues:
  3741 zfs comments need cleaner, more consistent style

MFC after:      2 weeks

11 years agoBump the CPU/WCPU column width by one so that it fits values from 100% up
John Baldwin [Tue, 11 Jun 2013 19:05:29 +0000 (19:05 +0000)]
Bump the CPU/WCPU column width by one so that it fits values from 100% up
to 999.99% CPU.  It still won't be aligned if you have a multithreaded
process using more than 1000% CPU (e.g. idle process on an idle 12-way
system), but 100% is a common case.

Submitted by: Jeremy Chadwick (partial)
MFC after: 1 week

11 years agoMFV r251619:
Xin LI [Tue, 11 Jun 2013 19:02:36 +0000 (19:02 +0000)]
MFV r251619:

ZFS needs better comments.

Illumos ZFS issues:
  3741 zfs needs better comments

MFC after:      2 weeks

11 years agoAdd the name of the file that could not be opened to the error message
Guy Helmer [Tue, 11 Jun 2013 18:46:46 +0000 (18:46 +0000)]
Add the name of the file that could not be opened to the error message
regarding the failure.

Suggested while working on PR bin/113239.

11 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14051:849852750426
Xin LI [Tue, 11 Jun 2013 18:46:37 +0000 (18:46 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14051:849852750426

Illumos ZFS issues:
  3749 zfs event processing should work on R/O root filesystems

11 years agoPrevent races running the queue by serializing access to the
Guy Helmer [Tue, 11 Jun 2013 18:43:27 +0000 (18:43 +0000)]
Prevent races running the queue by serializing access to the
queue directory.

PR: bin/113239

11 years agoUpdate vendor/illumos/dist and vendor-sys/illumos/dist
Xin LI [Tue, 11 Jun 2013 18:43:25 +0000 (18:43 +0000)]
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14050:0c8d9998d589

Illumos ZFS issues:
  3747 txg commit callbacks don't work

11 years agoUpdate vendor/illumos/dist to illumos-gate 14049:4a7f6353bcf0
Xin LI [Tue, 11 Jun 2013 18:39:38 +0000 (18:39 +0000)]
Update vendor/illumos/dist to illumos-gate 14049:4a7f6353bcf0

Illumos ZFS issues:
  3745 zpool create should treat -O mountpoint and -m the same

11 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14048:ce96ca723606
Xin LI [Tue, 11 Jun 2013 18:35:14 +0000 (18:35 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14048:ce96ca723606

Illumos ZFS issues:
  3744 zfs shouldn't ignore errors unmounting snapshots

11 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14047:e8c1f215cb15
Xin LI [Tue, 11 Jun 2013 18:34:08 +0000 (18:34 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14047:e8c1f215cb15

Illumos ZFS issues:
  3743 zfs needs a refcount audit

11 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14046:6a5a2f4a47db
Xin LI [Tue, 11 Jun 2013 18:32:47 +0000 (18:32 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14046:6a5a2f4a47db

Illumos ZFS issues:
  3742 zfs comments need cleaner, more consistent style

11 years agoUpdate vendor/illumos/dist and vendor-sys/illumos/dist
Xin LI [Tue, 11 Jun 2013 18:28:25 +0000 (18:28 +0000)]
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14045:9475b3fef59d

Illumos ZFS issues:
  3741 zfs needs better comments

11 years agoMove the check whether the clear flag is set. This has 2 advantages
Florian Smeets [Tue, 11 Jun 2013 17:46:32 +0000 (17:46 +0000)]
Move the check whether the clear flag is set. This has 2 advantages

- When operating on a core file (-M) and -c is specified we don't clear
  the message buffer of the running system.
- If we don't have permission to clear the buffer print the error message
  only. That's what Linux does in this case, where this feature was ported
  from, and it ensures that the error message doesn't get lost in the noise.

Discussed with: antoine, cognet
Approved by: cognet

11 years agoStore a reference to the vnode associated with a file descriptor in the
John Baldwin [Tue, 11 Jun 2013 15:37:07 +0000 (15:37 +0000)]
Store a reference to the vnode associated with a file descriptor in the
linux_file structure and use it instead of directly accessing td_fpop
when destroying the linux_file structure.  The td_fpop pointer is not
valid when a cdevpriv destructor is run, and the type-specific close
method has already been called, so f_vnode may not be valid (and the
vnode might have been recycled without our own reference).

Tested by: Julian Stecklina <jsteckli@os.inf.tu-dresden.de>
MFC after: 1 week

11 years agoDon't update provider properties and don't set DISKFLAG_OPEN if d_open()
Alexander Motin [Tue, 11 Jun 2013 10:06:07 +0000 (10:06 +0000)]
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error.  GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.

11 years agoMake the default choice for FTP media access use "auto".
Devin Teske [Tue, 11 Jun 2013 03:37:29 +0000 (03:37 +0000)]
Make the default choice for FTP media access use "auto".

11 years agos/file system/filesystem/g
Pedro F. Giffuni [Tue, 11 Jun 2013 02:47:07 +0000 (02:47 +0000)]
s/file system/filesystem/g

Based on r96755 from UFS.

MFC after: 3 days

11 years agoAdd another comment about WB195 (AR9285+AR3011) when using ASPM.
Adrian Chadd [Mon, 10 Jun 2013 20:10:34 +0000 (20:10 +0000)]
Add another comment about WB195 (AR9285+AR3011) when using ASPM.

11 years agoThere is a one-to-one correspondence between the MSI-X vector # and the Status Descri...
David C Somayajulu [Mon, 10 Jun 2013 17:12:22 +0000 (17:12 +0000)]
There is a one-to-one correspondence between the MSI-X vector # and the Status Descriptor Ring Index. Hence there is no need to check the Interrupt Source Register.

Approved by: George Neville-Neil

11 years agoRevert r251590. It unexpectedly broke the build and there were some
Marcel Moolenaar [Mon, 10 Jun 2013 15:22:27 +0000 (15:22 +0000)]
Revert r251590. It unexpectedly broke the build and there were some
questions on locking. As part of commit-bit grooming, I'd like Steve
to handle this, but can't leave things broken in the mean time.

11 years agoHandle options that override other options
Ed Maste [Mon, 10 Jun 2013 13:55:03 +0000 (13:55 +0000)]
Handle options that override other options

This is a workaround for WITH_LDNS_UTILS forcing BIND_UTILS off.  It can
be reverted when we no longer have these conflicting options, or made more
general if we grow more cases like this.

11 years agoAvoid unnecessary controller reinitialization by checking driver
Pyun YongHyeon [Mon, 10 Jun 2013 07:31:49 +0000 (07:31 +0000)]
Avoid unnecessary controller reinitialization by checking driver
running state.  fxp(4) requires controller reinitialization for the
following cases.
 o RX lockup condition on i82557
 o promiscuous mode change
 o multicast filter change
 o WOL configuration
 o TSO/VLAN hardware tagging/checksum offloading configuration
 o MAC reprogramming after speed/duplex/flow-control resolution
 o Any events that result in MAC reprogramming(link UP/DOWN,
   remote link partner's restart of auto-negotiation etc)
 o Microcode loading/unloading
Apart from above cases which come from hardware limitation, upper
stack also blindly reinitializes controller whenever an IP address
is assigned. After r194573, fxp(4) no longer needs to reinitialize
the controller to program multicast filter after upping the
interface. So keeping track of driver running state should remove
all unnecessary controller reinitializations.

This change will also address endless controller reinitialization
triggered by dhclient(8).

Tested by: hrs, Alban Hertroys <haramrae@gmail.com>

11 years agoAdd implementations of acoshl(), asinhl(), and atanhl(). This is a
David Schultz [Mon, 10 Jun 2013 06:04:58 +0000 (06:04 +0000)]
Add implementations of acoshl(), asinhl(), and atanhl().  This is a
merge of the work done by bde and myself.

11 years agoFix some bugs in the complex trig tests so that they test both double
David Schultz [Mon, 10 Jun 2013 06:03:03 +0000 (06:03 +0000)]
Fix some bugs in the complex trig tests so that they test both double
and float precision properly.

11 years agoRegen.
Rui Paulo [Mon, 10 Jun 2013 05:45:53 +0000 (05:45 +0000)]
Regen.

11 years agoUse STRUCT_USB_HOST_ID to make sure we have the right ELF section.
Rui Paulo [Mon, 10 Jun 2013 05:45:16 +0000 (05:45 +0000)]
Use STRUCT_USB_HOST_ID to make sure we have the right ELF section.

11 years agoRevise the interface between vm_object_madvise() and vm_page_dontneed() so
Alan Cox [Mon, 10 Jun 2013 01:48:21 +0000 (01:48 +0000)]
Revise the interface between vm_object_madvise() and vm_page_dontneed() so
that pointless calls to pmap_is_modified() can be easily avoided when
performing madvise(..., MADV_FREE).

Sponsored by: EMC / Isilon Storage Division

11 years agoAdd vfs_mounted and vfs_unmounted events so that components can be informed
Marcel Moolenaar [Sun, 9 Jun 2013 23:51:26 +0000 (23:51 +0000)]
Add vfs_mounted and vfs_unmounted events so that components can be informed
about mount and unmount events. This is used by Juniper to implement a more
optimal implementation of NetBSD's veriexec.

Submitted by: stevek@juniper.net
Obtained from: Juniper Networks, Inc

11 years ago- The method introduced as part of r234898 for not altering the boot path
Marius Strobl [Sun, 9 Jun 2013 23:50:30 +0000 (23:50 +0000)]
- The method introduced as part of r234898 for not altering the boot path
  when booting from ZFS turned out to also cause the boot path not being
  adjusted if booting from CD-ROM with firmware versions that do not employ
  the "cdrom" alias in that case. So shuffle the code around instead in order
  to achieve the original intent. Ideally, we shouldn't fiddle with the boot
  path when booting from UFS on a disk either; unfortunately, there doesn't
  seem to be an universal way of telling disks and CD-ROMs apart, though. [1]
- Use NULL instead of 0 for pointers.

PR: 179289
MFC after: 1 week

11 years agoChange the set and unset ctlreqs by making the index argument optional.
Marcel Moolenaar [Sun, 9 Jun 2013 23:34:26 +0000 (23:34 +0000)]
Change the set and unset ctlreqs by making the index argument optional.
This allows setting attributes on tables. One simply does not provide
an index in that case. Otherwise the entry corresponding the index has
the attribute set or unset.

Use this change to fix a relatively longstanding bug in our GPT scheme
that's the result of rev 198097 (relatively harmless) followed by rev
237057 (damaging). The damaging part being that our GPT scheme always
has the active flag set on the PMBR slice. This is in violation with
EFI. Existing EFI implementions for both x86 and ia64 reject the GPT.
As such, GPT disks created by us aren't usable under EFI because of
that.

After this change, GPT disks never have the active flag set on the PMBR
slice. In order to make the GPT disk bootable under some x86 BIOSes,
the reason of rev 198097, one must now set the active attribute on the
gpt table. The kernel will apply this to the PMBR slice For (S)ATA:
gpart set -a active ada0

To fix an existing GPT disk that has the active flag set in the PMBR,
and that does not need the flag, use (again for (S)ATA):
gpart unset -a active ada0

The EBR, MBR & PC98 schemes, which also impement at least 1 attribute,
now check to make sure the entry passed is valid. They do not have
attributes that apply to the table.

11 years agoRemove stub implementation.
Marcel Moolenaar [Sun, 9 Jun 2013 23:12:43 +0000 (23:12 +0000)]
Remove stub implementation.

11 years agoIncrease the maximum KVM available on TI chips. Not sure why we suddenly need
Olivier Houchard [Sun, 9 Jun 2013 22:51:11 +0000 (22:51 +0000)]
Increase the maximum KVM available on TI chips. Not sure why we suddenly need
that much, but that lets me boot with 1GB of RAM.

11 years agoModify nfsstat.c so that it prints out an error when a non-root
Rick Macklem [Sun, 9 Jun 2013 21:54:19 +0000 (21:54 +0000)]
Modify nfsstat.c so that it prints out an error when a non-root
user attempts to use the "-m" option and it fails.

Requested by: danny@cs.huji.ac.il
MFC after: 2 weeks

11 years agoAdd :ifname modifier to specify interface-specific routes into
Hiroki Sato [Sun, 9 Jun 2013 18:11:36 +0000 (18:11 +0000)]
Add :ifname modifier to specify interface-specific routes into
{,ipv6_}static_routes and rc.d/routing.  For example:

 static_routes="foo bar:em0"
 route_foo="-net 10.0.0.0/24 -gateway 192.168.2.1"
 route_bar="-net 192.168.1.0/24 -gateway 192.168.0.2"

At boot time, all of the static routes are installed as before.
The differences are:

- "/etc/rc.d/netif start/stop <if>" now configures static routes
  with :<if> if any.
- "/etc/rc.d/routing start/stop <af> <if>" works as well.  <af> cannot be
  omitted when <if> is specified, but a keyword "any" or "all" can be used
  for <af> and <if>.

11 years agoFix a bug that the gateway address was not shown when a -gateway modifier
Hiroki Sato [Sun, 9 Jun 2013 17:40:06 +0000 (17:40 +0000)]
Fix a bug that the gateway address was not shown when a -gateway modifier
was used.

11 years ago- Add file system type number (vfc_typenum) in the list. This is useful
Hiroki Sato [Sun, 9 Jun 2013 16:33:32 +0000 (16:33 +0000)]
- Add file system type number (vfc_typenum) in the list.  This is useful
  for debugging when changing vfs.typenumhash configuration.
- Refactor fmt_flags().

MFC after: 1 week

11 years agoFix a bug introduced by r251236; product of bug was the following error in
Devin Teske [Sun, 9 Jun 2013 15:36:13 +0000 (15:36 +0000)]
Fix a bug introduced by r251236; product of bug was the following error in
"Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":

[: -eq: unexpected operator

NOTE: Previously mentioned in r251557

Problem caused by removal of $retval to capture exit status of call to
f_dialog_input_rclist().

While we're here, enhance f_dialog_input_rclist() to accept a default-item
to make selecting multiple values to-add more efficient.

11 years agoMake recv() and send() cancellation points, as required by POSIX.
Jilles Tjoelker [Sun, 9 Jun 2013 14:31:59 +0000 (14:31 +0000)]
Make recv() and send() cancellation points, as required by POSIX.

Call the recvfrom() and sendto() functions overridden by libthr instead of
the _recvfrom() and _sendto() versions that are not cancellation points.

11 years agoFix the way atomic_is_lock_free() is defined for Clang.
Ed Schouten [Sun, 9 Jun 2013 08:28:23 +0000 (08:28 +0000)]
Fix the way atomic_is_lock_free() is defined for Clang.

When using Clang atomics, atomic types are not placed in a structure.
There is thus no reason why we should get the __val member.

11 years agoPrint file names without stdio buffering to avoid mixing buffered and
Jaakko Heinonen [Sun, 9 Jun 2013 08:06:26 +0000 (08:06 +0000)]
Print file names without stdio buffering to avoid mixing buffered and
unbuffered ouput.

PR: bin/176886
Reviewed by: mjg

11 years agoMinor mdoc fixes.
Joel Dahl [Sun, 9 Jun 2013 07:15:43 +0000 (07:15 +0000)]
Minor mdoc fixes.

11 years agoAdd freebsd-update.conf(5) to OptionalObsoleteFiles.inc
Glen Barber [Sun, 9 Jun 2013 06:13:51 +0000 (06:13 +0000)]
Add freebsd-update.conf(5) to OptionalObsoleteFiles.inc

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

11 years agoe2fs_bpg and e2fs_isize are always unsigned.
Pedro F. Giffuni [Sun, 9 Jun 2013 01:38:51 +0000 (01:38 +0000)]
e2fs_bpg and e2fs_isize are always unsigned.

The superblock in ext2fs defines all the fields as unsigned but for
some reason the in-memory superblock was carrying e2fs_bpg and
e2fs_isize as signed.

We should preserve the specified types for consistency.

MFC after: 5 days

11 years agolibstand: Reset the seek pointer in ext2fs as done in UFS.
Pedro F. Giffuni [Sun, 9 Jun 2013 01:19:22 +0000 (01:19 +0000)]
libstand: Reset the seek pointer in ext2fs as done in UFS.

Based on r134760:

Reset the seek pointer to 0 when a file is successfully opened,
since otherwise the initial seek offset will contain the directory
offset of the filesystem block that contained its directory entry.
This bug was mostly harmless because typically the directory is
less than one filesystem block in size so the offset would be zero.
It did however generally break loading a kernel from the (large)
kernel compile directory.

Also reset the seek pointer when a new inode is opened in read_inode(),
though this is not actually necessary now because all callers set
it afterwards.

PR: 177328
Submitted by: Eric van Gyzen
Reviewed by: iedowse
MFC after: 5 days

11 years agoFix a bad calloc(3) call
Baptiste Daroussin [Sat, 8 Jun 2013 23:48:13 +0000 (23:48 +0000)]
Fix a bad calloc(3) call

MFC after: 2 weeks

11 years agoMerge the 1 and 2 byte versions of the atomic functions into one.
Ed Schouten [Sat, 8 Jun 2013 23:45:11 +0000 (23:45 +0000)]
Merge the 1 and 2 byte versions of the atomic functions into one.

After pushing in my fix for the 2 byte functions, I realized that the
functions for 1 and 2 byte operations had become identical. Reduce the
code size by merging the functions for 1 and 2 byte operations together.

While there, slightly improve variable naming and comments.

11 years agoAdd testing utility for behavior of atomic ops.
Ed Schouten [Sat, 8 Jun 2013 22:44:49 +0000 (22:44 +0000)]
Add testing utility for behavior of atomic ops.

This small utility performs a sequence of atomic operations with random
parameters on an atomic variable. For every type, we also create 16
variables, to ensure that we test the correctness at different
alignments.

11 years agoFix a bug introduced with r251190, in which a small hunk was forgotten in
Devin Teske [Sat, 8 Jun 2013 21:45:32 +0000 (21:45 +0000)]
Fix a bug introduced with r251190, in which a small hunk was forgotten in
the performance conversion process.

The effect of this was the following error when selecting the menu
"Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":

[: -eq: unexpected operator

By running `bsdconfig -d' as root to enable debugging, this turns into:

DEBUG: f_getvar: var=[text] value=[
Error: Expected a number for token 4 of --menu.
Use --help to list options.] r=0
[: -eq: unexpected operator

Indicating that the fourth token for --menu which should be $height was
instead a string (the first item of $menu_list) because it was using the
old size-calculation method and $size was now null (needed to use instead
the new size variables of $height $width and $rows).

11 years agoFix a bug introduced with r249751, in which a small hunk was forgotten in
Devin Teske [Sat, 8 Jun 2013 21:33:09 +0000 (21:33 +0000)]
Fix a bug introduced with r249751, in which a small hunk was forgotten in
the performance conversion process.

The effect of this was, when your /etc/defaults/rc.conf file changed
(based on md5(1)) and re-generating the file startup_rcconf_map.cache in
/var/run/bsdconfig/ you would get a screen-dump of its contents before the
menu would appear.

11 years agoFix a typo in comments.
Devin Teske [Sat, 8 Jun 2013 21:11:26 +0000 (21:11 +0000)]
Fix a typo in comments.

11 years agoDon't silently ignore errors (found while
Devin Teske [Sat, 8 Jun 2013 20:47:43 +0000 (20:47 +0000)]
Don't silently ignore errors (found while
testing with `chflags schg /etc/ttys).

11 years agoPrevent getting hung-up on the following prompt (found while testing with
Devin Teske [Sat, 8 Jun 2013 20:43:13 +0000 (20:43 +0000)]
Prevent getting hung-up on the following prompt (found while testing with
`chflags schg /etc/ttys'):

override rw-r--r--  root/wheel for /etc/ttys? (y/n [n])

Simply by adding `-f' flag to mv(1).

11 years agoFix a one-character typo. The effects of which were "Console"->"Ttys" menu
Devin Teske [Sat, 8 Jun 2013 20:27:16 +0000 (20:27 +0000)]
Fix a one-character typo. The effects of which were "Console"->"Ttys" menu
would not launch (and gave no error). This was easily diagnosed by running
`bsdconfig -d' as root and seeing the following error right after selecting
the "Ttys" sub-menu:

DEBUG: f_getvar: var=[text] value=[
Error: Expected at least 6 tokens for --menu, have 4.
Use --help to list options.] r=0

Typo was introduced by SVN r251361.

11 years agoAdd 8devices CARAMBOLA2 support.
Adrian Chadd [Sat, 8 Jun 2013 20:21:17 +0000 (20:21 +0000)]
Add 8devices CARAMBOLA2 support.

This is based on the AR933x (Hornet) SoC from Qualcomm Atheros.

It's a much nicer board to do development on - 64MB RAM, 16MB flash.
The development board breaks out the GPIO pins, ethernet, serial (via
a USB<->RS232 chip), USB host and of course a small wifi antenna.

Everything but the wifi works thus far.

11 years agoAdd support for two new winbond SPI flash parts.
Adrian Chadd [Sat, 8 Jun 2013 20:12:14 +0000 (20:12 +0000)]
Add support for two new winbond SPI flash parts.

The 8devices carambola 2 board uses the 16MB part.

Here's how it looks:

spibus0: <spibus bus> on spi0
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
mx25l0: w25q128, sector 65536 bytes, 256 sectors

Tested:

* 8devices Carambola 2 board

11 years agoAdd a prompt to the "Add User" and "Add Group" sub-menu items (under the
Devin Teske [Sat, 8 Jun 2013 19:13:49 +0000 (19:13 +0000)]
Add a prompt to the "Add User" and "Add Group" sub-menu items (under the
"Login Management" module): Use default values for all account details?

If you select "Yes" (the default is "No"), you'll jump past all the prompts
and jump straight to the review screen with all-default values.

Makes adding a lot of users/groups faster/easier if you don't need to
customize more than one or two different values from their defaults.

11 years agoMinor markup.
Sergey Kandaurov [Sat, 8 Jun 2013 18:25:08 +0000 (18:25 +0000)]
Minor markup.

11 years agoCurb another regression (this one introduced by r251545, itself trying to
Devin Teske [Sat, 8 Jun 2013 18:23:41 +0000 (18:23 +0000)]
Curb another regression (this one introduced by r251545, itself trying to
fix the regression introduced by r251544; which was trying to make things
consistent w/respect to ESC versus YES versus NO in the password disable
prompt in "Login Management".

(need stronger coffee; very sorry for the churn)

With this revision, the "YES", "NO", and implied ESC options all work as-
expected. Choosing "YES" allows you to proceed and the password will be
disabled. Choosing "NO" will bring back around to enter a password for the
account. Pressing ESC will drop you out of either user or group input and
back to the usermgmt screen.

11 years agoUpdate locking scheme, mostly transition from sched_lock.
Sergey Kandaurov [Sat, 8 Jun 2013 18:16:41 +0000 (18:16 +0000)]
Update locking scheme, mostly transition from sched_lock.

11 years agoFix a regression introduced by r251544; if user chooses "NO" when being
Devin Teske [Sat, 8 Jun 2013 18:13:42 +0000 (18:13 +0000)]
Fix a regression introduced by r251544; if user chooses "NO" when being
asked if they would like to disable password authentication for the account,
loop back to prompt them for the password again.

11 years agoCheck for ESC as a separate choice from "NO" when asking if the operator
Devin Teske [Sat, 8 Jun 2013 18:08:17 +0000 (18:08 +0000)]
Check for ESC as a separate choice from "NO" when asking if the operator
would like to disable password management for an account while adding either
a user or group. When being prompted to answer questions while adding a
group or user, two things are trow:

1. You can hit ENTER to blast through all the questions and in the end, the
   group or user is created with sensible defaults for all values.

2. You can press ESC during any prompt to cancel the operation as a whole.

This fix is shoring up an inconsistency in the latter (#2).

11 years agoTrack defaultitem in the password and account expiry menus; if the user
Devin Teske [Sat, 8 Jun 2013 17:46:39 +0000 (17:46 +0000)]
Track defaultitem in the password and account expiry menus; if the user
presses ESC or chooses Cancel/No in any of the sub-menus, we want to return
to the expiry menu with that item selected.

11 years agoFix a regression in the "Login Management" module introduced by r251242 in
Devin Teske [Sat, 8 Jun 2013 17:36:31 +0000 (17:36 +0000)]
Fix a regression in the "Login Management" module introduced by r251242 in
which choosing to cancel the manual input of expiration time (in seconds
since the UNIX epoch) for either account expiration or password expiration
would see the original value lost.

11 years agoReduce verbosity in the "Console"->"Saver" module (bsdconfig syscons_saver)
Devin Teske [Sat, 8 Jun 2013 16:49:19 +0000 (16:49 +0000)]
Reduce verbosity in the "Console"->"Saver" module (bsdconfig syscons_saver)
by replacing the infinitive [verb] phrase "Simply blank the screen" with a
simple description of what you get; "Blank screen".

PR: ports/169316

11 years agoRemove extraneous characters ('<<<') from `Exit' menutag in the "Security"
Devin Teske [Sat, 8 Jun 2013 16:28:08 +0000 (16:28 +0000)]
Remove extraneous characters ('<<<') from `Exit' menutag in the "Security"
and "Startup"->"Misc" modules to make the menus appear more consistent with
the numerous other modules and look a little cleaner.

PR: ports/169316

11 years agoActually make the 2-byte atomics work.
Ed Schouten [Sat, 8 Jun 2013 16:24:49 +0000 (16:24 +0000)]
Actually make the 2-byte atomics work.

Even though I tested the 1-byte operations on arbitrarily aligned bytes,
it seems I did not do this for the 2-byte operations.

Create easy to read functions that are used to get/put bytes and
halfwords in words. To keep the compiler happy, explicitly read two
bytes into a union to obtain a 16-bit value.

11 years agoImport Kevin Lo's port of urtwn(4) from OpenBSD. urtwn(4) is a driver for the
Rui Paulo [Sat, 8 Jun 2013 16:02:31 +0000 (16:02 +0000)]
Import Kevin Lo's port of urtwn(4) from OpenBSD. urtwn(4) is a driver for the
Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless cards.
This driver requires microcode which is available in FreeBSD ports:
net/urtwn-firmware-kmod.

Hiren ported the urtwn(4) man page from OpenBSD and Glen just commited a port
for the firmware.

TODO:
- 802.11n support
- Stability fixes - the driver can sustain lots of traffic but has trouble
coping with simultaneous iperf sessions.
- fix debugging

MFC after: 2 months
Tested by: kevlo, hiren, gjb

11 years agosigaction(2): Document various non-POSIX functions as async-signal safe.
Jilles Tjoelker [Sat, 8 Jun 2013 13:45:43 +0000 (13:45 +0000)]
sigaction(2): Document various non-POSIX functions as async-signal safe.

11 years agoaio_mlock() added:
Gleb Smirnoff [Sat, 8 Jun 2013 13:30:13 +0000 (13:30 +0000)]
aio_mlock() added:
  - Regen for r251526.
  - Bump __FreeBSD_version.

11 years ago Add new system call - aio_mlock(). The name speaks for itself. It allows
Gleb Smirnoff [Sat, 8 Jun 2013 13:27:57 +0000 (13:27 +0000)]
  Add new system call - aio_mlock(). The name speaks for itself. It allows
to perform the mlock(2) operation, which can consume a lot of time, under
control of aio(4).

Reviewed by: kib, jilles
Sponsored by: Nginx, Inc.

11 years agoUse improved __sync_*() intrinsics for MIPS in userspace as well.
Ed Schouten [Sat, 8 Jun 2013 13:22:53 +0000 (13:22 +0000)]
Use improved __sync_*() intrinsics for MIPS in userspace as well.

r251524 introduced custom tailored versions for MIPS of these functions
for kernel-space code. We can just reuse them in userspace as well.

11 years agoAdd proper __sync_*() intrinsics for MIPS.
Ed Schouten [Sat, 8 Jun 2013 13:19:11 +0000 (13:19 +0000)]
Add proper __sync_*() intrinsics for MIPS.

To make <stdatomic.h> work on MIPS (and ARM) using GCC, we need to
provide implementations of the __sync_*() functions. I already added
these functions for 4 and 8 byte types to libcompiler-rt some time ago,
based on top of <machine/atomic.h>.

Unfortunately, <machine/atomic.h> only provides a subset of the features
needed to implement <stdatomic.h>. This means that in some cases we had
to do compare-and-exchange calls in loops, where a simple ll/sc would
suffice.

Also implement these functions for 1 and 2 byte types. MIPS only
provides ll/sc instructions for 4 and 8 byte types, but this is of
course no limitation. We can simply load 4 bytes and use some bitmask
tricks to modify only the bytes affected.

Discussed on: mips, arch
Tested with: QEMU

11 years ago Make sys_mlock() function just a wrapper around vm_mlock() function
Gleb Smirnoff [Sat, 8 Jun 2013 13:13:40 +0000 (13:13 +0000)]
  Make sys_mlock() function just a wrapper around vm_mlock() function
that does all the job.

Reviewed by: kib, jilles
Sponsored by: Nginx, Inc.

11 years ago Separate LIO_SYNC processing into a separate function aio_process_sync(),
Gleb Smirnoff [Sat, 8 Jun 2013 13:02:43 +0000 (13:02 +0000)]
  Separate LIO_SYNC processing into a separate function aio_process_sync(),
and rename aio_process() into aio_process_rw().

Reviewed by: kib
Sponsored by: Nginx, Inc.

11 years agoMFV r251519:
Xin LI [Sat, 8 Jun 2013 09:11:20 +0000 (09:11 +0000)]
MFV r251519:

 * Illumos ZFS issue #3805 arc shouldn't cache freed blocks

Quote from the Illumos issue:

    ZFS should proactively evict freed blocks from the cache.

    Even though these freed blocks will never be used again, and thus
    will eventually be evicted, this causes us to use memory
    inefficiently for 2 reasons:

    1. A block that is freed has no chance of being accessed again, but
       will be kept in memory preferentially to a block that was accessed
       before it (and is thus older) but has not been freed and thus has
       at least some chance of being accessed again.

    2. We partition the ARC into several buckets:
       user data that has been accessed only once (MRU)
       metadata that has been accessed only once (MRU)
       user data that has been accessed more than once (MFU)
       metadata that has been accessed more than once (MFU)

    The user data vs metadata split is somewhat arbitrary, and the
    primary control on how much memory is used to cache data vs metadata
    is to simply try to keep the proportion the same as it has been in the
    past (each bucket "evicts against" itself).  The secondary control is
    to evict data before evicting metadata.

    Because of this bucketing, we may end up with one bucket mostly
    containing freed blocks that are very old, while another bucket has
    more recently accessed, still-allocated blocks.  Data in the useful
    bucket (with still-allocated blocks) may be evicted in preference to
    data in the useless bucket (with old, freed blocks).

    On dcenter, we saw that the MFU metadata bucket was 230MB, while the
    MFU data bucket was 27GB and the MRU metadata bucket was 256GB.
    However, the vast majority of data in the MRU metadata bucket (256GB)
    was freed blocks, and thus useless.  Meanwhile, the MFU metadata bucket
    (230MB) was constantly evicting useful blocks that will be soon needed.

    The problem of cache segmentation is a larger problem that needs more
    investigation.  However, if we stop caching freed blocks, it should
    reduce the impact of this more fundamental issue.

MFC after: 2 weeks

11 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14041:cb4a51285eeb
Xin LI [Sat, 8 Jun 2013 08:51:22 +0000 (08:51 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14041:cb4a51285eeb

Illumos ZFS issues:
  3805 arc shouldn't cache freed blocks

11 years agocxgbe/tom: Fix bad signed/unsigned mixup in the stid allocator. This
Navdeep Parhar [Sat, 8 Jun 2013 07:23:26 +0000 (07:23 +0000)]
cxgbe/tom: Fix bad signed/unsigned mixup in the stid allocator.  This
fixes a panic when allocating a mixture of IPv6 and IPv4 stids.

MFC after: 1 week

11 years agoMerge in changes from NetBSD:
Andrew Turner [Sat, 8 Jun 2013 07:16:22 +0000 (07:16 +0000)]
Merge in changes from NetBSD:
 * Remove support for non-elf files.
 * Add the VFP setjmp magic numbers.
 * Add the offsets for the VFP registers within the buffer.

11 years agoImplement foreign volume handling. Allows admins to view foreign metadata
Sean Bruno [Sat, 8 Jun 2013 02:54:59 +0000 (02:54 +0000)]
Implement foreign volume handling.  Allows admins to view foreign metadata
and clear or import it for use.

PR:     kern/172091
Submitted by:   smh@freebsd.org
Reviewed by:    jhb@freebsd.org
MFC after:      2 weeks

11 years agoFix some recent regression issues:
Hans Petter Selasky [Fri, 7 Jun 2013 22:35:58 +0000 (22:35 +0000)]
Fix some recent regression issues:

1) Only multi-TD isochronous transfers should use NORMAL
type after specific type as per XHCI specification.

2) BEI bit is only available in NORMAL and ISOCHRONOUS
TRB types. Don't use this bit for other types to avoid
hardware asserts. Reserved bits should be don't care
though ...

MFC after: 1 week
PR: usb/179342

11 years agoFinish pulling in the NetBSD setjmp/longjmp updates on ARM.
Andrew Turner [Fri, 7 Jun 2013 22:01:06 +0000 (22:01 +0000)]
Finish pulling in the NetBSD setjmp/longjmp updates on ARM.

Store/restore the VFP registers in setjmp/longjmp on ARM EABI if VFP is
enabled in the kernel. It checks the hw.floatingpoint sysctl to see if
floating-point is available and uses this to determine if it should store
them. If it does it uses a different magic value so longjmp is able to know
if it should load them.

11 years agoAdd WITH_DEBUG_FILES
Ed Maste [Fri, 7 Jun 2013 21:51:10 +0000 (21:51 +0000)]
Add WITH_DEBUG_FILES

makeman currently generates a src.conf that claims every option also
enforces WITHOUT_BIND_UTILS, so I applied this section by hand.

11 years agoAdd a new knob WITH_DEBUG_FILES to control the building of standalone
Ed Maste [Fri, 7 Jun 2013 21:40:02 +0000 (21:40 +0000)]
Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries.  The "-g" debug flag
is automatically applied when WITH_DEBUG_FILES is set.

The debug files are now named ${prog}.debug and ${shlib}.debug for
consistency with other systems and documentation.  In addition they are
installed under /usr/lib/debug, to simplify the process of installing
them if needed after a crash.  Users of bsd.{prog,lib}.mk outside of the
base system place the standalone debug files in a .debug subdirectory.
GDB automatically searches both of these directories for standalone
debug files.

Thanks to everyone who contributed changes, review, and testing during
development.

11 years agoReduce the difference to NetBSD.
Andrew Turner [Fri, 7 Jun 2013 21:23:11 +0000 (21:23 +0000)]
Reduce the difference to NetBSD.

 * Stop pretending we support anything other than ELF by removing code
   surrounded by #ifdef __ELF__ ... #endif.
 * Remove _JB_MAGIC_SETJMP and _JB_MAGIC__SETJMP, they are defined in
   setjmp.h, which is able to be included from asm.
 * Fix the spelling of dependent.
 * Rename END _END and add END and ASEND to complement ENTRY and ASENTRY
   respectively
 * Add macros to simplify accessing the Global Offset Table, some of these
   will be used in the upcoming update to the setjmp functions.

11 years agoInclude machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. This
Andrew Turner [Fri, 7 Jun 2013 21:13:28 +0000 (21:13 +0000)]
Include machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. This
allows us to remove it from the ARM copy of machine/asm.h.

11 years agoRemove an extra copy of _setjmp from libstand. We have used the libc version
Andrew Turner [Fri, 7 Jun 2013 21:06:19 +0000 (21:06 +0000)]
Remove an extra copy of _setjmp from libstand. We have used the libc version
of this function since r183876.

11 years agoMake 'portsnap alfred' overwrite ports tree if it's not created by a
Xin LI [Fri, 7 Jun 2013 20:21:30 +0000 (20:21 +0000)]
Make 'portsnap alfred' overwrite ports tree if it's not created by a
portsnap.

Discussed with: alfred
Reviewed by: cperciva

11 years agoOverride bmake's default MAKEFILE_PREFERENCE
Simon J. Gerraty [Fri, 7 Jun 2013 19:45:04 +0000 (19:45 +0000)]
Override bmake's default MAKEFILE_PREFERENCE