dragonfly.git
8 years agosyscons: Get rid of xpad variable by adjusting loop in sckmsrndr.c
Imre Vadász [Thu, 26 Nov 2015 21:56:38 +0000 (22:56 +0100)]
syscons: Get rid of xpad variable by adjusting loop in sckmsrndr.c

8 years agodrm.4: Fix two .Xr
Sascha Wildner [Fri, 27 Nov 2015 10:15:01 +0000 (11:15 +0100)]
drm.4: Fix two .Xr

8 years agosocket: Make sure that accept queues are empty before socket destruction
Sepherosa Ziehau [Fri, 27 Nov 2015 06:59:31 +0000 (14:59 +0800)]
socket: Make sure that accept queues are empty before socket destruction

8 years agosocket: Make sure so_refs will not go from 0 to 1
Sepherosa Ziehau [Fri, 27 Nov 2015 06:45:35 +0000 (14:45 +0800)]
socket: Make sure so_refs will not go from 0 to 1

8 years agosocket: Remove fo_ioctl(FIONBIO) for sockets.
Sepherosa Ziehau [Fri, 27 Nov 2015 03:31:45 +0000 (11:31 +0800)]
socket: Remove fo_ioctl(FIONBIO) for sockets.

This should not be called (soo_ioctl(FIONBIO) is actually a NOP),
since we records non-blocking in 'struct file'.

8 years agoem/emx/igb: Properly set status for manually configured media/mediaopt
Sepherosa Ziehau [Fri, 27 Nov 2015 03:00:41 +0000 (11:00 +0800)]
em/emx/igb: Properly set status for manually configured media/mediaopt

8 years agomxge: Always send the current media (optics) back to callers.
Sepherosa Ziehau [Fri, 27 Nov 2015 02:21:14 +0000 (10:21 +0800)]
mxge: Always send the current media (optics) back to callers.

8 years agodrm: Implement simple broken EDID override by loading firmware (v16)
zrj [Fri, 20 Nov 2015 11:59:41 +0000 (13:59 +0200)]
drm: Implement simple broken EDID override by loading firmware (v16)

Main differences between this variant and its gpl analogue:
  * permissive license;
  * no builtin generic EDID data blocks;

Generic EDID firmware can be used from new dports/sysutils/devedid-data port.
Still it is better to use monitor specific EDID block, either by modifying
generic variants or repairing dumped one or even better extracting from
working identical monitor if it is available (look for hex dump in Xorg.0.log).

Make sure that used fw.bin at least has correct resolutions and valid checksum.
This can be done with sysutils/edid-decode utility.

Tested with broken lcd panel returning corrupted EDID block on dvi port:
  * radeonkms R7 240, dvi and dvi2hdmi cable adapter
    echo 'drm.edid_firmware="DVI-D-1:edidfw_repaired"' >> /boot/loader.conf

  * i915 Haswell i7-4712MQ laptop, dvi2hdmi cable adapter
    echo 'drm.edid_firmware="HDMI-A-1:edidfw_1920x1080"' >> /boot/loader.conf
    echo 'drm.video.hdmia1="e"  # force enable on i915' >> /boot/loader.conf

While here, document tunables: drm.video.<connector> and new drm.edid_firmware.

8 years agolinux/ww_mutex.h: Remove a wrong assert
François Tigeot [Thu, 26 Nov 2015 07:28:54 +0000 (08:28 +0100)]
linux/ww_mutex.h: Remove a wrong assert

It constantly causes panics with newer drm code from Linux 4.0.

8 years agomxge: Integrate ifmedia flow control support.
Sepherosa Ziehau [Thu, 26 Nov 2015 06:31:04 +0000 (14:31 +0800)]
mxge: Integrate ifmedia flow control support.

And remove flow control sysctl node.  The following command should
be use to change flow control settings:
ifconfig mxgeX [mediaopt|-mediaopt] flowcontrol

Note, due to hardware limitation, rxpause and txpause could only be
all on or all off.

8 years agomxge: Fix ifmedia related bits
Sepherosa Ziehau [Thu, 26 Nov 2015 05:32:25 +0000 (13:32 +0800)]
mxge: Fix ifmedia related bits

8 years agoix: Integrate ifmedia flow control support.
Sepherosa Ziehau [Thu, 26 Nov 2015 01:31:03 +0000 (09:31 +0800)]
ix: Integrate ifmedia flow control support.

Other minor bits:
- Set media to IFM_NONE, if there is no link yet.
- Remove no longer used dev.ix.Y.flow_ctrl sysctl node.
  ifconfig ixY [mediaopt|-mediaopt] [rxpause|txpause|forcepause]
  should be used instead.

8 years agoem.4/igb.4: Set date properly
Sepherosa Ziehau [Thu, 26 Nov 2015 01:40:36 +0000 (09:40 +0800)]
em.4/igb.4: Set date properly

8 years agoix.4: ixX -> ixY and dev.ix.X -> dev.ix.Y
Sepherosa Ziehau [Thu, 26 Nov 2015 01:38:29 +0000 (09:38 +0800)]
ix.4: ixX -> ixY and dev.ix.X -> dev.ix.Y

8 years agoSync ACPICA with Intel's version 20151124.
Sascha Wildner [Wed, 25 Nov 2015 19:16:38 +0000 (20:16 +0100)]
Sync ACPICA with Intel's version 20151124.

* Silence warnings about non-existant _Sx methods because they are
  optional. In fact, we already had a fix for this from sephe
  (671882eba43).

* Fixed bugs in FADT handling and auto-serialization.

* Removed support for _SUB in AcpiGetObjectInfo because it caused
  errors due to not fully initialized operation regions.

