François Tigeot [Sun, 3 May 2015 17:31:58 +0000 (19:31 +0200)]
drm: linux/kernel.h: Add mult_frac()
Obtained-from: NetBSD
François Tigeot [Sun, 3 May 2015 15:31:24 +0000 (17:31 +0200)]
drm: linux/delay.h: Add ndelay and usleep_range()
usleep_range() Obtained from OpenBSD
Sascha Wildner [Sun, 3 May 2015 12:05:57 +0000 (14:05 +0200)]
kernel/acpi: Expose the AcpiUtConvertStringToUuid() func for the module.
Sascha Wildner [Sun, 3 May 2015 11:28:02 +0000 (13:28 +0200)]
kernel/acpi: Fix buildkernel.
Not having ACPI_DEBUG in the kernel configuration broke the build of
the acpi.ko module. Fix this by exposing AcpiUtConvertStringToUuid()'s
prototype always when the ACPICA is built as a module. The other
combinations are covered by 'files' and by the other ifdef checks.
Checking the unmodified X86_64_GENERIC must have slipped through in my
testing of
b061b83c16d6660c9e03e24186b0addc5d4115d0 somehow. :(
Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
Tomohiro Kusumi [Sat, 2 May 2015 16:13:31 +0000 (01:13 +0900)]
sys/vfs/hammer: Add ascii art on pip/ip/rec relation
- Add an ascii art which describes the existing comment.
Tomohiro Kusumi [Fri, 1 May 2015 17:17:04 +0000 (02:17 +0900)]
sbin/hammer: Remove unused READAHEAD flag
- Cleanup get_buffer() by removing HAMMER_BUFINFO_READAHEAD since
this flag does nothing, but taking care of negative 'isnew' for
this flag makes things look complicated than it should.
- For the else case, 'if (isnew >= 0)' is not necessary because it's
always true from the way get_buffer() is recursively called via
get_buffer_readahead() via get_buffer().
Tomohiro Kusumi [Fri, 1 May 2015 17:05:59 +0000 (02:05 +0900)]
sbin/hammer: Add a function find_buffer()
- Make things a bit more clear by separating hash table stuff
into a function.
Sascha Wildner [Fri, 1 May 2015 21:51:50 +0000 (23:51 +0200)]
kernel/acpica: Fix building the debugger/disassembler for the kernel.
After this commit, the ACPI_DEBUG kernel option will cause the ACPICA
debugger and disassembler to be included in the kernel build. It can
then be called from DDB with 'call acpi_EnterDebugger'.
Most of this commit reverts
fe3013ebf55edd20d57e7e806c445a5a5e2e7b11.
The dmresrc2.c changes are from FreeBSD.
Tomohiro Kusumi [Fri, 1 May 2015 12:08:36 +0000 (21:08 +0900)]
sbin/hammer: Conform to style(9)
- Kernel include files (i.e. sys/*.h) come first;
normally, include <sys/types.h> OR <sys/param.h>, but not both.
- Remove #include <sys/param.h>
Tomohiro Kusumi [Thu, 30 Apr 2015 15:23:10 +0000 (00:23 +0900)]
sbin/hammer: Cleanups
- hunk 1 - The second arg gets |ed with encoded zone address.
- hunk 2 - Remove duplicated comment.
Tomohiro Kusumi [Thu, 30 Apr 2015 10:15:55 +0000 (19:15 +0900)]
sys/vfs/hammer: Add inline functions hammer_modify_buffer|volume_noundo()
- Add noundo wrappers hammer_modify_buffer|volume_noundo() similar to
the existing inline function hammer_modify_node_noundo() for better
readability.
- A pair of args (NULL, 0) indicating that it's not generating undo is
a bit unclear (and there are even comments for them).
- (The compiler doesn't actually inline hammer_modify_node_noundo()
in my environment, but these one-line wrappers are inlined)
Matthew Dillon [Thu, 30 Apr 2015 17:25:27 +0000 (10:25 -0700)]
kernel - Fix swap-full process killer
* Previously once swap became full the kernel could enter a dead zone where
no new pagouts are possible but there is just barely sufficient memory for
the system to run. That is, the minimum free page target is met but the
pageout target cannot be met.
This caused a 2+ second stall in the VM system followed by a 1 second
run (where the pageout demon stops trying for 1 second before trying again),
making the system unusable anyway.
* Replace that code. Now we start killing processes once swap becomes full
and we are unable to reach our paging target. That is, we require that the
pageout demon MUST be able to reach its paging target for free pages for
the system to run well, even if there are barely sufficient pages to run
the current steady state.
* Total anonymous (pageable) memory is still effectively RAM + SWAP. It's
just slightly less than it was before because it requires the free page
target to be met and not just the free page minimum.
Reported-by: marino
Tomohiro Kusumi [Wed, 29 Apr 2015 16:25:04 +0000 (01:25 +0900)]
sbin/hammer: Use existing macro to encode zone2 address
- Use HAMMER_ENCODE_RAW_BUFFER().
- Using this macro should always be better in the sense that it
properly masks the input offset (clears zone and volume bits).
Tomohiro Kusumi [Wed, 29 Apr 2015 16:02:23 +0000 (01:02 +0900)]
sys/vfs/hammer: Cleanup hammer.h
- It was more appropriate to have hammer_xlate_to_zone2 macro in
sys/vfs/hammer/hammer_disk.h than sys/vfs/hammer/hammer.h.
Tomohiro Kusumi [Wed, 29 Apr 2015 15:21:56 +0000 (00:21 +0900)]
sys/vfs/hammer: Cleanup ifdef/else in hammer.h [2/2]
-
872a7eee introduced hammer.h to userspace using ifdef/else switches
that needs to be cleaned up. It ended up that everything in hammer.h
was kernel stuff. Userspace needs this header only to include other
hammer headers that are already available in userspace.
- hunk 1,2 - Cleanup and conform to style(9).
- hunk 3,4 - Userspace doesn't need HAMMER_CHKSPC_XXX. These are only
internally used by big block allocator.
- hunk 5,6 - Userspace doesn't need hammer_modify_xxx(). These are only
internally used to begin i/o and generate undo for some meta data.
Tomohiro Kusumi [Wed, 29 Apr 2015 14:01:27 +0000 (23:01 +0900)]
sys/vfs/hammer: Cleanup ifdef/else in hammer.h [1/2]
-
872a7eee introduced hammer.h to userspace using ifdef/else switches
that needs to be cleaned up.
- hunk 1,3,4 - Add comments to endif.
- hunk 2 - These can be combined.
John Marino [Tue, 28 Apr 2015 21:51:37 +0000 (23:51 +0200)]
default/compilers.conf: Add two new entries
Add lang/clang36 (released) and lang/gcc6-devel (newly opened for
development) to the default compilers.conf file.
Tomohiro Kusumi [Fri, 24 Apr 2015 16:56:02 +0000 (01:56 +0900)]
sys/vfs/hammer: Add -A option to reblock|rebalance all pfs
- -A option makes certain per pfs hammer commands perform on all pfs
of the filesystem that the [filesystem] arg belongs to. Currently
hammer reblock and rebalance commands support this. It does nothing
to other commands.
- With -A option, above hammer commands use a range of 0 to 0xFFFF
for pfs id (upper 16 bits) of the cursor localization. This makes
it iterate all pfs in the filesystem.
- Above difference in localization range means btree iteration
applies to larger range of nodes in terms of pfs id, since it's
been used as a top priority key that works as a localizing factor
of pfs within the btree. There is no logical difference other than
the range is different. So performing these commands on all pfs is
as simple as changing the localization range (unless other keys are
involved as additional parameters like hammer prune does).
Tomohiro Kusumi [Fri, 24 Apr 2015 14:52:28 +0000 (23:52 +0900)]
sys/vfs/hammer: Cleanup cursor initialization code on prune
- Just make things a bit more clear (for the upcoming changes).
- The rule is the ioctl caller sets localization type to prune,
and the ioctl code adds up ip localization to initialize cursor.
Tomohiro Kusumi [Fri, 24 Apr 2015 14:40:49 +0000 (23:40 +0900)]
sys/vfs/hammer: Cleanup cursor initialization code on rebalance
- Just make things a bit more clear (for the upcoming changes).
- The rule is the ioctl caller sets localization type to rebalance,
and the ioctl code adds up ip localization to initialize cursor.
Sascha Wildner [Sun, 26 Apr 2015 11:58:23 +0000 (13:58 +0200)]
nrelease: Fix comment typo.
Markus Pfeiffer [Mon, 27 Apr 2015 21:43:40 +0000 (21:43 +0000)]
usb4bsd: Add Wildcat Point-LP controller
This enables routing of ports through the XHCI instead of the EHCI on
devices with this controller, such as the Broadwell NUC.
Markus Pfeiffer [Mon, 27 Apr 2015 18:18:09 +0000 (18:18 +0000)]
usb4bsd: Fix if_run
* if_run was still using the locking from before the last update
of the wlan stack.
Sascha Wildner [Mon, 27 Apr 2015 16:16:06 +0000 (18:16 +0200)]
Remove old timezone file via 'make upgrade'.
Sepherosa Ziehau [Mon, 27 Apr 2015 12:52:02 +0000 (20:52 +0800)]
ktr: Reduce number of early boot KTR entries to 256
This prevents kernel or module loading failure due to excessive BSS
usage if KTR_ENTRIES is large.
While I'm here, staticize some global variables.
Sepherosa Ziehau [Mon, 27 Apr 2015 12:51:36 +0000 (20:51 +0800)]
usched/bsd4: Avoid ktr confliction on chooseproc
Imre Vadasz [Sun, 26 Apr 2015 22:20:47 +0000 (00:20 +0200)]
rtld: Fix a memory leak on thread termination
* Plugs a memory leak in the free_tls() function which was leaking
some memory on every thread termination.
Sepherosa Ziehau [Sun, 26 Apr 2015 12:18:51 +0000 (20:18 +0800)]
ktrdump: Fix caller chain support
And set default kernel file to /boot/kernel/kernel, if sysctl
kern.bootfile fails.
Sepherosa Ziehau [Sun, 26 Apr 2015 12:17:20 +0000 (20:17 +0800)]
ktr/x86_64: Fix caller chain support
Sepherosa Ziehau [Fri, 24 Apr 2015 12:30:36 +0000 (20:30 +0800)]
em/emx/igb/ix: Increase opackets stats in if_start method
Since these drivers TX interrupt are aggressively aggregated, increasing
opackets at TX interrupt time will make the opackets statistics vastly
inaccurate.
Noticed-by: dillon@
Tomohiro Kusumi [Sun, 26 Apr 2015 09:42:06 +0000 (18:42 +0900)]
sys/vfs/hammer: Remove unnecessary if test
- There is the same 'if (error == 0)' for a local variable error
right before this one which can be combined.
Tomohiro Kusumi [Sat, 25 Apr 2015 18:55:01 +0000 (03:55 +0900)]
sys/vfs/hammer: Make hammer_delete_at_cursor() properly set *stat_bytes
- This commit makes hammer_delete_at_cursor() set *stat_bytes arg.
*stat_bytes has been ignored although it was supposed to set bytes
physically deleted from the btree.
- hammer prune command expects this function to set above bytes and
print it after pruning, however it's always 0 because the function
ignores it.
- Note that the actual size freed from zone address space may differ
from *stat_bytes (or what the hammer prune command shows), because
hammer_blockmap_free() may round it up with its alignment size.
==========
example1 - with existing hammer
# hammer prune ./test
TID
000000010404e750 -
0000000104071090
TID
0000000104034060 -
000000010404e750
TID
0000000104019cb0 -
0000000104034060
TID
0000000000000001 -
0000000104019cb0
Prune /HAMMER/: 4 snapshots
Prune /HAMMER/: objspace
8000000000000000:0000
7fffffffffffffff:ffff pfs_id 0
Prune /HAMMER/: prune_min is 0d/00:00:00
Prune /HAMMER/ succeeded
Pruned 51/769595 records (10 directory entries) and 0 bytes
example2 - with this commit
# hammer prune ./test
TID
000000010404ea10 -
0000000104071390
TID
0000000104034360 -
000000010404ea10
TID
0000000104019fb0 -
0000000104034360
TID
0000000000000001 -
0000000104019fb0
Prune /HAMMER/: 4 snapshots
Prune /HAMMER/: objspace
8000000000000000:0000
7fffffffffffffff:ffff pfs_id 0
Prune /HAMMER/: prune_min is 0d/00:00:00
Prune /HAMMER/ succeeded
Pruned 51/769596 records (11 directory entries) and 6710 bytes
Sascha Wildner [Sat, 25 Apr 2015 13:23:09 +0000 (15:23 +0200)]
Sync zoneinfo database with tzdata2015d from ftp://ftp.iana.org/tz/releases
Changes affecting future time stamps
* Egypt's spring-forward transition is at 24:00 on April's last Thursday,
not 00:00 on April's last Friday. 2015's transition will therefore
be on Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.
Similar fixes apply to 2026, 2037, 2043, etc.
(Thanks to Steffen Thorsen.)
* Egypt will not observe DST in 2015 and will consider canceling it
permanently. For now, assume no DST indefinitely.
(Thanks to Ahmed Nazmy and Tim Parenti.)
Changes affecting past time stamps
* The following changes affect some pre-1991 Chile-related time stamps
in America/Santiago, Antarctica/Palmer, and Pacific/Easter.
The 1910 transition was January 10, not January 1.
The 1918 transition was September 10, not September 1.
The UTC-4 time observed from 1932 to 1942 is now considered to be
standard time, not year-round DST.
Santiago observed DST (UTC-3) from 1946-07-15 through 1946-08-31,
then reverted to standard time, then switched its time zone to
UTC-5 on 1947-04-01.
Assume transitions before 1968 were at 00:00, since we have no data
saying otherwise.
The spring 1988 transition was 1988-10-09, not 1988-10-02.
The fall 1990 transition was 1990-03-11, not 1990-03-18.
Assume no UTC offset change for Pacific/Easter on 1890-01-01,
and omit all transitions on Pacific/Easter from 1942 through 1946
since we have no data suggesting that they existed.
One more zone has been turned into a link, as it differed
from an existing zone only for older time stamps. As usual,
this change affects UTC offsets in pre-1970 time stamps only.
The affected zone is America/Montreal.
* America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not
1966-07-01. Also, Yukon's time zone history is documented better.
(Thanks to Brian Inglis and Dennis Ferguson.)
Change affecting past and future time zone abbreviations
* The abbreviations for Hawaii-Aleutian standard and daylight times
have been changed from HAST/HADT to HST/HDT, as per US Government
Printing Office style. This affects only America/Adak since 1983,
as America/Honolulu was already using the new style.
Matthew Dillon [Fri, 24 Apr 2015 17:22:02 +0000 (10:22 -0700)]
dntpd - Fix va_list handling bug crash
* Later versions of gcc manipulate va_lists in ways that prevent them from
being reused, use va_copy() to make a copy in the log code which uses
the va_list twice.
* Fixes a seg-fault on startup.
Matthew Dillon [Fri, 24 Apr 2015 16:42:09 +0000 (09:42 -0700)]
hammer - Allow NFS exports of slaves
* Allows a SLAVE PFS to be exported.
* WARNING: Clients who mount a SLAVE PFS from a server will only mount a
snapshot. The client must unmount and remount the slave to resynchronize
it. Also, if the server wipes the history pertaining the snapshot the
client mounted, the client's mount will become corrupt.
Matthew Dillon [Fri, 24 Apr 2015 15:30:46 +0000 (08:30 -0700)]
sound - Get sound working on alternative Acer C720p
* This is a bit of a hack but one of our users had a C720p which had
a HP vendor id for its chips. It is possible that this was due to
a BIOS mixup by Google.
* Add hacks for it so sound works on his device.
Matthew Dillon [Thu, 23 Apr 2015 23:56:54 +0000 (16:56 -0700)]
wpa_supplicant - CVE-2015-1863 (dead code in DFly so not an issue)
* Correct buffer overflow from CVE-2015-1863.
* Note that this code is NOT compiled into DragonFly's wpa_supplicant anyway,
so the security advisory is not applicable to DragonFly. Fix the code
anyway so it isn't accidently enabled with the security hole before the
next vendor update.
Tomohiro Kusumi [Thu, 23 Apr 2015 12:55:05 +0000 (21:55 +0900)]
sys/vfs/hammer: Make comments up-to-date
- There was no 'if (dip)' when the .. comment was added in
5a930e66,
but
ea434b6f needed 'if (dip)' and was added.
Tomohiro Kusumi [Thu, 23 Apr 2015 10:41:44 +0000 (19:41 +0900)]
Revert "sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock"
This reverts commit
d58869bda15ddc5e96c1c053196fcd3e56e340c6.
- According to the hammer rebalance (cmd_rebalance.c) which has
a similar printf, this printf was probably intended to show
localization type('s lower limit) when btree iteration starts,
rather than localization types to look for during the iteration.
Then it was right to print 0x0 (key_beg.localization) for %04x.
Sepherosa Ziehau [Thu, 23 Apr 2015 12:21:58 +0000 (20:21 +0800)]
emx: Add errata workaround for multiple TX queues
This makes multiple TX queues work on 82574.
Information-from: Sean Bruno <sbruno@ignoranthack.me>
Tested-with: 82571, 82574, I217
John Marino [Sun, 19 Apr 2015 06:14:37 +0000 (08:14 +0200)]
Set gcc50 as the primary compiler, gcc47 as secondary
Per request, rather than define NO_GCC47 to prevent the building of the
secondary compiler, the new variable is called NO_ALTCOMPILER. This
will avoid some disruption in the future where the actual version is not
important, only the desire to avoid the secondary compiler.
John Marino [Wed, 22 Apr 2015 09:19:58 +0000 (11:19 +0200)]
gcc50: Update to release version 5.1.0 => 5.1.1
Immediately after the release was tagged, another commit was added that
changed the version to 5.1.1. Other than the version differing by 0.0.1,
this version is identical to what the GCC just released.
John Marino [Wed, 22 Apr 2015 19:43:22 +0000 (21:43 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Wed, 22 Apr 2015 09:15:19 +0000 (11:15 +0200)]
Update gcc-50 to SVN version 222321 (gcc-5-branch)
This is equivalent to the GCC 5.1 release plus 1 commit that changes
the version from 5.1.0 to 5.1.1 to reopen the release branch.
Last Changed Date: 2015-04-22 12:45:39 +0200 (Wed, 22 Apr 2015)
Tomohiro Kusumi [Tue, 21 Apr 2015 15:15:21 +0000 (00:15 +0900)]
sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock
- Print reblock.key_end.localization when reblock starts instead of
reblock.key_beg.localization.
- hammer reblock printing 0000 while reblock-inodes printing 0001
and reblock-data|dirs printing 0002 seems strange because reblock
covers all localization types ranging from MIN(0000) to MAX(ffff)
on btree iteration (which obviously includes existing two types
for inode and misc). Printing end localization should make better
sense here.
Tomohiro Kusumi [Tue, 21 Apr 2015 14:20:04 +0000 (23:20 +0900)]
sbin/hammer: Print big block size on reblock
- Print free_level/big_block_size when reblock starts instead of
just free_level.
- The meaning of 'fill_percentage' arg is easier to understand
this way because the big block size is not obvious for most users
while this arg is about selecting which big block to defrag.
Tomohiro Kusumi [Tue, 21 Apr 2015 12:08:56 +0000 (21:08 +0900)]
sys/vfs/hammer: Cleanup cursor initialization code on reblock
- Just make things a bit more clear.
- The rule is the ioctl caller sets localization type to reblock,
and the ioctl code adds up ip localization to initialize cursor.
Tomohiro Kusumi [Tue, 21 Apr 2015 12:04:38 +0000 (21:04 +0900)]
sys/vfs/hammer: Make hammer_blockmap_getfree() clear *curp on error case
- Set *curp to either 0 or 1 regardless of *errorp.
The previous return(0); case does this then all should do this.
Tomohiro Kusumi [Tue, 21 Apr 2015 12:02:47 +0000 (21:02 +0900)]
sys/vfs/hammer: Fix comment
- Sync a comment with what's written in reblock_usage().
Tomohiro Kusumi [Tue, 21 Apr 2015 12:01:00 +0000 (21:01 +0900)]
sys/vfs/hammer: Cleanup sanity checks
- Move sanity checks to the beginning of the function.
- Check 'free_level > HAMMER_BIGBLOCK_SIZE'.
free_level is somewhere between 0 and 8MB (inclusive).
Tomohiro Kusumi [Sun, 19 Apr 2015 10:51:41 +0000 (19:51 +0900)]
sbin/hammer: Remove irrelevant if(S_ISLNK()) case
- Remove if(S_ISLNK()) case for hammer snap since it never matches.
- Also note it shouldn't be matching S_ISLNK() in the first place.
If it does match hammer snap|snaplo|snapq commands will remove
a symlink to the existing snapshot and relink to the new snapshot
which results losing a reference to the old snapshot (although
the old snapshot is still accessible as HAMMER's snapshot is just
a pointer to the filesystem as of certain tid that is resolved
when accessed).
Tomohiro Kusumi [Sun, 19 Apr 2015 10:17:36 +0000 (19:17 +0900)]
sbin/hammer: Add missing snapshots related free(3)
- Call free(3) after asprintf(3)
Tomohiro Kusumi [Sat, 18 Apr 2015 18:42:43 +0000 (03:42 +0900)]
sys/vfs/hammer: Fix off-by-one for snapshot index
- The index starts from 0 so these ioctls should test 'index >= count'.
Tomohiro Kusumi [Sat, 18 Apr 2015 18:24:43 +0000 (03:24 +0900)]
sbin/hammer: Remove redundant exit(3)
- snapshot_usage(1); does exit(1); as the comment implies.
Matthew Dillon [Sat, 18 Apr 2015 19:05:03 +0000 (12:05 -0700)]
sshlockout - minor cleanup
* If ac >= 2 then av[1] will not be NULL.
Matthew Dillon [Sat, 18 Apr 2015 19:04:06 +0000 (12:04 -0700)]
sound - Fix default & unit specs for /dev/dsp and /dev/mixer (2)
* Cleanup a debugging kprintf().
* Cleanup incorrect dev reference and remove some unnecessary locking.
Tomohiro Kusumi [Sat, 18 Apr 2015 05:10:35 +0000 (14:10 +0900)]
sbin/hammer: Make hammer mirror-dump print localization
- Add printf for localiazation in addition to other
struct hammer_base_elm fields.
Tomohiro Kusumi [Sat, 18 Apr 2015 10:18:30 +0000 (19:18 +0900)]
sys/vfs/hammer: Try to fix hammer_ioc_pfs_iterate() [2/2]
- The ioctl HAMMERIOC_PFS_ITERATE added in commit
29d31c2d has
several design issues. This commit and the previous try to fix
them. Since it's been exposed to userspace, some of them are
left as it is with comments.
- Move hammer_ioc_pfs_iterate() to sys/vfs/hammer/hammer_pfs.c
and rename it to hammer_ioc_iterate_pseudofs().
- struct hammer_ioc_pfs_iterate was not necessary. The existing
struct hammer_ioc_pseudofs_rw which is being used by all other
pfs ioctls has everything HAMMERIOC_PFS_ITERATE needs given
that hammer_ioc_pfs_iterate::pos is just used as a pfs id.
Using the unique struct requires hammer_ioc_iterate_pseudofs()
extra conversion in order to make this ioctl behave like other
pfs ioctls using autodetect.
Tomohiro Kusumi [Wed, 15 Apr 2015 14:21:38 +0000 (23:21 +0900)]
sys/vfs/hammer: Try to fix hammer_ioc_pfs_iterate() [1/2]
- The ioctl HAMMERIOC_PFS_ITERATE added in commit
29d31c2d has
several design issues. This commit and the next one try to fix
them. Since it's been exposed to userspace, some of them are
left as it is with comments.
- The name hammer_ioc_pfs_iterate::pos (pi->pos) is misleading.
It should have been 'pfs_id'. Users will have no idea what
the 'pos' is supposed to be.
- pi->pos is unsigned.
- Don't shift pi->pos (Don't ip localize pi->pos). Copy it to a
local variable and then shift that.
- cursor.key_end fields are necessary only when iterating btree.
This function has 'iterate' in its name but all it does is
a single btree lookup.
- Don't |= HAMMER_PFSD_DELETED with pi->head.flags. pi->head.flags
is for HAMMER_IOC_XXX macros, but not for ondisk pfs status
(it was lucky PFSD_DELETED does not conflict with those values).
Users get pfs status from cursor.data->pfsd.mirror_flags copied
to userspace. libhammer code that is based on this wrong flag
checking is fixed accordingly.
- Check if pi->ondisk is allocated.
- Copy ondisk pfs data regardless of ondisk pfs delete flag bit.
The delete flag doesn't mean the data is gone.
Tomohiro Kusumi [Tue, 14 Apr 2015 14:48:30 +0000 (23:48 +0900)]
sbin/hammer: Add missing free(3) and relpfs()
- Add missing free(3) for mirror buffer and relpfs() to release pfs.
Tomohiro Kusumi [Tue, 14 Apr 2015 14:30:40 +0000 (23:30 +0900)]
sbin/hammer: Add missing free(3)
- Add missing free(3) for a return value of read_mrecord().
Tomohiro Kusumi [Tue, 14 Apr 2015 13:42:21 +0000 (22:42 +0900)]
sbin/hammer: Remove unnecessary strndup(3)
- user string is relative to host string, not filesystem string.
Tomohiro Kusumi [Tue, 14 Apr 2015 10:06:24 +0000 (19:06 +0900)]
sys/vfs/hammer: Add comments on ip localization of @@PFS symlink
- The userspace hammer command shows "You are attempting to access
a PFS softlink from a PFS..." and exit(1) whenever one tries to
make a PFS from non root fs directory.
- This restriction by userspace ensures @@PFS symlinks always belong
to the root fs, in other words ip localization of those symlinks
are always 0. HAMMER's kernel code doesn't impose this restriction
on pfs, but userspace does.
John Marino [Fri, 17 Apr 2015 08:06:03 +0000 (10:06 +0200)]
gcc50: Upgrade to GCC 5.1 release candidate plus
while here:
* remove 4+ Mb of unused texi files from contrib
* update the 3 man pages from Release candidate
* Change makefiles to not take man pages from contrib directory
After thinking about it, I've decided to continue to update GCC from
Subversion sources rather than limit updates to designated releases. This
is the reason the man pages are not taken from contrib; they are only
present in actual releases and not the SVN repository. The plan is to
only update the man pages when GCC minor version is released.
This is the first (and likely only) release candidate for GCC5. It will
be known as gcc 5.1.0, but CCVER will remain at "gcc50" regardless if the
version of gcc is 5.1.1 or 5.4.2. This includes changes up to SVN 222168
(April 17).
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.