John Marino [Fri, 17 Apr 2015 10:57:20 +0000 (12:57 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Fri, 17 Apr 2015 07:45:38 +0000 (09:45 +0200)]
Update gcc-50 to SVN version 222168 (gcc-5-branch)
Last Changed Date: 2015-04-17 09:45:46 +0200 (Fri, 17 Apr 2015)
Matthew Dillon [Thu, 16 Apr 2015 16:39:01 +0000 (09:39 -0700)]
sysperf - Adjust syscall tests
* Remove getuid_msg.c, no longer used.
* Adjust syscall1.c to be more verbose.
* Refactor syscall2.c to test on all threads in a somewhat more
sophisticated manner. The test expects the scheduler to move
the threads to their own cpus (and it should).
Matthew Dillon [Thu, 16 Apr 2015 16:20:54 +0000 (09:20 -0700)]
sound - Fix default & unit specs for /dev/dsp and /dev/mixer
* /dev/dsp{0,1} was overriding the unit number and forcing the currently
set default dsp unit, so it didn't matter if you specified /dev/dsp0 or 1,
it still used hw.snd.default_unit.
* Get rid of the devfs aliasing for /dev/dsp and /dev/mixer. Instead, use
the cloner code to lookup the default dsp and default mixer when /dev/dsp
or /dev/mixer is opened.
This simplifies default handling significantly.
Sascha Wildner [Wed, 15 Apr 2015 09:07:46 +0000 (11:07 +0200)]
Update the pciconf(8) database.
April 14, 2015 snapshot from http://pciids.sourceforge.net/
François Tigeot [Mon, 13 Apr 2015 21:32:36 +0000 (22:32 +0100)]
drm: linux/spin.h: Implement assert_spin_locked()
Sepherosa Ziehau [Fri, 10 Apr 2015 13:48:35 +0000 (21:48 +0800)]
coretemp: Add package level thermal sensor support
The temperature extracted from CPU package level thermal sensors are
exposed through sensor sysctl hw.sensors.cpu_nodeX.temp0 nodes.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:18 +0000 (05:32 +0900)]
sbin/hammer: Allow pfs commands directly handle pfs
- pfs commands can handle a link to pfs, but not the pfs itself.
This commit allows pfs commands to directly handle pfs node,
in addition to doing it via link. Being able to execute them
only via link is strange behavior and should be able to do via
both ways.
- This commit basically makes both link and non-link path go through
scanpfsid() which scans pfs id and returns fd of its parent dir.
In the existing code only link path goes through pfs id scan code,
so pfs commands are unable to directly handle non-link pfs node
itself (even if one wants to do so).
==========
example1 - using existing /sbin/hammer
# ls -l ./test1
lrwxr-xr-x 1 root wheel 10 Apr 8 05:52 ./test1 -> @@-1:00001
# hammer pfs-downgrade @@-1:00001
pfs-downgrade of PFS#1 () failed: Directory not empty
# hammer pfs-destroy ./@@-1:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
==========
example2 - using this commit to directly destroy pfs
# hammer pfs-destroy ./@@-1:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
# hammer pfs-status ./test1
Cannot access PFS ./test1: No such file or directory
The only case that breaks current behavior is when there is a
regular directory whose format matches (not existing) pfs name,
although this is not likely to happen in the real world. This
is inevitable since stat(2) also recognizes pfs as a directory
(also see hammer_mkroot_pseudofs()).
# mkdir ./@@-1:00005
# hammer pfs-status ./@@-1:00005
Cannot access PFS ./@@-1:00005: No such file or directory
==========
example3 - another example using this commit.
Actually location of the pfs link doesn't matter as the pfs node
represents the root inode of pfs, but not a subdirectory of where
the pfs link is made in the root filesystem. This is confusing
though when there are more than 1 HAMMER filesystems in a single
system as "@@-1:00001" could indicate different pfs-es depending
on where/how commands are executed. Having access to pfs-es via
symlinks (created by pfs-master|slave) is usually a clearer way.
# mkdir -p a/b/c/d/e
# cd a/b/c/d/e
# hammer pfs-master test2 > /dev/null
# ls -l ./test2
lrwxr-xr-x 1 root wheel 10 Apr 10 04:12 ./test2 -> @@-1:00001
# cd ../../../../..
# hammer pfs-destroy @@-1:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
# hammer pfs-slave test3 > /dev/null
# ls -l ./test3
lrwxr-xr-x 1 root wheel 10 Apr 12 16:30 ./test3 -> @@0x0000000000000001:00001
# hammer pfs-destroy a/b/c/d/e/@@0x0000000000000001:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
Tomohiro Kusumi [Fri, 10 Apr 2015 20:40:07 +0000 (05:40 +0900)]
sbin/hammer: Remove strtrl()
- (see previous 3 commits)
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:18 +0000 (05:32 +0900)]
sbin/hammer: Make strtrl() api right [3/3]
- Fix changes made by commit
3c10747d.
- while (p-- > s && *p == '/')
is very obscure and not even sure if this code is portable.
Make it explicit.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:18 +0000 (05:32 +0900)]
sbin/hammer: Make strtrl() api right [2/3]
- Fix changes made by commit
3c10747d.
- Not sure what the return value of strtrl() is trying to do, but
checking ==NULL here doesn't mean anything unless 'path' is NULL.
(The only case that had meaning was when 'path' was NULL, but
it's pretty obvious callers were not passing NULL)
- Change strnlen() to strlen(). It's better to use strlen() when
we know the input (argv[i]) is a C string. Also note that in
this case non NULL terminated char[] of length 'size_t maxlen'
is useless and does no good anyway.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:17 +0000 (05:32 +0900)]
sbin/hammer: Make strtrl() api right [1/3]
- Fix changes made by commit
3c10747d.
- There shouldn't be any reason to take char** for the first arg,
but char* is enough.
- The second arg len can be calculated inside the function given
that the 'path' is a C string.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:17 +0000 (05:32 +0900)]
sbin/hammer: Remove redundant printf for slave pfs info
- hammer pfs-status does show "operating as a SLAVE" if the pfs
is a slave, so no need to print another line that shows the
same thing. Also removing this line doesn't seem to break any
existing userspace.
Nuno Antunes [Sun, 12 Apr 2015 08:47:56 +0000 (09:47 +0100)]
virtio: Bring in SVN r251769 from FreeBSD.
* Fixes the following occasional log message when booting:
"vtnet0: error setting host MAC filter table"
* Original FreeBSD commit message below.
QEMU 1.4 made the descriptor requirement stricter - the size of buffer
descriptor must exactly match the number of MAC addresses provided.
Reported-by: nans_nans1@yahoo.de
Fix-pointed-out-by: Brian Venteicher <bryanv@daemoninthecloset.org>
Sascha Wildner [Sun, 12 Apr 2015 08:35:39 +0000 (10:35 +0200)]
kernel: APM was only supported on i386, remove unused x86_64 files.
This is due to our x86_64 not supporting VM86 BIOS calls. This
code was never hooked in.
This does not affect ACPI's APM "emulation" (it supports some
APM ioctls) which is available on x86_64 too.
Sascha Wildner [Sat, 11 Apr 2015 10:26:08 +0000 (12:26 +0200)]
Sync the de(4) manual page with FreeBSD.
Imre Vadasz [Sat, 11 Apr 2015 11:53:55 +0000 (13:53 +0200)]
if_de: Sync with current FreeBSD version (r271849). Now works with >4G ram.
* if_de now uses the bus_dma api for DMA memory handling. This makes the
driver work on systems with more than 4G of ram.
* Remove currently unused code for the TULIP_DO_GPR_SENSE option.
* Keeps most original modifications relative to the code from FreeBSD.
Sascha Wildner [Fri, 10 Apr 2015 21:49:40 +0000 (23:49 +0200)]
acpidump(8): Fix /dev/mem access.
I accidentally removed it in the ACPICA
20150408 upgrade.
Sascha Wildner [Thu, 9 Apr 2015 22:53:26 +0000 (00:53 +0200)]
boot/acpi: Use ACPICA constants instead of magic addresses.
While here, also adjust a comment to match the latest ACPI specification.
No functional change.
Sascha Wildner [Fri, 10 Apr 2015 17:31:29 +0000 (19:31 +0200)]
Sync ACPICA with Intel's version
20150410.
The only difference to
20150408 is reverting a change that caused
regressions in the disassembler.
Sascha Wildner [Fri, 10 Apr 2015 14:41:47 +0000 (16:41 +0200)]
kernel: Fix two typos.
Sascha Wildner [Fri, 10 Apr 2015 12:28:03 +0000 (14:28 +0200)]
mutex.9: Adjust for latest changes (ident was moved to mtx_init()).
Sascha Wildner [Fri, 10 Apr 2015 12:04:02 +0000 (14:04 +0200)]
sensor_attach.9: sensor_task_register() no longer can return failure.
Sepherosa Ziehau [Fri, 10 Apr 2015 03:53:58 +0000 (11:53 +0800)]
coretemp: CORE_LEVEL node contains 0 children, if hyperthread is not enabled
Reported-by: YRabbit
Sascha Wildner [Thu, 9 Apr 2015 20:38:13 +0000 (22:38 +0200)]
ACPICA: Remove no longer needed file.
Markus Pfeiffer [Thu, 9 Apr 2015 20:09:22 +0000 (20:09 +0000)]
usb4bsd: Use ifq_set_oactive, update stat counters
* We now use ifq_set_oactive and ifq_clr_oactive on if_urndis
* Also while we are here replace increments of counters
by use of IFNET_STAT_INC macros
Markus Pfeiffer [Thu, 9 Apr 2015 19:50:39 +0000 (19:50 +0000)]
usb4bsd: Do not start when output is active
Sascha Wildner [Thu, 9 Apr 2015 20:01:36 +0000 (22:01 +0200)]
Sync ACPICA with Intel's version
20150408.
General changes:
* First part of upstream DragonFly support. acdragonfly.h and
acdragonflyex.h are now in the upstream repo. Various needed
patches to hook them in should be in the next Intel release.
* _REV now permanently returns 2 (as in other ACPI implementations).
* Windows 2015 (aka Windows 10) _OSI string added.
* Various printf issue fixes.
iasl(8) specific changes:
* Constant folding enhanced.
* SLIC table support updated according to Microsoft's latest spec. It
dumps as hex data block now (proprietary data).
This issue was actually found by our sephe on his Compaq CQ45.
* MSDM table support added (handled as proprietary data, just like SLIC).
* -Pn option implemented for the table compiler (was only implemented
for the ASL compiler).
* Better data table disassembly comments.
* -df option to force the disassembler to assume the table contains AML.
* Some fixes in the EFI version of the tools.
* Small miscellaneous fixes.
For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.
Sascha Wildner [Thu, 9 Apr 2015 19:58:22 +0000 (21:58 +0200)]
mtree: Stop creating /usr/share/info.
Sascha Wildner [Thu, 9 Apr 2015 19:57:56 +0000 (21:57 +0200)]
Actually remove all share/info traces.
Sascha Wildner [Thu, 9 Apr 2015 19:57:27 +0000 (21:57 +0200)]
Clean up no longer used NOINFO and NOINFOCOMPRESS make.conf variables.
Sascha Wildner [Thu, 9 Apr 2015 19:56:47 +0000 (21:56 +0200)]
Remove some more old files via 'make upgrade'.
Sascha Wildner [Thu, 9 Apr 2015 19:56:18 +0000 (21:56 +0200)]
make upgrade: Remove formatted manual pages automatically.
Sepherosa Ziehau [Thu, 9 Apr 2015 12:17:20 +0000 (20:17 +0800)]
coretemp: Indentation
Sepherosa Ziehau [Thu, 9 Apr 2015 12:17:00 +0000 (20:17 +0800)]
coretemp: Avoid magic number
Matthew Dillon [Thu, 9 Apr 2015 06:58:54 +0000 (23:58 -0700)]
hammer2 - slave sync adjustments, doc update
* Fix the hammer2_cluster*() API, do not multiply-ref underlying chains
when a cluster is multiply-ref'd. Fixes issues when underlying chain
elements of the cluster are replaced during operations.
* Fix frontend writing issues when multiple slaves are present.
* Adjust documentation a bit. Get rid of the 256-way split description
for copyid use, we aren't going to do things that way so the size for
each physical volume can be up to ~2^64 (maybe ~2^63 to be safe).
* Add a HAMMER2_LOOKUP_NODIRECT flag to prevent recursively returning
the inode and remove the broken (cluster == cparent) test in the slave-sync
code. Doh, cluster structures are independently allocated, test was
broken.
* Fix several other slave-sync issues when multiple slaves are present.
(there are still some issues remaining).
* Fix accounting for the number of mounts using a physical device
(hmp), rename pmp_count to mount_count for clarity.
Sepherosa Ziehau [Wed, 8 Apr 2015 14:56:45 +0000 (22:56 +0800)]
coretemp: Register sensor task for each core instead each HT
And replicate DTS readout to all HT sensors belonging to the same core.
DTS readout is actually only for cores.
Matthew Dillon [Wed, 8 Apr 2015 05:53:06 +0000 (22:53 -0700)]
hammer2 - Retool flushing and use of mirror_tid, more cluster work.
Now that I'm starting to deal with different PFSs on the same physical
volume some mirror_tid related issues need to be fixed.
* mirror_tid is now per-media, not per-PFS. This fixes a number of issues
particularly with the on-mount recovery scan. Mount, recovery, and flush
code now no longer has to worry about PFSs when it comes to adjusting
mirror_tid.
* modify_tid will become per-physical PFS (not quite done in this commit).
* Change where mirror_tid gets set. Set bref.mirror_tid in
hammer2_chain_modify() instead of in the flush code. This takes care
of most of the flush cases.
* Better separation of the freemap_tid in the volume header.
* fchain (freemap) and vchain (main topology) syncing now works properly.
The fchain can be flushed independently of vchain, and the recovery code
can handle any number of vchain flushes occuring without a fchain flush.
For the moment, both are flushed on sync, fchain first, vchain second.
This can leave fchain's mirror_tid slightly behind vchain requiring
recovery on mount if a crash were to occur.
We now properly update just the fchain mirror_tid on a followup sync if
no main topology modifications have occurred, allowing the fchain
mirror_tid to catch-up to the vchain mirror_tid.
We now properly sync the fchain on unmount so no recovery is required.
* Revamp the recovery code to properly use the fchain-to-vchain mirror_tid
range in the recovery scan. This has the general effect of making the
recovery pass run a whole lot faster and when coupled with the above
fixes.
Report whether recovery is needed or not on-mount and the mirror_tid range
if so.
* Update DESIGN.
* Add CITEM_FEMOD indicating which chains in the hammer2_cluster structure
can actually be modified and modsync'd by a hammer2_cluster_modify() call.
* CITEM_INVALID now also checks bref.modify_tid as intended, when checking
whether nodes are synchronized or not (it used to use mirror_tid but with
the revamping modify_tid takes over this functionality).
* Remove the auto-ref/auto-drop from hammer2_chain_lock(),
hammer2_chain_unlock(), hammer2_cluster_lock(),
and hammer2_cluster_unlock(). Separate ref and drop calls are needed if
the ref-count is not taken care of already.
This makes the *chain* and *cluster* API basically behave the same way,
reducing confusion.
Cleanup related #defines and code infrastructure that is no longer needed
to handle RESOLVE_NOLOCK.
* Fix a bug when LOOKUP_NOLOCK is used. Do not assume LOOKUP_SHARED when
LOOKUP_NOLOCK is used, use the LOOKUP_SHARED flag only to determine the
locking type. Otherwise relocking the parent (which has to be locked)
for the degenerate DIRECTDATA case breaks the parent and causes a
deadlock or assertion.
* Preliminary adjustments to the slave synchronization code. In particular,
add support to hammer2_chain_modify() to suppress modify_tid updates so
the slave synchronization code can update the field manually. It must
NOT update the modify_tid in parent chains in the topology until the
sub-tree under them is synchronized.
Sepherosa Ziehau [Tue, 7 Apr 2015 15:02:32 +0000 (23:02 +0800)]
coretemp: Clean up identify method
Sepherosa Ziehau [Tue, 7 Apr 2015 14:22:13 +0000 (22:22 +0800)]
coretemp: Set Tj max to 110; 105 is quite common on Ivy Bridge CPUs.
Sepherosa Ziehau [Tue, 7 Apr 2015 14:15:01 +0000 (22:15 +0800)]
coretemp: Set sensor status properly
Sepherosa Ziehau [Tue, 7 Apr 2015 13:57:09 +0000 (21:57 +0800)]
sensor: Stick sensors thread to the last CPU.
Round-robin CPU assignment could stick the sensors thread to CPU0,
which has many special tasks.
Submitted-by: YRabbit
Sepherosa Ziehau [Mon, 6 Apr 2015 13:59:28 +0000 (21:59 +0800)]
coretemp: Add description for the sensor
Sepherosa Ziehau [Mon, 6 Apr 2015 12:52:28 +0000 (20:52 +0800)]
clock: Piggyback passive IPIQ processing
Passive IPIs will be flushed by the target CPU at clock interrupt.
But we _never_ completely conform to the passive IPI description.
Before we implemented LAPIC interrupt timer, systimers on non-CPU0
were actually IPIQ processing, which processed the passive IPIs;
however, passive IPIQ processing on CPU0 didn't conform to the passive
IPIs description.
After the introduction of LAPIC interrupt timer, none of the systimers
were related to IPIQ processing, thus passive IPIQ processing no longer
conformed to the passive IPI description at all.
As of this commit we piggyback passive IPIQ processing in doreti after
hardclock(), which matches the passive IPI description.
* NOTE:
- We don't piggypack passive IPIQ processing directly in hardclock() to
avoid introducing extra jitters to system time.
- We choose not to check passive IPIQ in systimer_intr(), since systimer
rate could be pretty high, e.g. rate set by polling(4).
With-feedback-from: dillon@
Tomohiro Kusumi [Mon, 6 Apr 2015 15:40:16 +0000 (00:40 +0900)]
sbin/hammer: Make hammer show-undo indicate positions of tail-chasing fifo
- Make hammer show-undo command print '>' for undo zone blockmap's
first_offset, and '<' for undo zone blockmap's next_offset which
indicate positions of tail-chasing undo fifo.
Matthew Dillon [Mon, 6 Apr 2015 01:04:46 +0000 (18:04 -0700)]
hammer2 - Sync thread work
* Initial syncthread coding, still many issues to resolve, particularly
with the handling of mirror_tid, but it was able to successfully
synchronized a MASTER to a SLAVE.
* Add more features to the hammer2_cluster*() API and structures and fix
a couple of bugs in hammer2_cluster_lookup() and hammer2_cluster_next().
* Add hammer2_cluster_next_single_chain() for advancing one element of
a cluster structure. Used to advance past a chain which the sync code
must delete on a slave.
* Fix a bug in hammer2_chain_lookup() when HAMMER2_LOOKUP_NOLOCK is used.
Tomohiro Kusumi [Sun, 5 Apr 2015 16:38:13 +0000 (01:38 +0900)]
sbin/hammer: Don't readahead the base buffer itself
- readahead can be skipped for itself (ri==0) too.
Sepherosa Ziehau [Sun, 5 Apr 2015 15:25:55 +0000 (23:25 +0800)]
coretemp: Keep the previous sensor value, if the IPI does not complete yet
John Marino [Sun, 5 Apr 2015 13:38:06 +0000 (15:38 +0200)]
make distribution: Remove references to deleted nls dirs
reported by: zrj on irc
Sepherosa Ziehau [Sun, 5 Apr 2015 14:37:27 +0000 (22:37 +0800)]
coretemp: Use lwkt_send_ipiq_passive()
This makes coretemp even more lightweight.
Sepherosa Ziehau [Fri, 3 Apr 2015 15:41:08 +0000 (23:41 +0800)]
coretemp: Use IPI to get temperature on other CPUs
This is more lightweight than CPU migration to run just one instruction.
Sepherosa Ziehau [Sun, 29 Mar 2015 12:26:36 +0000 (20:26 +0800)]
dimm: Implement pseudo device driver for DIMM related drivers
- This pseudo device driver installs sensor device for DIMM related
sensors (memtemp(4) and upcoming ecc(4) changes).
- This pseudo device driver keeps DIMM location information. And
the location information is exposed through a new sysctl tree,
hw.dimminfo. The nodes in this sysctl tree have the same names
as the sensor devices, so that programatic way could be used to
report DIMM status.
- This pseudo device implements common sensor update function for
memtemp(4). And it keeps configurable temperature thresholds for
memtemp(4) sensor.
- Utilize this pseudo device driver in memtemp(4).
Matthew Dillon [Sun, 5 Apr 2015 02:22:39 +0000 (19:22 -0700)]
hammer2 - update documentation, cleanup
* Update the DESIGN document.
* Cleanup API for hammer2_inode_lock*() and hammer2_inode_unlock*().
* Start work on the synchronization thread framework.
Tomohiro Kusumi [Fri, 3 Apr 2015 14:17:26 +0000 (23:17 +0900)]
sbin/hammer: Fix wrong hash value
- get_buffer_readahead() scans ondisk buffer using a wrong hash
value based on raw address. It needs to use zone2 address.
- Using wrong value results unnecessary malloc/free since buf
is always NULL after TAILQ_FOREACH().
John Marino [Fri, 3 Apr 2015 14:49:34 +0000 (16:49 +0200)]
make upgrade: Clean out cat1 directory from texinfo pages
John Marino [Fri, 3 Apr 2015 13:14:23 +0000 (15:14 +0200)]
Remove unused bsd.info.mk
John Marino [Fri, 3 Apr 2015 13:12:00 +0000 (15:12 +0200)]
Remove unused texinfo source files from contrib directory
John Marino [Fri, 3 Apr 2015 13:09:08 +0000 (15:09 +0200)]
Remove texinfo from base
At this point, the only info files left in DragonFly are from texinfo
itself. Due to a similar effort on FreeBSD 11, the ports are already
prepared for the lack of texinfo utilities in base.
John Marino [Fri, 3 Apr 2015 12:45:00 +0000 (14:45 +0200)]
groff: Remove info page
Initially I converted the groff info page until groff.7, but then I
realized that groff.7 already existed and serves as an adequate
alternative to the groff info page. Thus, this commit simply removes
the installation of the info page (one of the last in base)
John Marino [Fri, 3 Apr 2015 12:21:17 +0000 (14:21 +0200)]
am-utils: Convert info page to "man 7 am-utils"
Each automounter tool had a man page, but the group of utilities was
covered by an info page. This unique information was converted to
am-utils.7 and the info page has been removed.
John Marino [Fri, 3 Apr 2015 12:05:31 +0000 (14:05 +0200)]
com_err: convert info page to com_err.7
The was already a com_err.1 man page, but it was significantly shorter
than the com_err info page. The info page was converted to man 7 com_err
and then removed.
John Marino [Fri, 3 Apr 2015 10:56:33 +0000 (12:56 +0200)]
gdb: Remove ~2Mb of doc files from contrib (texi)
These texi files are no longer used in the build and they've got
equivalent man pages in most cases.
John Marino [Fri, 3 Apr 2015 10:41:32 +0000 (12:41 +0200)]
gdb: Remove 4 info pages (2 converted to man pages)
GDB had four info pages: gdb, gdbint, stabs, and annotate. They have been
removed.
* gdb.info : There has always been a man page gdb.1 which is an
adequate replacement for gdb.info
* stabs.info : This has been converted to stabs.7 with info2man
* gdbint.info : This has been converted to gdbint.7 with info2man
* annotate.info : This was always obsolete[1], so it was not replaced
[1] From annotate info page: This document describes the obsolete level
two annotation interface implemented in older GDB versions.
John Marino [Fri, 3 Apr 2015 10:09:16 +0000 (12:09 +0200)]
diffutils: Remove redundant info page
The three diff binaries all have their own man pages, so the
diffutils.info file is redundant. For now a copy of it remains in
contrib/diffutils/doc, but it is being removed from the base system.
John Marino [Fri, 3 Apr 2015 08:26:46 +0000 (10:26 +0200)]
grep: remove "redundant" info page
Grep already has an adequate man page, so we can remove info page without
losing much.
John Marino [Fri, 3 Apr 2015 08:23:09 +0000 (10:23 +0200)]
gcc47: Remove info pages
The info pages from gcc50 are not installed due to limited use and the
fact all the information is readily available on the web. Removing info
pages from gcc47 matches gcc50 and moves us closer to removing texinfo.
John Marino [Fri, 3 Apr 2015 08:12:43 +0000 (10:12 +0200)]
binutils 2.24: Remove info pages
The info pages from binutils 2.25 are not installed (if they were, they
would overwrite 2.24 versions anyway). Both "as" and "ld" have sufficient
man pages. There is not equivalent "binutils" man page, but this
information is readily available on the internet, which is the same
justification used for not importing gcc50 info pages.
John Marino [Fri, 3 Apr 2015 08:59:00 +0000 (10:59 +0200)]
cvs: remove ~3.5Mb of doc files from contrib (texi/pdf)
The only documentation we needs from cvs is in man/cvs.5 and doc/cvs.1.
Everything else is unused, including the pre-generated pdf files, so
lets save shallow repos from pulling these large unused files.
John Marino [Fri, 3 Apr 2015 07:30:58 +0000 (09:30 +0200)]
cvs: Remove info pages (one converted to man page)
As the start of an effort to remove info pages and texinfo from the
system, the cvsclient info page has been converted to a man page.
The cvs info page was not converted since it appears to be equivalent
to the already existing man page.
Entries were added to Makefile_upgrade.inc, but when all the info pages
are gone, those entries will be replaced by a single directory line -
to remove /usr/share/info
John Marino [Thu, 2 Apr 2015 21:07:32 +0000 (23:07 +0200)]
gcc50: Update to 02 APR 2015 snapshot (SVN 221845)
John Marino [Thu, 2 Apr 2015 22:56:45 +0000 (00:56 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Thu, 2 Apr 2015 20:43:43 +0000 (22:43 +0200)]
Update gcc-50 to SVN version 221845
Last Changed Date: 2015-04-02 19:33:22 +0200 (Thu, 02 Apr 2015)
Tomohiro Kusumi [Wed, 1 Apr 2015 12:41:31 +0000 (21:41 +0900)]
sbin/hammer: Don't downgrade when failed to destroy pfs
- hammer pfs-destroy command downgrades (and change some other params)
ondisk pfs data before it attempts to destroy the pfs. This leads to
unexpected result if it fails to destroy because that pfs is left
with downgraded info. This commit restores the original ondisk pfs
data on failure in order to keep status (this does generate a new
ondisk pfs record too).
==========
example1 - using existing /sbin/hammer
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# mkdir -p ./mnt
# hammer pfs-master ./test1 | grep "operating as"
operating as a MASTER
# mount_null ./test1 ./mnt
# mount | grep mnt
/HAMMER/@@-1:00001 on /HAMMER/mnt (null, local)
# hammer pfs-destroy ./test1
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
# hammer pfs-status ./test1 | grep "operating as"
operating as a SLAVE
==========
example2 - using this commit
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# mkdir -p ./mnt
# hammer pfs-master ./test1 | grep "operating as"
operating as a MASTER
# mount_null ./test1 ./mnt
# mount | grep mnt
/HAMMER/@@-1:00001 on /HAMMER/mnt (null, local)
# hammer pfs-destroy ./test1
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
# hammer pfs-status ./test1 | grep "operating as"
operating as a MASTER
Tomohiro Kusumi [Tue, 31 Mar 2015 21:15:09 +0000 (06:15 +0900)]
sbin/hammer: Print error message if already up|downgraded
- Print an error message that indicates the pfs has already
been upgraded to master or downgraded to slave, instead of
printing "pfs-xxxgrade of PFS#%d (%s) succeeded".
Tomohiro Kusumi [Tue, 31 Mar 2015 20:26:19 +0000 (05:26 +0900)]
sbin/hammer: Detect possible relinking of pfs by user
- It is possible that a user rm pfs symlink and then relink the pfs.
If the user happens to make the symlink to, for example,
"./@@-1:00001" (has "./" before "@@-1:00001"), then getpfs() fails
to properly parse the pfs id as it fails to sscanf the string.
This commit checks if the symlink has "/" in the path, and if yes
use a basename of it to get rid of unnecessary prefix to make it
work properly.
==========
example1 - using existing /sbin/hammer
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# hammer pfs-master test1 > /dev/null
# ls -l ./test1
lrwxr-xr-x 1 root wheel 10 Apr 2 04:27 ./test1 -> @@-1:00001
# ln -s ./@@-1:00001 test2
# ls -l ./test2
lrwxr-xr-x 1 root wheel 12 Apr 2 04:28 ./test2 -> ./@@-1:00001
# hammer pfs-destroy ./test2
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
==========
example2 - using this commit
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# hammer pfs-master test1 > /dev/null
# ls -l ./test1
lrwxr-xr-x 1 root wheel 10 Apr 2 04:31 ./test1 -> @@-1:00001
# ln -s ./@@-1:00001 test2
# ls -l ./test2
lrwxr-xr-x 1 root wheel 12 Apr 2 04:31 ./test2 -> ./@@-1:00001
# hammer pfs-destroy ./test2
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
# ls -l ./test*
lrwxr-xr-x 1 root wheel 10 Apr 2 04:31 ./test1 -> @@PFS00001
# hammer pfs-status ./test1
Cannot access PFS ./test1: No such file or directory
Tomohiro Kusumi [Tue, 31 Mar 2015 17:17:18 +0000 (02:17 +0900)]
sbin/hammer: Remove unnecessary bzero(3)
- No need to bzero pfs before calling getpfs().
- Make init_pfsd() bzero pfsd.
Tomohiro Kusumi [Tue, 31 Mar 2015 17:08:46 +0000 (02:08 +0900)]
sbin/hammer: Add missing relpfs()
- Call relpfs() after getpfs()
Tomohiro Kusumi [Mon, 30 Mar 2015 19:03:26 +0000 (04:03 +0900)]
sbin/hammer: Avoid pfs via pfs on creation, not on status|destroy|upgrade|downgrade|update
- According to the getpfs() implementation, hammer command wants to
avoid users create pfs via pfs (avoid-foot-shooting). However, it
needs to be done when creating the pfs.
- Currently getpfs() is called by all pfs related commands except for
creation (pfs-master, pfs-slave). This makes it possible for users
to create pfs via pfs, but unable to status|destroy|upgrade|downgrade
|update the once created pfs via pfs. In order to avoid this it should
avoid pfs via pfs on pfs creation instead of in getpfs(). This also
ensures other pfs related commands that handle pfs are protected from
pfs via pfs.
- This commit also allows users to destroy once created pfs via pfs
(by existing /sbin/hammer) as following examples show.
==========
example1 - using existing /sbin/hammer
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# hammer pfs-master test1 > /dev/null
# mkdir ./mnt1
# mount_null ./test1 ./mnt1
# cd ./mnt1
# hammer pfs-master test2
Creating PFS #2 succeeded!
You are attempting to access a PFS softlink from a PFS. It may not represent the PFS
on the main filesystem mount that you expect! You may only access PFS softlinks
via the main filesystem mount!
created pfs via pfs, but can't destroy (or any other command) it
# hammer pfs-destroy ./test2
You are attempting to access a PFS softlink from a PFS. It may not represent the PFS
on the main filesystem mount that you expect! You may only access PFS softlinks
via the main filesystem mount!
==========
example2 - using this commit to properly destroy above test2
# hammer pfs-destroy ./test2
You have requested that PFS#2 () be destroyed
This will irrevocably destroy all data on this PFS!!!!!
Do you really want to do this? y
This PFS is currently setup as a MASTER!
Are you absolutely sure you want to destroy it? y
Destroying PFS #2 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#2 succeeded!
pfs via pfs should be avoided on creation, but not after that.
# hammer pfs-master test2
You are attempting to access a PFS softlink from a PFS. It may not represent the PFS
on the main filesystem mount that you expect! You may only access PFS softlinks
via the main filesystem mount!
Tomohiro Kusumi [Mon, 30 Mar 2015 18:09:02 +0000 (03:09 +0900)]
sbin/hammer: Make hammer pfs-status print after possible error case
- Print pfs-status info after getpfs() which could possibly print
an error message to stderr and exit(1).
Tomohiro Kusumi [Mon, 30 Mar 2015 13:28:17 +0000 (22:28 +0900)]
sbin/hammer: Fix error message on pfs open/ioctl failure
- "Not a HAMMER root" doesn't seem to be a good error message
when getpfs() or ioctl(HAMMERIOC_GET_PSEUDOFS) has failed.
- getpfs() returning negative indicates open(2) has failed.
ioctl(HAMMERIOC_GET_PSEUDOFS) returning negative (particularly
when caller has set pfs->pfs_id to -1 before ioctl) usually
indicates the fd has nothing to do with the existing valid pfs.
It makes better sense with a message like "Invalid PFS path %s"
or something.
Tomohiro Kusumi [Mon, 30 Mar 2015 13:20:19 +0000 (22:20 +0900)]
sbin/hammer: Cleanup pfs commands by adding getdir()
- hunk1 - Add a static function getdir() for pfs operations.
Returns a path to a directory containing the arg.
- hunk2,3 - Replace existing code with getdir(). Since dirpath
is necessary only when islink, move it inside the if(islink).
- hunk4 - Replace existing code with getdir().
- hunk5 - Add missing free(dirpath).
Tomohiro Kusumi [Sun, 29 Mar 2015 13:15:12 +0000 (22:15 +0900)]
sbin/hammer: Make alloc_btree_element() take address of buffer pointer
- Make alloc_btree_element() take struct buffer_info** as the second
arg so a caller can take control of the buffer, in addition to
retrieving ondisk data. This is the way other ondisk buffer apis
are made (even if the caller doesn't need to explicitly release the
buffer).
John Marino [Wed, 1 Apr 2015 12:15:03 +0000 (14:15 +0200)]
Remove empty directories in /usr/share
These are mostly related to obsolete localization.
Sepherosa Ziehau [Wed, 1 Apr 2015 12:11:40 +0000 (20:11 +0800)]
rtsock: Fix NET_RT_FLAGS support
John Marino [Wed, 1 Apr 2015 06:55:13 +0000 (08:55 +0200)]
Fix gold linker 2.25
The trick of dumping target files to libgold did not work. The gold
linker was missing all of it's targets and emulations. This new approach
uses a custom build target to avoid building common c++ object files
twice.
Eitan Adler [Tue, 31 Mar 2015 20:31:55 +0000 (13:31 -0700)]
share/skel/dot.cshrc: update
- bump history
- make use of autorehash
- make a better prompt (include user)
- some better aliases
- merging history
many things which make it easier for new users
Reviewed by: swildner, marino
Signed-off-by: Eitan Adler <lists@eitanadler.com>
John Marino [Tue, 31 Mar 2015 19:06:36 +0000 (21:06 +0200)]
UPDATING: Add entry about binutils 2.25
John Marino [Tue, 31 Mar 2015 18:56:50 +0000 (20:56 +0200)]
cross-tools stage: Don't build unused linker (i.e. gold)
Only one linker is used to build the world, but each version of binutils
normally installs two linkers. Update the build infrastructure to skip
building one linker for the cross-tools version of binutils. This is
normally the gold linker, which builds very slowly due to being written
in c++.
This change could be backported to binutils 2.24, but right now it only
applies to binutils 2.25, the version normally used to build world.
John Marino [Tue, 31 Mar 2015 17:55:09 +0000 (19:55 +0200)]
Set binutils 2.25 as primary version
Binutils 2.24 is now the backup version.
John Marino [Tue, 31 Mar 2015 17:34:47 +0000 (19:34 +0200)]
ld-225: fix ldscripts (allows binutils 2.25 to build world)
John Marino [Tue, 31 Mar 2015 16:29:14 +0000 (18:29 +0200)]
Remove unused Binutils 2.22 source files
John Marino [Tue, 31 Mar 2015 13:04:24 +0000 (15:04 +0200)]
Replace binutils 2.22 with latest binutils 2.25
There are several active Common Vulnerabilities and Exposures (CVE) on
binutils version 2.24 and earlier. As far as I can tell, there are no
known vulnerabilities with Binutils 2.25 (released late Dec 2014).
While here, maximumize parallelism by splitting binutils into three
serial blocks. Previously binutils built serially with the build on the
gold linker (c++) particularly obvious.
The commit only replaces the ALTBINUTILS (version 2.22). Once it is
confirmed that world builds without issue using version 2.25, it will
become prime and binutils 2.24 will become ALTBINUTILS.
The active vulnerability list:
* CVE-2012-3509 possible DOS (crash) (2.22 only)
* CVE-2014-8484 possible DOS (out of bounds read)
* CVE-2014-8485 possible DOS (crash) and code execution
* CVE-2014-8501 possible DOS (out of bounds write) and unspecified impacts
* CVE-2014-8502 possible DOS (crash) and unspecified impacts
* CVE-2014-8503 possible DOS (crash) and unspecified impacts
* CVE-2014-8404 possible DOS (crash) and unspecified impacts
* CVE-2014-8737 allows local users to arbitrarily delete files
* CVE-2014-8738 possible DOS (crash, invalid write)
John Marino [Mon, 30 Mar 2015 18:44:57 +0000 (20:44 +0200)]
binutils 2.25: Add DF READMEs and local modifications
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.