* Fixed issues with terminate/quit/exit commands in the debugger.
  Also thread ID support was added to the debugger.

* Allow multiple definitions blocks in ASL/AML files for iasl,
  acpiexec and acpixtract.

* Enhanced type checking for Name() in iasl. Also indent fixes for
  -ic and -ia.

* Additional error message for attempting to open a Scope() on an
  object defined in an SSDT.

* Improved formatting.

For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.

8 years agoiasl(8): Add some files as dependencies which are m4_include()'d only.
Sascha Wildner [Wed, 25 Nov 2015 18:42:36 +0000 (19:42 +0100)]
iasl(8): Add some files as dependencies which are m4_include()'d only.

This helps us across quickworld when just one of those files changes.

8 years agoix: Set up ifm_active properly when link is not up.
Sepherosa Ziehau [Wed, 25 Nov 2015 07:50:45 +0000 (15:50 +0800)]
ix: Set up ifm_active properly when link is not up.

8 years agoifmedia: Reset ifm_media and ifm_cur in ifmedia_removeall()
Sepherosa Ziehau [Wed, 25 Nov 2015 07:40:30 +0000 (15:40 +0800)]
ifmedia: Reset ifm_media and ifm_cur in ifmedia_removeall()

This function may be called by NIC drivers on non-detach path, so
we need to make sure everything of ifmedia are in sane state.

8 years agoix: Fix optics and ifmedia settings
Sepherosa Ziehau [Wed, 25 Nov 2015 07:30:43 +0000 (15:30 +0800)]
ix: Fix optics and ifmedia settings

8 years agoigb: Fix ifmedia leakage on detach path.
Sepherosa Ziehau [Wed, 25 Nov 2015 06:40:42 +0000 (14:40 +0800)]
igb: Fix ifmedia leakage on detach path.

While I'm here, remove outdated code.

8 years agoig: Factor out e1000_force_flowctrl
Sepherosa Ziehau [Wed, 25 Nov 2015 06:33:14 +0000 (14:33 +0800)]
ig: Factor out e1000_force_flowctrl

8 years agoem/emx: Integrate ifmedia flow control support.
Sepherosa Ziehau [Wed, 25 Nov 2015 03:30:35 +0000 (11:30 +0800)]
em/emx: Integrate ifmedia flow control support.

Other minor bits:
- Set media to IFM_NONE, if there is no link yet.
- Remove no longer used dev.em.Y.flow_ctrl sysctl node.
  ifconfig emY [mediaopt|-mediaopt] [rxpause|txpause|forcepause]
  should be used instead.

8 years agoigb: Integrate ifmedia flow control support.
Sepherosa Ziehau [Mon, 23 Nov 2015 09:04:58 +0000 (17:04 +0800)]
igb: Integrate ifmedia flow control support.

Other minor bits:
- Set media to IFM_NONE, if there is no link yet.
- Remove the IFM_1000_LX bits.  Cards supported by igb(4) do
  not have PHYs supporting 1000baseLX.
- Remove no longer used dev.igb.X.flow_ctrl sysctl node.
  ifconfig igbX [mediaopt|-mediaopt] [rxpause|txpause|forcepause]
  should be used instead.

8 years agoacpi_pvpanic: Notify Qemu VM host if we panic.
Imre Vadász [Sat, 7 Nov 2015 00:37:39 +0000 (01:37 +0100)]
acpi_pvpanic: Notify Qemu VM host if we panic.

By default the virtual machine is stopped when the pvpanic is triggered.
For accessing ddb, the virtual machine execution then needs to be resumed
manually (e.g. with the "cont" command on the Qemu-monitor console).

Triggering a pvpanic instead of just continuing to the ddb prompt can be
useful to avoid hogging the CPU while hanging in ddb, and to provide a
kernel panic notification for the VM-host system.

8 years agodrm: sync drm_edid.c to linux 3.18
zrj [Thu, 19 Nov 2015 14:35:59 +0000 (16:35 +0200)]
drm: sync drm_edid.c to linux 3.18

Use C99 initializers in structs.

8 years agolwp_setname.2: Add missing .El
Sascha Wildner [Tue, 24 Nov 2015 20:05:32 +0000 (21:05 +0100)]
lwp_setname.2: Add missing .El

8 years agosys/vfs/hammer: Remove forward declaration of struct hammer_cmirror
Tomohiro Kusumi [Tue, 24 Nov 2015 16:23:13 +0000 (01:23 +0900)]
sys/vfs/hammer: Remove forward declaration of struct hammer_cmirror

8 years agosys/vfs/hammer: Remove signature from ondisk node
Tomohiro Kusumi [Tue, 24 Nov 2015 16:00:26 +0000 (01:00 +0900)]
sys/vfs/hammer: Remove signature from ondisk node

The node signature was added in the early stage of hammer
development, but it's no longer used for anything except
that newfs_hammer sets the field to GOOD (for no reason).

c461935c added some code to propagate the GOOD signature
on node split (just to make it look a bit more sane), but
it's useless anyway.

This commit changes the signature field to reserved00,
and also gets rid of HAMMER_BTREE_SIGNATURE_XXX macros.
The change doesn't affect anything just like c461935c did
nothing good or bad.

8 years agomake upgrade: Fix typo (dsched_fw -> dsched_fq).
Sascha Wildner [Tue, 24 Nov 2015 14:38:30 +0000 (15:38 +0100)]
make upgrade: Fix typo (dsched_fw -> dsched_fq).

Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
8 years agosys/vfs/hammer: Remove const from volume names
Tomohiro Kusumi [Mon, 23 Nov 2015 18:24:45 +0000 (03:24 +0900)]
sys/vfs/hammer: Remove const from volume names

