John Marino [Tue, 31 Mar 2015 16:27:27 +0000 (18:27 +0200)]
Merge branch 'vendor/BINUTILS225'
John Marino [Tue, 31 Mar 2015 14:29:45 +0000 (16:29 +0200)]
Initial import of Binutils 2.25 on vendor branch
Sepherosa Ziehau [Mon, 30 Mar 2015 14:49:22 +0000 (22:49 +0800)]
sensor: Expose max id of sensor device through hw.sensors.dev_idmax
There could be so many sensor devices that MAXSENSORDEVICES is far
from enough, e.g. coretemp.
Sepherosa Ziehau [Mon, 30 Mar 2015 14:23:40 +0000 (22:23 +0800)]
sensor: Fix sensor device numbering
Always use the lowest available sensor device number.
Sepherosa Ziehau [Mon, 30 Mar 2015 13:42:42 +0000 (21:42 +0800)]
sensor: Fix sysctl tree creation
This allows:
- Attach sensor after installing sensor device.
- Detach sensor without de-installing sensor device.
Matthew Dillon [Tue, 31 Mar 2015 04:50:14 +0000 (21:50 -0700)]
hammer2 - Cleanup error paths
* Do not try to return I/O error status from hammer2_chain_lock() or
hammer2_cluster_lock(). This is just asking for trouble by depending
on callers to keep track of state in local variables.
Instead, accumulate error status in chain->error and cluster->error.
Adjust cluster->error based on focus. Code does not yet check this field.
* Do not NULL-out cluster array entries on I/O errors or if unavailable.
Leave the chain structure intact.
This makes the cluster's array-of-chains more deterministic and will
allow upcoming code to use errored chains as a placeholder for blocking
operations.
* When locking a cluster, attempt to select alternative masters or slaves
for our focus if the chain we would have otherwised used is errored.
* Add inlines to test whether a chain or cluster can be read or written
(writing still also requires calling *_modify()).
* Document leaving inode->pfs_nmasters set to 0 for new masters.
* Adjust hammer2 pfs-list to display whether a master is a normal
master or a snapshot.
Matthew Dillon [Mon, 30 Mar 2015 05:45:59 +0000 (22:45 -0700)]
hammer2 - Start work on quorum validation.
* Remove HAMMER2_PFSTYPE_SNAPSHOT, it adds unnecessary complication.
Just make snapshots HAMMER2_PFSTYPE_MASTER.
Add a subtype field to the inode and PFS ioctl to identify snapshots.
* Start fleshing out the quorum code. hammer2_chain_lock() is the core.
It will eventually also have to be async.
hammer2_chain_lock() now does hard quorum checks, soft master checks,
and identifies slaves and whether synchronization is needed, based on
mirror_tid.
* More cleanup of cluster->focus.
* When removing nodes from a PFS cluster, since the cluster is being
ripped apart and hammer2_inode_lock_ex() does quorum validation,
we cannot use this function. Just acquire and release the low-level
inode mutex instead.
Matthew Dillon [Mon, 30 Mar 2015 02:40:17 +0000 (19:40 -0700)]
hammer2 - Cleanup hammer2_cluster API
* Track whether a cluster structure is locked or not. For the upcoming
cluster locking code, cluster structures cannot be recursively locked
(though you can always make a copy and lock that).
* Move the ddflag (direct-data-in-inode) flag into the cluster structure
And remove it from a number of API calls.
* Add fields and flags in preparation for more formalized locking and
tracking of clusters.
* Refactor code to remove hammer2_cluster_replace() and
hammer2_cluster_replace_locked(). This involves changing
hammer2_hardlink_find() and a few other things.
* Refactor the cluster focus code. cluster->focus is only set and valid
when a cluster is locked. Do not set it as a side effect of other
operations.
* Refactor chain validation in hammer2_cluster_lookup() and add it to
hammer2_cluster_next().
* Add the concept of a read-only cluster lock which will allow upcoming
cluster locking code to reduce the number of chains that actually
get locked or undergo I/O.
* In strategy file writing code call hammer2_cluster_modify_ip()
only when the inode itself is being modified by the write() due
to being in OPFLAG_DIRECTDATA mode (when 512 bytes of data is embedded
in the inode).
Sascha Wildner [Sun, 29 Mar 2015 09:53:44 +0000 (11:53 +0200)]
mailer.conf: Fix some issues.
* dma(8) accepts being called as newaliases, causing it to parse the
aliases file, thereby checking its integrity, and erroring if
something is wrong, so allow it to do that. It also has code to
deal with being called as hoststat or purgestat, so allow that too.
* Use true(1)'s full path since /usr/bin isn't necessarily in the
path in all situations (such as when called from rc scripts).
Matthew Dillon [Sun, 29 Mar 2015 07:19:15 +0000 (00:19 -0700)]
hammer2 - Initial synchronization thread
* Add infrastructure for a per-PFS synchronization thread. This primary
thread will be responsible for background synchronization out-of-sync
masters, slaves, and other elements of a PFS. There will also be another
thread for background bulkfree and dedup operations.
In this commit, basic thread creation, destruction, freeze, and unfreeze.
(Freezing and remastering is required when new nodes are added to a PFS
or existing nodes are deleted).
* Define new cluster flags indicating the synchronization state.
* pfs-create and snapshot were not properly flagging the inode as being
a PFS, which confused the on-mount recovery scan code.
* Update TODO.
John Marino [Sun, 29 Mar 2015 00:15:07 +0000 (01:15 +0100)]
loader: set color option (blue) by default
On the loader screen, the blue version of Fred will now be shown by
default unless the serial console is selected ("comconsole" value for
"console" option in boot/loader.conf).
As part of the work:
* "loader_color" option removed
* "loader_plain" is a new option, to force Fred in monochrome
* "fred_is_blue" option (4.1 only) removed
* "fred_is_red" is a new option as the red scheme is now alternate
Users that had "loader_color" set on before will see Fred change color to
blue, thus they will need to set "fred_is_red=true" in /boot/loader.conf
to restore the loader as it was before. Users that don't like color will
have to explicitly set "loader_plain=true" to get rid of it.
This is a cosmetic change which hopefully makes DragonFly a tiny bit more
attractive to first time users.
Tomohiro Kusumi [Sat, 28 Mar 2015 19:01:26 +0000 (04:01 +0900)]
sbin/newfs_hammer: Properly allocate root inode and pfs from meta zone
- newfs_hammer writes initial two elements, root inode and pfs
directly from userspace (which is based on different code from
HAMMER's storage allocation code in kernel space), but it's
not using the right zone. It should be using META zone instead
of SMALL_DATA zone.
- This issue was found by zone checking added in commit
901e04c7.
- Bug #2807 acked by dillon
Tomohiro Kusumi [Sat, 28 Mar 2015 19:34:09 +0000 (04:34 +0900)]
sbin/hammer: Make hammer checkmap check zone
- Make use of unused layer2 track field track2->zone to check
layer2 entries' zone #.
- This ensures that all nodes/data/metadata are allocated from
a zone that is supposed to be used. If HAMMER happens to
allocate them from a zone that is not intended to be used for
that chunk of data, then this command will report inconsistency.
Tomohiro Kusumi [Thu, 26 Mar 2015 13:27:43 +0000 (22:27 +0900)]
sbin/hammer: Fix comments on supported checkmap zones
- btree nodes and undo fifo is supported in addition to data
after 6cf258d and d2bf3c3.
Tomohiro Kusumi [Thu, 26 Mar 2015 12:59:03 +0000 (21:59 +0900)]
sbin/hammer: Make rel_buffer() and rel_volume() check if arg is NULL
- Some of the existing code do "if (buf) { rel_buffer(buf); }",
but others just do "rel_buffer(buf);". Make code and things clear
by making these rel_buffer() and rel_volume() check if the pointer
is NULL.
Tomohiro Kusumi [Thu, 26 Mar 2015 12:46:26 +0000 (21:46 +0900)]
sbin/hammer: Remove duplicated header include
- <libhammer.h> is included by "hammer.h"
Tomohiro Kusumi [Thu, 26 Mar 2015 12:35:11 +0000 (21:35 +0900)]
lib/libhammer: Remove duplicated and unnecessary macro definitions
- All these macros are already defined in sbin/hammer/*.
- HAMMER_BUF* are macros internally used by hammer userspace
to manage hammer's 16KB buffers. Unless buffer management
code is migrated to libhammer, it doesn't make much sense
only to have these macros in library code.
- All the rest of the macros are locally defined and used by
hammer commands. No need to have them in header files.
Tomohiro Kusumi [Thu, 26 Mar 2015 12:14:24 +0000 (21:14 +0900)]
sbin/hammer: Fix width of hammer stats output
- Align output of hammer stats columns using %9jd instead of
either %9jd, %8jd or %5jd. This should be better than using
"flsh" and "cmmit" (for "flush" and "commit") to make them
fit within the space.
Matthew Dillon [Sat, 28 Mar 2015 22:15:14 +0000 (15:15 -0700)]
kernel - Bring in
dff23c692 from FreeBSD
Bring in a commit further strengthening iret/%gs handling. FreeBSD also
made a followup commit that fixes their signal handler for stack faults
which we already effectively implement and did not need.
Original commit message is
The #ss fault handler erronously does not check for the fault
originated from the return to usermode. #ss must be handled same as
#np.
Matthew Dillon [Sat, 28 Mar 2015 22:00:43 +0000 (15:00 -0700)]
kernel - Adjustments for CERT VU#711516
Note that IPV6 route advertisements are disabled by default, so these
adjustments have no real security implications if you haven't enabled
it. And, generally speaking, enabling IPV6 route advertisements is a
really bad idea anyway and these adjustments only address one small part
of the problem.
* Allowing RTR packets via net.inet6.ip6.accept_rtadv is not advised
even with this adjustment.
* Add a sysctl to put a lower limit on the IPV6 hop limit received via
RTR packets when allowed, default is 39. sysctl net.inet6.ip6.minhlim.
Matthew Dillon [Sat, 28 Mar 2015 05:51:17 +0000 (22:51 -0700)]
hammer2 - Starting refactoring PFS management in mount
* Start removing single-device shims.
* Adjust data structures. Rename hammer2_mount to hammer2_dev and
rename hammer2_pfsmount to hammer2_pfs. Refactor unmount.
* Integrate all available PFSs when a block device is mounted and
De-integrate related PFSs when a block device is unmounted.
At least one PFS (typically @LOCAL) must be mounted from a HAMMER2 block
device for that device's PFSs to be used. At least for now. We could
eventually trigger auto-mounting via the probe code.
* Add a synchronization thread abstraction for a PFS.
* Normalize chain->pmp to NULL for any chain which is part of the super-root
topology, for later sanity assertions.
* The ioctl to create a PFS now adds it (delete and snapshot do not, yet).
Matthew Dillon [Fri, 27 Mar 2015 15:48:47 +0000 (08:48 -0700)]
hammer2 - cleanup, add manual page
* Add an initial manual page for hammer2(8). Note that a multitude of
features being described have not yet been implemented.
* Add a DUMMY PFS type.
* Cleanup some edge cases.
Sepherosa Ziehau [Thu, 26 Mar 2015 13:51:13 +0000 (21:51 +0800)]
sensor: Save OID of sensordev sysctl tree.
And allow sensordev sysctl tree registration to fail instead of panic,
e.g. upon duplicated sensordevs.
Sepherosa Ziehau [Thu, 26 Mar 2015 13:50:31 +0000 (21:50 +0800)]
sensor: Use sysctl lock
Original devlist lock is not MPSAFE (it's locked find then unlocked
used). Since sensors are sysctl centric, we could just use sysctl
lock here.
Matthew Dillon [Fri, 27 Mar 2015 03:05:51 +0000 (20:05 -0700)]
dmsg - refactor cluster and pfs identifiers
Cleanup loose ends in the CONN/SPAN messages that prior work has exposed.
DMSG now uses LNK_SPAN exclusively in its graph algorithms, so LNK_CONN
has a different meaning than it used to.
* Change the way cl_id and fs_id work. Rename cl_id and most cluster fields
as 'peer' identification fields.
Reduce complexity and confusion by removing pfs_type and pfs_fsid from
LNK_CONN. Also remove pfs_mask and fs_label. Change cl_label to
peer_label. peer_label is now always a human-readonable string identifier
for the socket connection and no longer performs any connection filtering.
This allows it to be passed in LNK_SPANs to make the trees more
human-readable when dumped.
* A LNK_CONN identifies the peer and not necessarily any particular cluster.
Note that the peer_id in a LNK_CONN is a filter request, not an
advertisement.
* Make peer_label more meaningful by incorporating the hostname (needs more
work).
* Rename filesystem identifiers as 'pfs' identifiers. A LNK_SPAN identifies
a particular PFS. Note that the peer_id in a LNK_SPAN is part of the PFS
{ cluster_id, pfs_id } advertisement.
* Pad some in-memory structures for natural alignment (it's a general rule
for all hammer2 structures, even in-memory structures when appropriate).
John Marino [Thu, 26 Mar 2015 09:00:20 +0000 (10:00 +0100)]
bmake: Fix clobber error, raise WARNS back to 4
Matthew Dillon [Thu, 26 Mar 2015 07:48:14 +0000 (00:48 -0700)]
kernel - Fix panic in broken chroot case
* If a chroot is broken (e.g. by some process outside the chroot renaming
a parent directory from inside to outside the chroot), and a process
within the chroot attempts to '..' past the real root, the system will
panic on an assertion. Add a check to detect this case and not panic.
* This patch does not detect other chroot break-out cases.
Reported-by: Balazs Bucsay
Sascha Wildner [Tue, 24 Mar 2015 17:25:05 +0000 (18:25 +0100)]
Sync zoneinfo database with tzdata2015b from ftp://ftp.iana.org/tz/releases
Changes affecting future time stamps
* Mongolia will start observing DST again this year, from the last Saturday
in March at 02:00 to the last Saturday in September at 00:00.
(Thanks to Ganbold Tsagaankhuu.)
* Palestine will start DST on March 28, not March 27. Also,
correct the fall 2014 transition from September 26 to October 24.
Adjust future predictions accordingly. (Thanks to Steffen Thorsen.)
Changes affecting past time stamps
* The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
regression. (Thanks to Stuart Bishop for reporting the problem.)
* Some more zones have been turned into links, when they differed
from existing zones only for older time stamps. As usual,
these changes affect UTC offsets in pre-1970 time stamps only.
The affected zones are: America/Antigua, America/Cayman,
Pacific/Midway, and Pacific/Saipan.
Changes affecting time zone abbreviations
* Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
(Thanks to Hank W.)
Changes affecting commentary
* Cite the recent Mexican decree changing Quintana Roo's time zone.
(Thanks to Carlos Raúl Perasso.)
* Likewise for the recent Chilean decree. (Thanks to Eduardo Romero Urra.)
* Update info about Mars time.
Tomohiro Kusumi [Tue, 24 Mar 2015 11:18:05 +0000 (20:18 +0900)]
sys/vfs/hammer: Fix comment on leaf node elements
- This seems to be an obsolete comment from
47197d71.
There is nothing special about leaf elements now.
Tomohiro Kusumi [Tue, 24 Mar 2015 11:14:35 +0000 (20:14 +0900)]
sys/vfs/hammer: Make use of btree_max_elements()
- Implement btree_node_is_full() using btree_max_elements()
which had been #if0'd at right below this function.
John Marino [Tue, 24 Mar 2015 12:41:41 +0000 (13:41 +0100)]
bmake(1): lower WARNS from 4 to 2
The latest bmake will not build with gcc50 with WARNS of 4:
--- main.o ---
/usr/src/usr.bin/bmake/../../contrib/bmake/main.c: In function 'Cmd_Exec':
/usr/src/usr.bin/bmake/../../contrib/bmake/main.c:1527:10: error: variable
'savederr' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
int savederr; /* saved errno */
Sepherosa Ziehau [Mon, 23 Mar 2015 13:39:34 +0000 (21:39 +0800)]
sensor: sensor_task_schedule() should always be locked
Sepherosa Ziehau [Mon, 23 Mar 2015 12:07:36 +0000 (20:07 +0800)]
sysctl: Expose sysctl lock
It will also be used by sysctl centric module like sensor.
Matthew Dillon [Tue, 24 Mar 2015 01:29:05 +0000 (18:29 -0700)]
hammer2 - Cluster API cleanup
* Simplify hammer2_cluster_copy() to reduce ref count confusion. It now
always refs the underlying chains and the cluster. The follow-up
hammer2_cluster_lock() op can then be called with HAMMER2_RESOLVE_NOREF
to avoid double-refs on the cluster and its underlying chains.
* Simplify hammer2_inode_lock_ex() and hammer2_inode_lock_sh(). These
functions now use hammer2_cluster_lock() instead of rolling their own.
* Focus is now never set until a cluster is locked. However, continue
to cache a default focus in the hammer2_inode's embedded cluster.
* Remove some dead code.
Sascha Wildner [Mon, 23 Mar 2015 21:50:05 +0000 (22:50 +0100)]
kernel: Adjust netgraph7 for the mtx_init() change.
Sascha Wildner [Mon, 23 Mar 2015 20:31:13 +0000 (21:31 +0100)]
make upgrade: Adjust the files to be removed without WANT_INSTALLER.
We create /usr/share/installer unconditionally via mtree(8) so we can
only remove the files in it.
Sascha Wildner [Mon, 23 Mar 2015 20:27:21 +0000 (21:27 +0100)]
mount_psshfs.8: Fix typo.
Sascha Wildner [Mon, 23 Mar 2015 20:09:09 +0000 (21:09 +0100)]
ln(1): Sync up with FreeBSD.
* Adds POSIX.1-2008's -L (hardlinks to symbolic links link to the
symlink target, which stays our default) and -P (hardlinks to
symbolic links link to the symlink itself) options.
* Adds -F (if the target is a directory, remove it to make the link
happen) and -w (warns if the source of a symlink does not exist)
options.
* Some bug fixes I guess. :)
* It also improves the checks for identical files. Our former checks
were producing kind of confusing results in conjunction with
'install -C' (i.e., for libraries and includes, if LINKS is used
from the Makefile) upon repeated installation.
Reported-by: marino
Sascha Wildner [Mon, 23 Mar 2015 16:32:15 +0000 (17:32 +0100)]
kernel/acpi: Only check against ACPI 1.0's FADT size as a minimum.
Hyper-V's FADT for example is only 129 bytes long.
Discussed-with: sephe
John Marino [Mon, 23 Mar 2015 13:39:27 +0000 (14:39 +0100)]
libstand: Rework makefile to avoid repeated building
The change to use i386 headers for x86_64 was like a sledgehammer.
From my investigation, "cpu" is not needed at all, and only four headers
are needed from "machine". The "cpu" directory is still created so that
if some attempt to "#include <cpu/xxx>" is made, it will fail.
By adding exact header dependencies, we prevent libstand from building
over and over again in quickworld.
John Marino [Mon, 23 Mar 2015 11:02:51 +0000 (12:02 +0100)]
gdb(1), kgdb(1): Rework makefile to prevent repeated rebuilding
The beforedepends target was done in such a way that caused gdb and
kgdb to rebuild with every quickworld. This commit rearranges things
so that doesn't happen anymore.
John Marino [Mon, 23 Mar 2015 08:32:54 +0000 (09:32 +0100)]
gcc50: Switch final specs to set DT_RUNPATH tag
The system dynamic binaries have always been built with DT_RPATH set
by the linker. A few years ago the dynamic linker gained DT_RUNPATH
capability but it hasn't been used in base.
How it works is that when the linker is given the -rpath switch, it
will always set DT_RPATH, but if the --enable-new-dtags switch is present,
the linker will also set DT_RUNPATH tag. The dynamic linker reacts
differently when DT_RUNPATH is present; it will check LD_LIBRARY_PATH
before the rpath in that case.
This change (to gcc50 only) builds the system with the -rpath flag alone
by for the ctools compiler, but the final compiler's specs include the
--enable-new-dtags switch as well, which affects the building of ports and
all non-system use of the compiler.
Matthew Dillon [Mon, 23 Mar 2015 05:11:44 +0000 (22:11 -0700)]
hammer2 - structuralize the cluster's chain array
* Structuralize hammer2_cluster's chain array, implementing a new
sub-structure called hammer2_cluster_item.
This structure represents one of N elements in a cluster node representing
the same location at each target. It will also be used to track cache
coherency state, async locks, and other things.
Matthew Dillon [Mon, 23 Mar 2015 04:54:32 +0000 (21:54 -0700)]
hammer2 - locking revamp (2)
* Update mutex lock calls to not pass the ident.
Matthew Dillon [Mon, 23 Mar 2015 03:26:08 +0000 (20:26 -0700)]
hammer2 - locking revamp
* Temporarily remove hammer2_ccms.c from the build and remove the ccms
container. The CCMS container will be used again when we get cache
coherent in, but for now it isn't needed.
* Replace the ccms state lock with a mtx lock and move
into hammer2_chain_core.
Note that the mtx lock being used here has abort and async locking
support and these features will be required by HAMMER2.
* Replace the ccms spin lock with a normal spin lock and move
into hammer2_chain_core.
* Refactor the OS locking interface to use hammer2_* prefixes for easier
porting.
* Use a shared spin lock for the ONFLUSH bit update instead of an exclusive
spin lock.
Matthew Dillon [Mon, 23 Mar 2015 03:23:52 +0000 (20:23 -0700)]
kernel - Major mtx lock cleanup
* Integrate the ident into the mtx structure, remove the ident parameter from
all locking calls.
* Rename some of the functions, shortening them.
* Add a few new functions which hammer2 will use.
Sepherosa Ziehau [Sun, 22 Mar 2015 12:52:35 +0000 (20:52 +0800)]
sensor: Allocate task w/ M_WAITOK
And now sensor_task_register() will not fail.
Sepherosa Ziehau [Sun, 22 Mar 2015 12:32:56 +0000 (20:32 +0800)]
sensor: Create task thread through SYSINIT
Sepherosa Ziehau [Sat, 21 Mar 2015 14:26:22 +0000 (22:26 +0800)]
sensor: Function renaming and remove unnecessary comment.
Sepherosa Ziehau [Sat, 21 Mar 2015 14:25:53 +0000 (22:25 +0800)]
sensor: Remove the NOSYSCTL8HACK ifndef test
NOSYSCTL8HACK is always not defined on DragonFly.
Sepherosa Ziehau [Sat, 21 Mar 2015 14:25:26 +0000 (22:25 +0800)]
sensor: Staticize internal global variables
Sepherosa Ziehau [Sat, 21 Mar 2015 14:24:56 +0000 (22:24 +0800)]
sensor: volatile is unnecessary for running
This fields are changed/checked w/ lock held.
Sepherosa Ziehau [Sat, 21 Mar 2015 14:24:07 +0000 (22:24 +0800)]
sensors: Staticize internal functions
Sepherosa Ziehau [Sat, 21 Mar 2015 14:23:42 +0000 (22:23 +0800)]
sensor: Utilize LOCK_INITIALIZER
The cmpset for lock initialization is _not_ safe (it requires at least
3 states and a spin loop, which is obviously an overkill when compared
w/ LOCK_INITIALIZER).
Sepherosa Ziehau [Sat, 21 Mar 2015 14:23:15 +0000 (22:23 +0800)]
lock: Add LOCK_INITIALIZER
John Marino [Sun, 22 Mar 2015 19:13:59 +0000 (20:13 +0100)]
gcc50: Update to 22 Mar 2015 snapshot (SVN 221572)
John Marino [Sun, 22 Mar 2015 20:53:42 +0000 (21:53 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Sun, 22 Mar 2015 19:00:55 +0000 (20:00 +0100)]
bmake(1): complete update to version
20141111
The local modification to job.c was returned, but it may no longer be
necessary. Until that's determined, leave the current behavior in place
though.
John Marino [Sun, 22 Mar 2015 20:53:06 +0000 (21:53 +0100)]
Merge branch 'vendor/BMAKE'
John Marino [Sun, 22 Mar 2015 18:35:10 +0000 (19:35 +0100)]
make(1): Remove local mods to parse.c and job.c
This is in preparation for an upgrade to bmake.
The modification to job.c will return after the merge.
The modification to parse.c has been incorporated upstream
John Marino [Sun, 22 Mar 2015 19:10:23 +0000 (20:10 +0100)]
Update gcc-50 to SVN version 221572
Last Changed Date: 2015-03-22 19:42:52 +0100 (Sun, 22 Mar 2015)
John Marino [Sun, 22 Mar 2015 18:39:45 +0000 (19:39 +0100)]
Update to bmake-
20141111 on the vendor branch
Tomohiro Kusumi [Sat, 21 Mar 2015 15:58:50 +0000 (00:58 +0900)]
sbin/hammer: Expand hammer show directive to lo:objid:rectype:key:tid
- Make hammer show command take rectype:key:tid as an optional part
of the search directive in addition to the existing part lo:objid.
- Unspecified fields are handled as wildcard.
- rectype:key:tid all have lower priority than existing lo:objid
(in actual filesystem's btree implementation) so these new fields
give hammer show command extra conditions on btree search given
that higher priority fields lo:objid do match.
Sascha Wildner [Sun, 22 Mar 2015 01:21:12 +0000 (02:21 +0100)]
kernel/iwn: Properly build 3 missing firmwares (100, 105, 135).
Sascha Wildner [Sun, 22 Mar 2015 00:35:03 +0000 (01:35 +0100)]
Add sa_family_t definitions to <netinet/in.h> and <sys/un.h> too.
As required by POSIX.
Also use sa_family_t in structs sockaddr_un, sockaddr_in and
sockaddr_in6.
Sascha Wildner [Sun, 22 Mar 2015 00:15:16 +0000 (01:15 +0100)]
kernel/acpi: Use ACPI_FULL_INITIALIZATION (no functional change).
François Tigeot [Sat, 21 Mar 2015 21:09:37 +0000 (22:09 +0100)]
drm/i915: Sync i915_gem_phys_pwrite() with Linux 3.11
François Tigeot [Sat, 21 Mar 2015 16:03:03 +0000 (17:03 +0100)]
drm/i915: Sync i915_gem_object_put_pages_gtt() with Linux 3.11
François Tigeot [Sat, 21 Mar 2015 15:52:02 +0000 (16:52 +0100)]
drm: Implement set_page_dirty()
Tomohiro Kusumi [Sat, 21 Mar 2015 13:11:33 +0000 (22:11 +0900)]
sbin/hammer: Add filter mode when lo:objid directive is used
- This commit is expansion to the commit
e7f926a5 and
edcc8136.
These commits make hammer show command search and print btree
elements that match lo:objid using '*' mark, but go back to
normal iteration once it hits matched elements. This commit
gives options to the way it filters unmatched elements.
- Using the arg "filter" after the directive makes it continue
filtering without going back to normal iteration. This makes
it only show nodes that have matched elements.
- Using the arg "nofilter" after the directive makes it not to
filter from the beginning (same as when lo:objid directive is
not specified except that this does print '*' for those that
match lo:objid).
- Not specifying any arg after the directive works the same as
it did before.
François Tigeot [Sat, 21 Mar 2015 10:39:46 +0000 (11:39 +0100)]
drm/i915: Sync i915_gem_shmem_pread() with Linux 3.11
François Tigeot [Sat, 21 Mar 2015 09:56:31 +0000 (10:56 +0100)]
drm: Add linux/swap.h
Sepherosa Ziehau [Fri, 20 Mar 2015 14:23:00 +0000 (22:23 +0800)]
sensor: Minor white space and style cleanup
Tomohiro Kusumi [Fri, 20 Mar 2015 13:09:51 +0000 (22:09 +0900)]
sbin/hammer: Make hammer show properly print '*' for elements that match directive
- hammer show command (running with lo:objid directive specified)
goes back to normal iteration once it matches the directive as
explained in
e7f926a5, however it should not do 'search = NULL;'.
This commit adds a field btree_search::normal to do it right.
- The problem with 'search = NULL;' is that when there are many files
in a directory (e.g. dragonfly bsd source), different leaf nodes
of the same depth could happen to have inodes and dirents with the
same lo:objid. In this case it prints '*' only for matched records
located under the first leaf node because by the time it comes to
the second leaf node the pointer has been set to NULL and
NULL won't print '*' (see line 169 and 174 of cmd_show.c).
- In the following example it is expected that both leaf node 29
and 30 print '*' for its records that match
00000001:
00000001036af6f7,
but the result is it only prints for those under leaf node 29.
This commit does that right.
show
800000005b14d000 lo
00000001 obj_id
00000001036af6f7 depth 0
<snip>
NODE
800000005b04e000 cnt=37 p=
800000005b14e000 type=I depth=2 mirror
00000001040192b0 fill=z8:182=92% {
G------ ELM 0 L lo=
00000001 obj=
000000010354f711 rt=01 key=
0000000000000000 ot=00
<snip>
G------ ELM 29 L lo=
00000001 obj=
00000001036af6e9 rt=01 key=
0000000000000000 ot=00
tids
0000000104018910:
0000000000000000 suboff=
8000000020fb1000 mirror
0000000104018a50 *
G------ ELM 30 L lo=
00000001 obj=
00000001036af6f7 rt=11 key=
66ea1f6ab72c0000 ot=00
tids
0000000104018a50:
0000000000000000 suboff=
800000005b079000 mirror
0000000104018a50 *
Tomohiro Kusumi [Thu, 19 Mar 2015 14:58:04 +0000 (23:58 +0900)]
sbin/hammer: Add missing free(3)
- Free results of strdup(3) and getdevpath(3).
Sascha Wildner [Fri, 20 Mar 2015 11:01:18 +0000 (12:01 +0100)]
etc/sendmail: Fix installation of the /etc/mail/Makefile.
The way this was done led to problems when doing 'make install' and
'make clean' from etc/mail. The generated Makefile would overwrite
the shipped Makefile (upon install) or the shipped Makefile would
delete itself (upon clean).
Use FILESNAME_... which is meant for this kind of stuff.
Reported-by: tkusumi
Sascha Wildner [Fri, 20 Mar 2015 10:46:22 +0000 (11:46 +0100)]
<sys/unistd.h>: Use __BSD_VISIBLE instead of !_POSIX_SOURCE.
Sascha Wildner [Thu, 19 Mar 2015 19:18:41 +0000 (20:18 +0100)]
openssl: In the README.DRAGONFLY, note that the date needs updating too.
Sascha Wildner [Thu, 19 Mar 2015 19:18:10 +0000 (20:18 +0100)]
openssl: Adjust manual pages for 1.0.1m.
Sascha Wildner [Thu, 19 Mar 2015 20:06:51 +0000 (21:06 +0100)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Thu, 19 Mar 2015 20:01:12 +0000 (21:01 +0100)]
Import OpenSSL 1.0.1m.
Fixes CVE-2015-0286, CVE-2015-0287, CVE-2015-0289, CVE-2015-0293,
CVE-2015-0209, and CVE-2015-0288.
Sascha Wildner [Thu, 19 Mar 2015 11:40:09 +0000 (12:40 +0100)]
<stdio.h>: Adjust comment about UT_NAMESIZE.
Sascha Wildner [Thu, 19 Mar 2015 11:35:20 +0000 (12:35 +0100)]
repquota(8): Use MAXLOGNAME instead of UT_NAMESIZE.
Sascha Wildner [Thu, 19 Mar 2015 11:34:38 +0000 (12:34 +0100)]
atrun(8): Use MAXLOGNAME instead of UT_NAMESIZE.
Sascha Wildner [Thu, 19 Mar 2015 11:33:49 +0000 (12:33 +0100)]
libposix1e: Use MAXLOGNAME instead of UT_NAMESIZE.
Sascha Wildner [Thu, 19 Mar 2015 11:15:57 +0000 (12:15 +0100)]
mutex.9: Adjust a bit to current source.
John Marino [Thu, 19 Mar 2015 08:54:30 +0000 (01:54 -0700)]
gcc50: Fix parallel build issue with libstdc++
The "beforedepends" target apparently is not serial. I found out that
a header got copied into bits directory before bits directory was created.
This modification should prevent that in the future.
Sascha Wildner [Wed, 18 Mar 2015 18:32:04 +0000 (19:32 +0100)]
libc/realpath: Better POSIX conformance regarding ENOENT and ENOTDIR.
This fixes the "Test keywords with arguments" test of pkg(8), too.
Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
Fix-pointed-out-by: bapt@freebsd
Taken-from: FreeBSD
Tomohiro Kusumi [Wed, 18 Mar 2015 16:05:40 +0000 (01:05 +0900)]
sbin/hammer: Fix assertion to accept undo zone
- hammer checkmap now supports undo zone after
d2bf3c30 so this
assertion needs to accept undo zone, although nothing changes
since AssertOnFailure is set to 0 by default for this command
for now.
Tomohiro Kusumi [Wed, 18 Mar 2015 15:45:46 +0000 (00:45 +0900)]
sbin/hammer: Implement checkmap collects using rbtree
- Replace hash table for collects using rbtree.
- Using hash table can't dump collects' -v info in the right order
since hash index value and collect entries linked to hash table
entries do not reflect collect::phys_offset value.
- If the amount of filesystem data is less than approximately 4TB
nothing will change because there is only one collect entry,
which makes no difference whether the data structure is rbtree
or hash table.
Tomohiro Kusumi [Wed, 18 Mar 2015 15:45:06 +0000 (00:45 +0900)]
sbin/hammer: Add some comments
- Add some comments on hammer checkmap's collects data structure.
Tomohiro Kusumi [Wed, 18 Mar 2015 15:44:22 +0000 (00:44 +0900)]
sbin/hammer: Add assertions
- Add assertions for invalid node type and undo header type.
Sepherosa Ziehau [Tue, 17 Mar 2015 11:58:47 +0000 (19:58 +0800)]
x86_64: Take advantage of ACPI/CPU specific C-state mapping
If BIOS maps shallow ACPI C-state (<C3) to deep CPU specific C-state
(>=C3), it implies no bus mastering operations are needed before
entering deep CPU specific C-states.
Sepherosa Ziehau [Mon, 16 Mar 2015 14:37:32 +0000 (22:37 +0800)]
Revert "acpi/cstate: Detect and fix duplicated C-states"
This reverts commit
4221f7280cb32cbd2292001d52653e01a71872c9.
Looks like it is intentional to avoid bus mastering register
accessing, cache flush, and changing interrupt timer, which
is required for C3.
Sepherosa Ziehau [Mon, 16 Mar 2015 14:23:06 +0000 (22:23 +0800)]
acpi/cstate: Match C-states of the hyperthreads on the same core
Some stupid BIOSes set different C-states for hyperthreads on the same
core, which prevents the core from entering deep C-states, since not
all hyperthreads of the core are in the deep C-states.
We fix this by using same number of C-states for hyperthreads on the
same core; the hyperthread w/ more C-states is taken as master.
Sepherosa Ziehau [Mon, 16 Mar 2015 13:22:31 +0000 (21:22 +0800)]
ip: Don't generate IP ID for DF IP datagrams (part of RFC6864)
Sascha Wildner [Tue, 17 Mar 2015 22:33:14 +0000 (23:33 +0100)]
kernel/acpi: Reduce code duplication with ACPICA (second attempt).
Use the types which the ACPICA framework provides whereever possible in
our acpi_fadt and acpi_madt code. Since we do not use any actual ACPICA
functions here, this is no problem even for code which (so far) runs
before ACPICA is initialized.
Compared to the previous attempt which I pushed (and reverted again)
this commit has the following additional fixes:
* Compare the FADT length to the length of the ACPI 2.0 (up to 4.0)
version of the table (which is 24 bytes shorter than the ACPI 5.0
version).
* Doesn't shift again an already shifted value.
Discussed-with-and-approved-by: sephe
Tested-by: Robin Hahling <robin.hahling@gw-computing.net>
Robin Hahling [Tue, 17 Mar 2015 07:40:27 +0000 (08:40 +0100)]
clock_gettime.2: Update and document various clock_ids.
* clock_id may take many more values than what was previously
suggested.
* Document some clock_ids that take advantage of upmap/kpmap in case
of many repetitive calls.
* Inform about some clock_ids that are FreeBSD extensions.
Sascha Wildner [Tue, 17 Mar 2015 19:51:33 +0000 (20:51 +0100)]
<utmpx.h>: Mark RUN_LVL as being non POSIX.
Tomohiro Kusumi [Tue, 17 Mar 2015 16:16:30 +0000 (01:16 +0900)]
sbin/hammer: Make some checkmap functions inline
- Make collect_xxx functions inline.