struct hammer_mount_info having const char** for volume names
was not necessary.

mount_hammer(8) needs to be able to free info->volumes[i]
since these names are strdup'd char* but not pointers to argv[i].

Also see aeb72a17.

8 years ago<string.h>: Fix vkernel build.
Sascha Wildner [Tue, 24 Nov 2015 10:06:26 +0000 (11:06 +0100)]
<string.h>: Fix vkernel build.

8 years agoifmedia: Macro naming and add function to convert str to FC settings
Sepherosa Ziehau [Tue, 24 Nov 2015 09:07:39 +0000 (17:07 +0800)]
ifmedia: Macro naming and add function to convert str to FC settings

- IFM_MANUFLOW -> IFM_FORCEPAUSE
- ifmedia_str2ethfc() converts various strings to ifmedia flow control
  settings.  It helps flow control tunable parsing.

8 years agoifmedia/ifconfig: Take flowcontrol as an alias for rxpause|txpause
Sepherosa Ziehau [Tue, 24 Nov 2015 08:30:01 +0000 (16:30 +0800)]
ifmedia/ifconfig: Take flowcontrol as an alias for rxpause|txpause

8 years agoifmedia: Initialize ifm->ifm_media to IFM_NONE
Sepherosa Ziehau [Tue, 24 Nov 2015 08:16:28 +0000 (16:16 +0800)]
ifmedia: Initialize ifm->ifm_media to IFM_NONE

8 years agoifmedia: Fix SIOCGIFMEDIA ifmr_current value
Sepherosa Ziehau [Tue, 24 Nov 2015 07:05:35 +0000 (15:05 +0800)]
ifmedia: Fix SIOCGIFMEDIA ifmr_current value

ifm->ifm_cur may not contain flow control media options, so ifm->ifm_media
should be used instead.

8 years agoifmedia: Set ifm->ifm_media properly upon ifmedia_set()
Sepherosa Ziehau [Tue, 24 Nov 2015 06:49:11 +0000 (14:49 +0800)]
ifmedia: Set ifm->ifm_media properly upon ifmedia_set()

8 years agoifmedia: Add IFM_ETH_MANUFLOW.
Sepherosa Ziehau [Tue, 24 Nov 2015 03:29:20 +0000 (11:29 +0800)]
ifmedia: Add IFM_ETH_MANUFLOW.

This media option ignores the auto-negotiation flow control setting,
and force the flow control settings configured by user.

8 years agonrelease: fix dragonfly digest http link
Robin Hahling [Mon, 23 Nov 2015 17:38:45 +0000 (18:38 +0100)]
nrelease: fix dragonfly digest http link

8 years agoinstaller: Bump /boot size to 1G and various other small improvements.
Sascha Wildner [Mon, 23 Nov 2015 16:22:07 +0000 (17:22 +0100)]
installer: Bump /boot size to 1G and various other small improvements.

* /boot size is bumped to 1G (same for root in UFS installs).

* Don't allow HAMMER installs to disks <10G. Warn between 10G and 50G.

* For UFS installs to disks that are <=8G, recommend only root and swap.

8 years agoinstaller: Bump minimum disk size to 4GB.
Sascha Wildner [Sun, 22 Nov 2015 07:56:31 +0000 (08:56 +0100)]
installer: Bump minimum disk size to 4GB.

8 years agosys/vfs/hammer: Remove unused bitfield of struct hammer_io
Tomohiro Kusumi [Mon, 23 Nov 2015 08:00:37 +0000 (17:00 +0900)]
sys/vfs/hammer: Remove unused bitfield of struct hammer_io

Remove unused validated field of inmemory I/O structure.
(the bitfields are not ondisk representation)

This field was only used by old cluster code in the early
stage of hammer development.

8 years agoifmedia: Define flow control related description properly
Sepherosa Ziehau [Mon, 23 Nov 2015 07:44:46 +0000 (15:44 +0800)]
ifmedia: Define flow control related description properly

8 years agoMoving master to version 4.5. v4.5.0
Justin C. Sherrill [Mon, 23 Nov 2015 04:37:40 +0000 (23:37 -0500)]
Moving master to version 4.5.

8 years agols(1): New long format for named locales
John Marino [Sun, 22 Nov 2015 19:45:10 +0000 (20:45 +0100)]
ls(1): New long format for named locales

The use of the basic version of ISO 8601 was not very popular.  After
a discussion on IRC, the Long Format of named locales is the following:

  DD-MMM-YYYY hh:mm

  DD is day number with leading zeros
 MMM is abbreviated month *in english* (regardless of locale)
YYYY is 4-digit year
  hh is 24-hour with leading zeros
  ss is seconds with leading zeros

8 years agokernel/ncr: s/long signed/long/
Sascha Wildner [Sun, 22 Nov 2015 18:08:49 +0000 (19:08 +0100)]
kernel/ncr: s/long signed/long/

8 years agokernel/libkern: Add strnlen() (from FreeBSD) and use it.
Sascha Wildner [Sun, 22 Nov 2015 17:19:19 +0000 (18:19 +0100)]
kernel/libkern: Add strnlen() (from FreeBSD) and use it.

8 years agosys/vfs/hammer: Remove unused struct hammer_volume members
Tomohiro Kusumi [Sun, 22 Nov 2015 13:41:21 +0000 (22:41 +0900)]
sys/vfs/hammer: Remove unused struct hammer_volume members

Remove unused members of inmemory volume structure.
These are mostly from early stage of hammer development.

These are copies of ondisk volume structure fields.
Inmemory volume obviously isn't an exact copy of ondisk volume,
so these aren't necessary unless actually used.

8 years agocompilers.conf: modify default DPORT_CLANG_STD_INCOPTXX
John Marino [Sun, 22 Nov 2015 13:33:44 +0000 (14:33 +0100)]
compilers.conf: modify default DPORT_CLANG_STD_INCOPTXX

I am not entirely sure INCOPTXX even needs to be set for clang, but
let's change DPORT_CLANG_STD_INCOPTXX from:
  -isystem /usr/include/c++/5.0
to:
  -cxx-isystem /usr/include/c++/5.0

The inclusion only applies to c++, so let's specify that.  This only
applies to clang from dports and it can be overridden.

8 years agoRecord today's local GCC modifications on README.DRAGONFLY
John Marino [Sun, 22 Nov 2015 12:43:37 +0000 (13:43 +0100)]
Record today's local GCC modifications on README.DRAGONFLY

8 years agoi386 removal, part 45/x: Remove various bits and pieces related to i386.
Sascha Wildner [Sun, 22 Nov 2015 07:39:46 +0000 (08:39 +0100)]
i386 removal, part 45/x: Remove various bits and pieces related to i386.

8 years agodf: Remove old UFS superblock reading code.
Sascha Wildner [Sun, 22 Nov 2015 06:53:16 +0000 (07:53 +0100)]
df: Remove old UFS superblock reading code.

This is from times when there was only UFS and it does not play well
with some other filesystem types like devfs.

Reported-by: Michael Iline <michael.iline@yahoo.com>
8 years agokernel/syscons: Change definitions of dev_ops functions to static.
Sascha Wildner [Sun, 22 Nov 2015 04:37:17 +0000 (05:37 +0100)]
kernel/syscons: Change definitions of dev_ops functions to static.

To match their declarations.

8 years agogcc/libssp: Include <stdlib.h> so that alloca() is defined.
Sascha Wildner [Sun, 22 Nov 2015 04:13:42 +0000 (05:13 +0100)]
gcc/libssp: Include <stdlib.h> so that alloca() is defined.

It had started warning about this after the <malloc.h> removal.

8 years agosys/vfs/hammer: Cleanup forward declaration of struct
Tomohiro Kusumi [Sat, 21 Nov 2015 15:46:40 +0000 (00:46 +0900)]
sys/vfs/hammer: Cleanup forward declaration of struct

8 years agoacpi.4: Move hw.acpi.{install,remove}_interface to LOADER TUNABLES.
Sascha Wildner [Sat, 21 Nov 2015 12:31:32 +0000 (13:31 +0100)]
acpi.4: Move hw.acpi.{install,remove}_interface to LOADER TUNABLES.

Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
8 years agodrm/radeon: Use pci_resource_start and pci_resource_len functions.
Imre Vadasz [Sat, 21 Nov 2015 10:18:11 +0000 (11:18 +0100)]
drm/radeon: Use pci_resource_start and pci_resource_len functions.

Replace calls to drm_get_resource_start and drm_get_resource_len
by pci_resource_start and pci_resource_len respectively.

8 years agodrm/ttm: Use pr_err and pr_info for logging.
Imre Vadasz [Sat, 21 Nov 2015 09:11:47 +0000 (10:11 +0100)]
drm/ttm: Use pr_err and pr_info for logging.

8 years agosys/vfs/hammer: Remove unused struct hammer_mount members
Tomohiro Kusumi [Fri, 20 Nov 2015 18:05:41 +0000 (03:05 +0900)]
sys/vfs/hammer: Remove unused struct hammer_mount members

count_newrecords is still being used by hammer_mem_add(),
but this should have been removed by 32fcc103 when it got
rid of the code logic that contains count_newrecords.

unused01 used to be io_running_wakeup until 3038a8ca, but
hammer_mount doesn't need dummy bytes here.

Other two are simply no longer used.

8 years agols(1): Take II on fixing future time listings
John Marino [Fri, 20 Nov 2015 16:01:57 +0000 (17:01 +0100)]
ls(1): Take II on fixing future time listings

Really make sure all future timestamps are display with a year.
The logic of the first attempt was incorrect, and it did the opposite.

8 years agols(1): Return previous long format for C/POSIX locales
John Marino [Fri, 20 Nov 2015 15:32:52 +0000 (16:32 +0100)]
ls(1): Return previous long format for C/POSIX locales

The output of ls -l for POSIX locales is covered by the POSIX standard.
The previous implementation was not compliance with the handling of
future timestamps.  The standard requires that future timestamps always
show the year where as previously it would only show the year if the
file's modification time was less than 6 months into the future.

This change detects if C/POSIX LC_TIME is specified, and if so, it
implements the long format as specified by the POSIX standard.  The
ISO 8601 format is still used for named locales.

Reported by: swildner

8 years agosys/vfs/hammer: Fix comments
Tomohiro Kusumi [Thu, 19 Nov 2015 17:32:45 +0000 (02:32 +0900)]
sys/vfs/hammer: Fix comments

/* (not including atime/mtime) */
was supposed to be for HAMMER_INODE_DDIRTY according to ddfdf542.

8 years agosys/vfs/hammer: Remove HAMMER_RECTYPE_UNUSED02/03 macros
Tomohiro Kusumi [Thu, 19 Nov 2015 16:58:31 +0000 (01:58 +0900)]
sys/vfs/hammer: Remove HAMMER_RECTYPE_UNUSED02/03 macros

These macros aren't used.
Also macros from 0x4 to 0xF do not exist, then it's natural
not to have UNUSED macros for 0x2 and 0x3.

8 years agols(1): Alter time portion of "long format"
John Marino [Fri, 20 Nov 2015 12:49:26 +0000 (13:49 +0100)]
ls(1): Alter time portion of "long format"

One side effect of moving to the CLDR standard for locale definitions
is that abreviated months are no longer guaranteed to align.  We altered
the definitions for CJK to ensure this, but we do not want to manually
adjust every locale.

The most obvious manifestation is seen with ls(1) using the long format
(-l option).  Not only is the month abbreviation no longer guaranteed to
be 3 characters wide, it's not even guaranteed to be a uniform width.  As
a result, the file listing may no longer line up, as seen with French:

  ironwolf# env LANG=fr_FR.UTF-8 ls -l | head
  drwxr-xr-x  2 root  wheel   512 26 mars  2015 ariadne
  drwxr-xr-x  2 root  wheel   512 26 mars  2015 artemis
  drwxr-xr-x  3 root  wheel   512  9 sept. 19:45 avida
  drwxr-xr-x  3 root  wheel   512  9 sept. 19:45 babel
  drwxr-xr-x  3 root  wheel   512 15 juin 20:38 bcftools
  drwxr-xr-x  2 root  wheel   512 20 sept. 11:27 biococoa
  drwxr-xr-x  2 root  wheel   512 26 mars  2015 biojava
  drwxr-xr-x  3 root  wheel   512 26 mars  2015 blat
  drwxr-xr-x  3 root  wheel   512  7 nov. 08:44 bwa

  ironwolf# env LANG=fr_FR.UTF-8 ls -lT | head
  drwxr-xr-x  2 root  wheel   512 26 mars 10:15:28 2015 ariadne
  drwxr-xr-x  2 root  wheel   512 26 mars 10:15:28 2015 artemis
  drwxr-xr-x  3 root  wheel   512  9 sept. 19:45:04 2015 avida
  drwxr-xr-x  3 root  wheel   512  9 sept. 19:45:04 2015 babel
  drwxr-xr-x  3 root  wheel   512 15 juin 20:38:55 2015 bcftools
  drwxr-xr-x  2 root  wheel   512 20 sept. 11:27:40 2015 biococoa
  drwxr-xr-x  2 root  wheel   512 26 mars 10:15:28 2015 biojava
  drwxr-xr-x  3 root  wheel   512 26 mars 10:15:28 2015 blat
  drwxr-xr-x  3 root  wheel   512  7 nov. 08:44:24 2015 bwa

To address both issues (misalignment and differing widths as a function
of locale), I've modified ls(1) to use valid forms of ISO 8601, an
international standard for the representation of time.

The default long format produces the last modified timestamp in the form
of YYYYMMDDTHH (Year|Month|Day|T|Hour with no spaces).  This is known as
the "basic" format which includes the optional "T" concatenator.  The
result is the time is represented by a single column using 1-3 characters
less than before.

  ironwolf# env LANG=fr_FR.UTF-8 ls -l | head
  drwxr-xr-x  2 root  wheel   512 20150326T10 ariadne
  drwxr-xr-x  2 root  wheel   512 20150326T10 artemis
  drwxr-xr-x  3 root  wheel   512 20150909T19 avida
  drwxr-xr-x  3 root  wheel   512 20150909T19 babel
  drwxr-xr-x  3 root  wheel   512 20150615T20 bcftools
  drwxr-xr-x  2 root  wheel   512 20150920T11 biococoa
  drwxr-xr-x  2 root  wheel   512 20150326T10 biojava
  drwxr-xr-x  3 root  wheel   512 20150326T10 blat
  drwxr-xr-x  3 root  wheel   512 20151107T08 bwa

The -T option uses the extended format of ISO 8601 without the T symbol,
but with the minutes and seconds representation.  The result is two
characters wider than the approach FreeBSD is taking to address the same
issue (FreeBSD is padding the month section and expanding the field by
two characters to accommodate 5-character wide month names).  The output
on DragonFly looks like this:

  ironwolf# env LANG=fr_FR.UTF-8 ls -lT | head
  drwxr-xr-x  2 root  wheel   512 2015-03-26 10:15:28 ariadne
  drwxr-xr-x  2 root  wheel   512 2015-03-26 10:15:28 artemis
  drwxr-xr-x  3 root  wheel   512 2015-09-09 19:45:04 avida
  drwxr-xr-x  3 root  wheel   512 2015-09-09 19:45:04 babel
  drwxr-xr-x  3 root  wheel   512 2015-06-15 20:38:55 bcftools
  drwxr-xr-x  2 root  wheel   512 2015-09-20 11:27:40 biococoa
  drwxr-xr-x  2 root  wheel   512 2015-03-26 10:15:28 biojava
  drwxr-xr-x  3 root  wheel   512 2015-03-26 10:15:28 blat
  drwxr-xr-x  3 root  wheel   512 2015-11-07 08:44:24 bwa

The long format no longer changes if the last modified time is within six
months (future or past), thus file times are more quickly comparable with
a quick visual scan versus switching between year and hours:seconds.

Reported by: bapt@FreeBSD.org

8 years agoig: Factor out functions for flow control
Sepherosa Ziehau [Fri, 20 Nov 2015 07:34:52 +0000 (15:34 +0800)]
ig: Factor out functions for flow control

8 years agoigb: Support flow control change and default to RX pause
Sepherosa Ziehau [Fri, 20 Nov 2015 06:40:27 +0000 (14:40 +0800)]
igb: Support flow control change and default to RX pause

8 years agoem: Support flow control change and default to RX pause
Sepherosa Ziehau [Fri, 20 Nov 2015 06:03:54 +0000 (14:03 +0800)]
em: Support flow control change and default to RX pause

8 years agoemx: Add per-device flow control tunable support
Sepherosa Ziehau [Fri, 20 Nov 2015 03:41:24 +0000 (11:41 +0800)]
emx: Add per-device flow control tunable support

8 years agodevice: Add device_getenv_string()
Sepherosa Ziehau [Fri, 20 Nov 2015 03:23:55 +0000 (11:23 +0800)]
device: Add device_getenv_string()

8 years agodevice: Prefer dev.driver.unit.knob for per-device tunables.
Sepherosa Ziehau [Fri, 20 Nov 2015 03:13:14 +0000 (11:13 +0800)]
device: Prefer dev.driver.unit.knob for per-device tunables.

This is consistent w/ the sysctl tree structure.

8 years agoemx: Support flow control change and default to RX pause
Sepherosa Ziehau [Fri, 20 Nov 2015 02:57:09 +0000 (10:57 +0800)]
emx: Support flow control change and default to RX pause

Tested-by: dillon@
8 years agokern/lwp: Check lwp_lock before remove lwp from process lwp tree
Sepherosa Ziehau [Fri, 20 Nov 2015 02:12:57 +0000 (10:12 +0800)]
kern/lwp: Check lwp_lock before remove lwp from process lwp tree

This makes sure that lwp tree iteration with blocking operation
will not be broken.

While I'm here, add assertion lwp_lock == 0 in lwp_dispose()

8 years agoradeonkms.4: Document drm.radeon.backlight tunable.
Imre Vadász [Thu, 19 Nov 2015 23:10:00 +0000 (00:10 +0100)]
radeonkms.4: Document drm.radeon.backlight tunable.

After the update of radeonkms(4) to Linux 3.18 level, I have to set
drm.radeon.backlight=1 in my loader.conf to get backlight control
via hw.backlight_level on my HP6715s notebook with an RS690 IGP.

8 years agodrm: Plug memleak on module unload, in linux_workqueue.c again.
Imre Vadasz [Thu, 19 Nov 2015 20:51:31 +0000 (21:51 +0100)]
drm: Plug memleak on module unload, in linux_workqueue.c again.

Destroy the system_power_efficient_wq on module unload, like the
other workqueues.

8 years agofortune: Do not recommend obsolete encodings
François Tigeot [Thu, 19 Nov 2015 16:52:36 +0000 (17:52 +0100)]
fortune: Do not recommend obsolete encodings

8 years agosys/dev/disk/dm: Add dm-flakey target
Tomohiro Kusumi [Sun, 15 Nov 2015 10:22:47 +0000 (19:22 +0900)]
sys/dev/disk/dm: Add dm-flakey target

This commit adds a new dm target dm-flakey.

This target simulates failing devices for testing purposes.
See dm_target_flakey(4) for details.

Note that using this dm target may results in some unstable
status including kernel panic. For example hammer is likely
to cause kernel panic by write data corruption by dm-flakey.
Don't use this target over any block device in production.

  ===== Example1 - Error write I/Os
  # kldload dm_target_flakey
  # dmsetup create flakey1 --table "0 234436482 flakey ${DEV} 0 1 1"
  # newfs_hammer -L TEST /dev/mapper/flakey1
  Volume 0 DEVICE /dev/mapper/flakey1 size 111.79GB
  initialize freemap volume 0
  initializing the undo map (504 MB)
  newfs_hammer: Write volume 0 (/dev/mapper/flakey1): Input/output error
  # dmsetup remove /dev/mapper/flakey1

  ===== Example2 - Silently drop write I/Os
  # newfs_hammer -L TEST ${DEV} > /dev/null
  # mount_hammer ${DEV} /HAMMER
  # cd /HAMMER
  # git clone /usr/local/src/dragonfly
  Cloning into 'dragonfly'...
  done.
  Checking out files: 100% (34434/34434), done.
  # cd
  # umount /HAMMER
  # dmsetup create flakey2 --table "0 234436482 flakey ${DEV} 0 1 1 1 drop_writes"
  # mount_hammer /dev/mapper/flakey2 /HAMMER
  # dmesg | tail -3
  HAMMER() Critical error inode=-1 error=5 while flushing meta-data
  HAMMER() Forcing read-only mode
  HAMMER(TEST) mounted clean, no recovery needed
  # hammer volume-list /HAMMER
  /dev/mapper/flakey2
  # mount | grep "/HAMMER"
  TEST on /HAMMER (hammer, local, read-only)
  # cd /HAMMER/dragonfly
  # git log -p > /dev/null; echo $?
  0
  # cd
  # umount /HAMMER
  # dmsetup remove /dev/mapper/flakey2

  ===== Example3 - Corrupt read I/Os
  # dd if=/dev/zero of=${DEV} bs=1024 count=10000 >/dev/null 2>&1
  # dmsetup create flakey3 --table "0 234436482 flakey ${DEV} 0 1 1 5 corrupt_bio_byte 1 r 65 0"
  # od -tx1 /dev/mapper/flakey3 | head -10
  0000000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  0000020    00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  *
  0010000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  0010020    00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  *
  0020000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  0020020    00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  *
  0030000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
  # dmsetup remove /dev/mapper/flakey3
  # kldunload dm_target_flakey

8 years agosys/dev/disk/dm: Cleanup header includes
Tomohiro Kusumi [Thu, 19 Nov 2015 12:22:22 +0000 (21:22 +0900)]
sys/dev/disk/dm: Cleanup header includes

dm.h depends on <sys/vnode.h>, so dm.h should include it
instead of having c files that depend on dm.h include it.

8 years agosys/kern/vfs: Fix panic message
Tomohiro Kusumi [Wed, 18 Nov 2015 16:50:01 +0000 (01:50 +0900)]
sys/kern/vfs: Fix panic message

Show # of pushed bios.

8 years agocontrib/lvm2: Remove unnecessary space at the end of line
Tomohiro Kusumi [Wed, 18 Nov 2015 12:04:47 +0000 (21:04 +0900)]
contrib/lvm2: Remove unnecessary space at the end of line

Having " %s" at the end of printf format prints unnecessary
space at the end of line when dm targets have nothing to print
for dmsetup status/table.

If dm targets don't implement status/table, use printf format
without " %s", since those targets only initialize the string
with "".

(This fix doesn't exist in upstream lvm2)

8 years agopthread: Add lwp_setname(2) and implement pthread_set_name_np(3)
Sepherosa Ziehau [Thu, 19 Nov 2015 03:37:28 +0000 (11:37 +0800)]
pthread: Add lwp_setname(2) and implement pthread_set_name_np(3)

- Return thread name through kinfo.
- Show thread name in ps(1) for 'Hc'.
- Show thread name in top(1), if it is different from process name.

8 years agodrm/radeon: Update to Linux 3.18
François Tigeot [Thu, 19 Nov 2015 08:03:20 +0000 (09:03 +0100)]
drm/radeon: Update to Linux 3.18

Mostly bugfixes and audio refactoring, no new functionalities.

This update has been prepared by Rimvydas Jasinskas.

8 years agokinfo/proc: Set nthreads properly for kernel threads
Sepherosa Ziehau [Thu, 19 Nov 2015 07:45:01 +0000 (15:45 +0800)]
kinfo/proc: Set nthreads properly for kernel threads

8 years agodrm: Add jiffies_to_usecs and nsecs_to_jiffies64()
François Tigeot [Thu, 19 Nov 2015 07:31:48 +0000 (08:31 +0100)]
drm: Add jiffies_to_usecs and nsecs_to_jiffies64()

8 years agotop: Fix header name and width for process running cpu.
Sepherosa Ziehau [Thu, 19 Nov 2015 07:07:13 +0000 (15:07 +0800)]
top: Fix header name and width for process running cpu.

While I'm here, remove no longer displayed columns from manpage.

8 years agohammer2 - stabilization pass on slave sync (2)
Matthew Dillon [Thu, 19 Nov 2015 06:58:19 +0000 (22:58 -0800)]
hammer2 - stabilization pass on slave sync (2)

* Augment xop_scanall to allow flags to be passed in.

* Implement HMNT2_LOCAL (-o local) flag for debugging cluster elements.

* Fix missing data panic by resolving chain data in the slave sync scan.

* Fix PFS installation ioctl to add the new PFS to the cluster as
  appropriate.

* Numerous cleanups and fixes to the slave sync code which was previously
  ripped up by the XOPs work.  Note that the slave sync code still has tons
  of issues and races.

8 years agohammer2 - hammer2_mount work
Matthew Dillon [Thu, 19 Nov 2015 06:56:45 +0000 (22:56 -0800)]
hammer2 - hammer2_mount work

* Add mount options parsing.

* Add '-o local' which on the initial device mount will forcefully
  disable clustering, allowing individual elements to be mounted
  separately and compared (for debugging).

8 years agohammer2 - stabilization pass on slave sync
Matthew Dillon [Wed, 18 Nov 2015 22:54:01 +0000 (14:54 -0800)]
hammer2 - stabilization pass on slave sync

* Add a temporary hack which avoids a NULL pointer panic.  This goes a long
  way to stabilizing the backend slave sync threads.

8 years agohammer2 - Add 'info' and 'mountall' directives
Matthew Dillon [Wed, 18 Nov 2015 07:02:00 +0000 (23:02 -0800)]
hammer2 - Add 'info' and 'mountall' directives

* hammer2 info - scans all block devices with hammer2 partitions and
  displays available super-root entries.

* hammer2 mountall - scans all block devices with hammer2 partitions
  and mounts their @LOCAL PFS in /var/hammer2/LOCAL.serno.s%d%c
  in the background, waiting until the mounts complete or 15 seconds
  without a status change.

  The idea here is to bring all local block devices online, allowing
  all PFS's related to the H2 block devices to become active (mounting
  one makes them all available), but still giving the system operator
  the ability to idle a block device for maintenance by dismounting
  all of its actively-mounted PFSs.

  A bit confusing, the feature will be ironed out later.

8 years agokern: Hold lwp before possible blocking operation
Sepherosa Ziehau [Wed, 18 Nov 2015 06:52:51 +0000 (14:52 +0800)]
kern: Hold lwp before possible blocking operation

Confirmed-by: dillon@
8 years agoloader - Add nfsroot tunables to manual.
Matthew Dillon [Wed, 18 Nov 2015 02:55:28 +0000 (18:55 -0800)]
loader - Add nfsroot tunables to manual.

* Add nfsroot.iosize and nfsroot.rahead to the loader.8 manual page.

8 years agokernel - Improve netbooted root NFS mounts and allow tunable overrides.
Matthew Dillon [Wed, 18 Nov 2015 02:46:11 +0000 (18:46 -0800)]
kernel - Improve netbooted root NFS mounts and allow tunable overrides.

* Add two tunables and set the default read-ahead for netbooted root
  mounts to 4.

  nfsroot.iosize defaults to 8192
  nfsroot.rahead defaults to 4

* The default iosize must remain 8192 as many NFS servers can't handle
  32768, but if your nfs server is on a DragonFly box you can override it
  in your /boot/loader.conf, setting it to 32768.

  With the improved read-ahead default, read performance should improve
  significantly on netbooted root mounts.  With the combination of the new
  default read ahead and nfsroot.iosize=32768, read performance should be
  able to max-out a GigE link (100+ MBytes/sec) (assuming the originating
  storage can push that rate).

* Does not effect add-on nfs mounts in /etc/fstab which already used a
  reasonable read-ahead setting.

8 years agotop: Put kernel idle threads, i.e. idle_X to the end of the processes list
Sepherosa Ziehau [Wed, 18 Nov 2015 02:00:43 +0000 (10:00 +0800)]
top: Put kernel idle threads, i.e. idle_X to the end of the processes list

8 years agotop: Fix up processes cpu usage percentage using uticks+sticks+iticks
Sepherosa Ziehau [Tue, 17 Nov 2015 12:55:29 +0000 (20:55 +0800)]
top: Fix up processes cpu usage percentage using uticks+sticks+iticks

8 years agohammer2 - Present hardlink solution, misc stability work
Matthew Dillon [Wed, 18 Nov 2015 01:21:14 +0000 (17:21 -0800)]
hammer2 - Present hardlink solution, misc stability work

* The H2 design has had a long-standing problem of losing track of
  hardlinks when intermediate directories are renamed, breaking the
  common-parent-directory design for the inode target.

  Fix this issue by placing the hardlink target in the first common
  parent directory chflagged 'xlink' (or the root of the mount if
  no parent is chflagged 'xlink').  Thus, by default, hardlink targets
  for cross-directory situations will be placed in the root of the mount
  and thus no confusion can ever occur if a mid-path directory is moved
  within the hierarchy.

* This change does not modify the behavior of placing the hardlink target
  in the same directory as the hardlink pointers when they are all in the
  same directory.

* installworld now chflags /*, /usr/*, /var/*, and /home/* 'xlink'.

* Note that hardlink and rename operations across 'xlink' boundaries
  are disallowed (for obvious reasons), but system operators have very
  rarely used hardlinks in major directory crossings.  However, we might
  be pushing it a bit much to automatically chflag /home/*.

  In the past there have been a few minor situations where major-crossing
  hardlinks are attempted.  'lpr' for example tries to hardlink a user
  file into /var/spool, but will copy it if it cannot.  Similarly there
  have been situations in the past where hardlinks between home directories
  have been used to save space, but franklyl softlinks can be used almost
  as easily and such situations have fallen into disfavor.

* Stability improvements to the XOP FIFO mechanics, locking cleanups.

8 years agolibc - Add 'xlink' chflags
Matthew Dillon [Tue, 17 Nov 2015 23:19:42 +0000 (15:19 -0800)]
libc - Add 'xlink' chflags

* Add the xlink flag.  This will be used by hammer2 to demark boundaries
  where cross-link hardlinks will not be allowed.  In otherwords, this tells
  hammer2 how far up the directory tree it has to store the inode used for
  a hardlink.

* Automatically set the xlink flag for /*, /usr/*, and /var/*.

* Note that for the case where all hardlinks are situated in the same
  directory, hammer2 will place the hardlink inode in that directory.
  It is when hardlinks cross directories that hammer2 has to emplace the
  target inode in some parent directory where it can find it.  This is
  where the xlink flag helps.

  It is not required to use the xlink flag, but if you have cross-directory
  hardlinks in hammer2 and you do not use the flag the inodes for those
  hardlinks will be consolidated at the root of the mount which will have
  obvious performance issues and cause snapshots of subdirectories to be
  imprecise because they won't cover the hardlink target.

* Represents a trade-off for a very difficult problem that I haven't been
  able to solve.  While HAMMER2 can easily calculate a common parent
  directory for the hardlink target inode when hardlinks are created or
  deleted or renamed, problems arise when a directory in the directory
  path leading from that point to the hardlink is radically moved within
  the larger directory hierarchy, breaking the ability for hammer2 to locate
  the hardlink target using the above method.

  Rather than force hardlinks to be stored in the root of the mount, which
  reduces the usefulness of subdirectory snapshots, this new mechanism is
  being added to give the sysop the ability to retain nearly all the
  advantages of hardlinks without losing the ability to snapshot reasonable
  subdirectory elements.

8 years agosyscons: Keep screen content and cursor pos when switching to kms console.
Imre Vadász [Wed, 11 Nov 2015 20:53:03 +0000 (21:53 +0100)]
syscons: Keep screen content and cursor pos when switching to kms console.

8 years agovknet - Avoid zombie ssh processes being left when reconnecting.
Imre Vadasz [Wed, 22 Oct 2014 10:31:16 +0000 (12:31 +0200)]
vknet - Avoid zombie ssh processes being left when reconnecting.

8 years agodrm/i915: Use signal_pending()
François Tigeot [Tue, 17 Nov 2015 20:43:44 +0000 (21:43 +0100)]
drm/i915: Use signal_pending()

8 years agosys/dev/disk/dm: Minor targets fixes
Tomohiro Kusumi [Sun, 15 Nov 2015 11:36:25 +0000 (20:36 +0900)]
sys/dev/disk/dm: Minor targets fixes

8 years agosys/dev/disk/dm: Cleanup header includes
Tomohiro Kusumi [Tue, 17 Nov 2015 07:36:02 +0000 (16:36 +0900)]
sys/dev/disk/dm: Cleanup header includes

8 years agosys/dev/disk/dm: Cleanups
Tomohiro Kusumi [Fri, 13 Nov 2015 11:39:43 +0000 (20:39 +0900)]
sys/dev/disk/dm: Cleanups

* Fix comments.
* Add a blank line between functions.
* Some minor fixes on dm core.