Rui Paulo [Fri, 19 Feb 2010 10:49:23 +0000 (10:49 +0000)]
Initial version of if_alloc()/if_free().
Rui Paulo [Thu, 18 Feb 2010 18:35:54 +0000 (18:35 +0000)]
Second pass at converting the net80211 to DragonFly.
Rui Paulo [Thu, 18 Feb 2010 18:25:55 +0000 (18:25 +0000)]
Add a new file to struct pkthdr: wlan_seqno to store the IEEE 802.11 seq
number.
Rui Paulo [Thu, 18 Feb 2010 18:14:12 +0000 (18:14 +0000)]
Add if_transmit() from FreeBSD. Breaks ABI.
Rui Paulo [Thu, 18 Feb 2010 18:07:27 +0000 (18:07 +0000)]
Prevent foot shooting.
Rui Paulo [Thu, 18 Feb 2010 18:03:05 +0000 (18:03 +0000)]
Add if_l2com to struct ifnet. This breaks ABI.
Rui Paulo [Thu, 18 Feb 2010 18:02:13 +0000 (18:02 +0000)]
Add ifnet_byindex() and ifaddr_byindex().
Rui Paulo [Thu, 18 Feb 2010 14:42:11 +0000 (14:42 +0000)]
First pass at converting the net80211 infrastrcture from FreeBSD.
Rui Paulo [Thu, 18 Feb 2010 14:04:15 +0000 (14:04 +0000)]
Add memmove() to libkern.
Rui Paulo [Thu, 18 Feb 2010 13:52:08 +0000 (13:52 +0000)]
Add AF_IEEE80211.
Rui Paulo [Thu, 18 Feb 2010 13:32:09 +0000 (13:32 +0000)]
Add strcasecmp() and strncasecmp().
We can't copy the userland implementation because tolower(9) is an
evil macro that has bad side effects. Cf FreeBSD log for this file
Rui Paulo [Thu, 18 Feb 2010 13:02:44 +0000 (13:02 +0000)]
add more protocol specific m_flag bits
Rui Paulo [Thu, 18 Feb 2010 12:43:30 +0000 (12:43 +0000)]
add new ieee80211 interface media types
Rui Paulo [Wed, 17 Feb 2010 19:28:28 +0000 (19:28 +0000)]
my config
Rui Paulo [Wed, 17 Feb 2010 18:54:55 +0000 (18:54 +0000)]
update to latest freebsd version
Matthew Dillon [Wed, 17 Feb 2010 08:16:57 +0000 (00:16 -0800)]
kernel - SWAP CACHE part 21/many - more manual page adjustments
* Explain data caching issues with NFS
Matthew Dillon [Wed, 17 Feb 2010 07:52:14 +0000 (23:52 -0800)]
kernel - SWAP CACHE part 20/many - add 'cache' and 'noscache' chflags.
* Allow directory hierarchies to be selected for data caching when
using vm.swapcache.data_enable.
* Add the vm.swapcache.use_chflags sysctl which defaults to ON and
enables use of the new chflags flags to determine what directory
trees the swapcache will cache data from.
* Add chflags cache and noscache. The flags are tracked recursively
by the namecache and do *NOT* have to be set recursively in the
directory tree. Setting a flag in a top-level directory is sufficient
to cover the entire subtree.
chflags cache - Any regular file in the subtree will be cached
by swapcache.
chflags noscache - Disables any swapcacheing of data in the subtree,
overrides any use of chflags cache in the subtree.
NOTE: Only applies to file data. The caching of file meta-data by
swapcache is controlled globally by vm.swapcache.meta_enable and
ignores chflags flags..
* Adjust the manual pages for swapcache and chflags.
* NOTE! The default has been changed to require the use of chflags, data
caching will not occur unless you either turn off the
vm.swapcache.use_chflags sysctl (which enables data caching globally)
or do something like 'chflags cache /'. Of course vm.swapcache.read_enable
must also be turned on for swapcache to cache file data.
* NOTE! World must be rebuilt for libc, chflags, and ls to understand the
new flags.
Matthew Dillon [Tue, 16 Feb 2010 19:27:55 +0000 (11:27 -0800)]
kernel - tmpfs - Remove warning message on mount, update manual page
* Remove the warning message on mount.
* Improve the manual page.
YONETANI Tomokazu [Tue, 16 Feb 2010 03:15:19 +0000 (12:15 +0900)]
kernel - use matching type for res; this fixes x86_64 build
Matthew Dillon [Mon, 15 Feb 2010 21:43:27 +0000 (13:43 -0800)]
boot2 - Fix ufs inode cache corruption when ESC'ing out of boot2
* Increase boot2_dmadat->secbuf[] from 512 to 2K to cover the
disklabel64.
* ufs_init() needs to reset its inode cache
Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Aggelos Economopoulos [Mon, 15 Feb 2010 18:48:58 +0000 (20:48 +0200)]
evtr: modularize debug output
Sascha Wildner [Mon, 15 Feb 2010 17:34:32 +0000 (18:34 +0100)]
newfs.8: Remove tmpfs.8 MLINK.
It seems it was created for former SunOS users (according to FreeBSD's
commit msg) and, more important, it shadowed tmpfs.5 when only
'man tmpfs' was entered.
Matthew Dillon [Mon, 15 Feb 2010 17:32:27 +0000 (09:32 -0800)]
kernel - Fix issue w/ buffer ortation when doing non-blocking read from bpf
* Non-blocking reads from a BPF device not in immediate mode would not
rotate the buffers even if the was data in the store buffer, but not in
the hold buffer. So until the store buffer fills up, the reads would
return -1 and set errno to EWOULDBLOCK.
Submitted-by: Guy Harris <guy@alum.mit.edu>
Taken-from: FreeBSD
Aggelos Economopoulos [Mon, 15 Feb 2010 12:28:07 +0000 (14:28 +0200)]
evtranalyze: add summary command and refactor interval code
Allow the user to specify a time interval in miliseconds. Coupled
with the summary command, this makes it easy to select a subset of
the events for the svg command.
Also fix the svg code to not assume there are always 5 threads
with activity.
Add a new option to the svg command to write to a different path
(the default remains "output.svg").
Aggelos Economopoulos [Mon, 15 Feb 2010 12:06:23 +0000 (14:06 +0200)]
libevtr: handle eof properly
Matthew Dillon [Mon, 15 Feb 2010 07:00:46 +0000 (23:00 -0800)]
kernel - ACPI - Fix missing unlocks in error path in acpi_ec
* Add missing unlocks
Submitted-by: Edward O'Callaghan
Matthew Dillon [Mon, 15 Feb 2010 05:37:01 +0000 (21:37 -0800)]
kernel - acpi - fix thermal thread loop
* The thermal thread was sleeping in tzpool with the thermal lock held,
causing anyone trying to use the lock (e.g. apm) to block for very
long periods of time (sometimes forever).
* Properly drop the lock when sleeping.
Matthew Dillon [Mon, 15 Feb 2010 04:56:17 +0000 (20:56 -0800)]
kernel - Video - Add suppor for Intel IGD chipsets (netbook / N450 etc)
* Add support for Intel Pinetail graphics chips, PCI ids 0xA0018086
and 0xA0118086.
* Tested on Gateway netbook LT2104u. Works just dandy.
* NOTE: Xorg may require 'Option "FramebufferCompression" "off"' in
the Device section of your xorg.conf.
Taken-from: FreeBSD bug report kern/143427
Author: msumida@mvc.biglobe.ne.jp
Sascha Wildner [Sun, 14 Feb 2010 23:55:04 +0000 (00:55 +0100)]
alc(4): Bring in a manual page too (from FreeBSD).
Matthew Dillon [Sun, 14 Feb 2010 23:53:28 +0000 (15:53 -0800)]
kernel - Add atomic_readandclear_int()
* Add atomic_readandclear_int() to support if_alc and future
uses.
Matthew Dillon [Sun, 14 Feb 2010 23:52:06 +0000 (15:52 -0800)]
netif - alc driver port - Finishing touches
* Fix minor logic differences between FreeBSD and DragonFly.
* Finishing touches and basic testing.
Matthew Dillon [Sun, 14 Feb 2010 23:42:08 +0000 (15:42 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Sascha Wildner [Sun, 14 Feb 2010 22:41:48 +0000 (23:41 +0100)]
getnetconfig(3): Remove a temporary warning.
Constantine A. Murenin [Sun, 14 Feb 2010 22:38:03 +0000 (17:38 -0500)]
kate.4 && km.4: improve synopsis
Matthew Dillon [Sun, 14 Feb 2010 22:22:00 +0000 (14:22 -0800)]
kernel - VM PAGER part 2/2 - addendum, fix compile time issue w/ext2
* Remove unused variable.
Sascha Wildner [Sun, 14 Feb 2010 22:06:19 +0000 (23:06 +0100)]
Sync hifn(4) documentation with FreeBSD, too.
Matthew Dillon [Sun, 14 Feb 2010 21:38:48 +0000 (13:38 -0800)]
netif - alc driver port - Initial work by Samuel J. Greear
Submitted-by: "Samuel J. Greear" <sjg@evilcode.net>
Taken-From: FreeBSD
Matthew Dillon [Sun, 14 Feb 2010 19:37:31 +0000 (11:37 -0800)]
disklabel[32,64] utilities - Change the default disklabel program
* 'disklabel' is now the 64-bit disklabel program.
* The 32 bit disklabel program can be accessed via 'disklabel32'
* The 64 bit disklabel program can also be accessed via 'disklabel64'
Matthew Dillon [Sun, 14 Feb 2010 19:16:40 +0000 (11:16 -0800)]
disklabel64 utility - Allow pbase/pstop to be slice-relative-unaligned
* The kernel will now create 64-bit labels whos pbase/pstop are not
aligned slice-relative, in order to align them physically.
* Adjust the disklabel64 utility to allow pbase/pstop to be unaligned,
but still require the offset and size fields in the partition defs to
be aligned (relative to pbase).
Matthew Dillon [Sun, 14 Feb 2010 18:57:27 +0000 (10:57 -0800)]
kernel - disklabel64 - Adjust partition base to be physically aligned
* When creating a new pristine label the kernel will align the
partition base to the physical drive instead of to the logical
slice.
This is to accomodate fdisk/slice setups which do not align the
slice properly (which is nearly all of them).
Matthew Dillon [Sun, 14 Feb 2010 16:34:57 +0000 (08:34 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 14 Feb 2010 16:29:10 +0000 (08:29 -0800)]
kernel - VM PAGER part 2/2 - Expand vinitvmio() and vnode_pager_alloc()
* vinitvmio() is responsible for assigning the initial VM object size based
on the file size. Adjust vinitvmio() to conform to the new nvextendbuf()
and nvtruncbuf() API.
* vinitvmio() has been given two additional parameters, blksize and boff,
to allow it to determine how much larger the VM object must be relative
to the byte-granular file size passed to it.
* Remove vm_page_alloc() and remove the pgo_alloc vector from struct
pagerops. Convert all the VM pager allocation procedures into global
procedures which are called directly. Trying to feed everything through
a single function was a joke when all the callers knew precisely what
kind of VM object they were creating anyway.
Add the extra arguments to vnode_pager_alloc() which vinitvmio() needs
to pass in.
Alex Hornung [Sat, 23 Jan 2010 09:53:22 +0000 (09:53 +0000)]
hifn - Update and unbreak
* Update hifn to current FreeBSD status except for vulcan support.
* This should also fix current issues where hifn doesn't really work.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1638
Reported-by: Thomas Nikolajsen
Obtained-from: FreeBSD
Jan Lentfer [Fri, 5 Feb 2010 06:32:02 +0000 (07:32 +0100)]
wpa_supplicant/hostapd: Added some missing patches.
Jan Lentfer [Thu, 4 Feb 2010 15:57:55 +0000 (16:57 +0100)]
wpa_supplicant/hostapd: Update to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 12:26:03 +0000 (13:26 +0100)]
hostapd: Update vendor branch to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 08:37:41 +0000 (09:37 +0100)]
wpa_supplicant: update vendor branch to 0.6.10
Jan Lentfer [Wed, 3 Feb 2010 11:50:47 +0000 (12:50 +0100)]
hostpad: Update to work without version tag
Jan Lentfer [Wed, 3 Feb 2010 10:45:18 +0000 (11:45 +0100)]
hostapd: remove version tag from directory
Jan Lentfer [Wed, 3 Feb 2010 10:23:03 +0000 (11:23 +0100)]
wpa_supplicant: Update to work without verision tag
Jan Lentfer [Wed, 27 Jan 2010 21:55:51 +0000 (22:55 +0100)]
wpa-supplicant: remove version tag from directory
Constantine A. Murenin [Sun, 14 Feb 2010 08:57:54 +0000 (03:57 -0500)]
kate(4): put missing \n into device_printf(9) calls
Constantine A. Murenin [Sun, 14 Feb 2010 08:49:56 +0000 (03:49 -0500)]
test commit
Matthew Dillon [Sun, 14 Feb 2010 02:09:49 +0000 (18:09 -0800)]
kernel - VM PAGER part 1/2 - Remove vm_page_alloc()
* Break out the individual VM object allocation functions and remove
the vm_pager_alloc() ops vector.
* This is in preparation for giving the vnode_pager_alloc() some
additional arguments to match recent buffer cache work.
Matthew Dillon [Sun, 14 Feb 2010 01:31:19 +0000 (17:31 -0800)]
kernel - TMPFS - Stabilization pass, fix vnode list corruption
* Clean up tn_size when destroying a VLNK node.
* Interlock the vnode while holding the node lock before calling
vget() to prevent it from being ripped out from under the vget().
Then re-test that the relationship between the tmpfs node and
vnode holds.
* Minor formatting cleanup in the same area.
Matthew Dillon [Sun, 14 Feb 2010 01:30:02 +0000 (17:30 -0800)]
kernel - Cleanup, add assertions in the vnode freeing path
* Remove debug kprintf: "Warning ncp ... deadlock avoided".
* Add assertions on the vnode flag state when adding and removing
from the freelist, or when dtor() is called by the backing store.
Sascha Wildner [Sat, 13 Feb 2010 18:18:49 +0000 (19:18 +0100)]
kate.4 & km.4: Silence 'make manlint' warnings.
Matthew Dillon [Sat, 13 Feb 2010 17:41:33 +0000 (09:41 -0800)]
kgdb - Fix kernel trapframe backtraces for x86_64
* Bring in same infrastructure that i386 uses
* Make the stack trace cross the "trapframe" frame properly.
Matthew Dillon [Sat, 13 Feb 2010 17:23:33 +0000 (09:23 -0800)]
kernel - More readdirplus deadlock avoidance work
* Add cache_nlookup_nonblock() and nfs_nget_nonblock()
* Adjust the readdirplus code to use the new functions. Basically
there are too many locks being held by callers and then readdirplus
goes and tries to acquire (and lock) nodes for the directory elements
on top of that, leading to deadlocks.
Attempts to order the locks have failed so now we just use a
non-blocking approach since the readdirplus entries are all
advisory anyway.
Sascha Wildner [Sat, 13 Feb 2010 17:07:04 +0000 (18:07 +0100)]
installer: Fix the check for partitions <50GB a bit more.
/boot or swap could have '*' for size too, in theory.
Sascha Wildner [Sat, 13 Feb 2010 16:44:02 +0000 (17:44 +0100)]
installer: Raise the size proposal for /boot to 768M for HAMMER installs.
Rewrite the algorithm for calculating size recommendations to be a bit
more flexible, especially with smaller disks (as in VMs e.g.). It should
always give a valid set now.
/boot tries to be 768M if space permits. This way several kernels and
module directories can comfortably fit on it.
Reported-by: many
While I'm here, fix another issue regarding HAMMER installs:
The check for filesystems <50GB wasn't working at all. Fix and improve it.
Instead of checking only the root filesystem, check the sizes of all HAMMER
filesystems created. If a HAMMER filesystem <50GB has been encountered,
display a warning similar to hammer_newfs(8) and allow the user to either
confirm or cancel.
Constantine A. Murenin [Sat, 13 Feb 2010 04:05:19 +0000 (23:05 -0500)]
kate(4) and km(4): temperature sensors for AMD Family 0Fh, 10h and 11h AMD64 processors
Constantine A. Murenin [Sat, 13 Feb 2010 07:53:01 +0000 (02:53 -0500)]
pcidevs: unbreak
a75ee873 from 2009-10-04 (geode/cs5536)
Aggelos Economopoulos [Sat, 13 Feb 2010 13:32:50 +0000 (15:32 +0200)]
libevtr: fix warnings
Aggelos Economopoulos [Sat, 13 Feb 2010 13:00:24 +0000 (15:00 +0200)]
evtranalyze: fix sloppy format strings
Patch-by: nant@
Aggelos Economopoulos [Sat, 13 Feb 2010 12:49:12 +0000 (14:49 +0200)]
ktrdump: always sort entries when dumping
Also remove duplicate setting of rflag in ktrdump -a.
Aggelos Economopoulos [Sat, 13 Feb 2010 12:35:15 +0000 (14:35 +0200)]
evtr: dump core frequencies and use them to print timestamps in usecs
This commit dumps the same frequency for each core; there's no
point supporting different frequencies unless we monitor frequency
change events. We use the frequency to print out relative timestamps
in microseconds. This relies on ktrdump having done correct sorting.
Aggelos Economopoulos [Sat, 13 Feb 2010 12:31:30 +0000 (14:31 +0200)]
libevtr: fix thinko
Aggelos Economopoulos [Fri, 12 Feb 2010 20:17:40 +0000 (22:17 +0200)]
evtranalyze: correct a couple of filtering bugs
Sascha Wildner [Sat, 13 Feb 2010 12:31:34 +0000 (13:31 +0100)]
Put evtranalyze and ktrdump in the already existing i386 check.
Matthew Dillon [Sat, 13 Feb 2010 10:02:16 +0000 (02:02 -0800)]
test utilities - eatmem.c - Change size parameter from int to size_t
* Allows large multi-gigabyte allocations on 64-bit boxes
Matthew Dillon [Sat, 13 Feb 2010 09:58:02 +0000 (01:58 -0800)]
kernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling
* vm_page_set_validdirty() needs to flag the underlying object or
the vfsync() code for the vnode will not know that its dirty.
* Any paging activity has to sync to swap because the kernel marks the
VM pages as clean afterwords even if we [re]dirty them during the I/O.
Testing the uio for UIO_NOCOPY is sufficient to detect when a tmpfs_write()
is due to VM paging or not.
This fixes vnode recycling - where the data is forced out to swap, and
later can be paged back in, as well as paging due to memory pressure.
Matthew Dillon [Sat, 13 Feb 2010 08:01:13 +0000 (00:01 -0800)]
kernel - swapcache - vm_object_page_remove()
* vm_object_page_remove() may have to act on swap-backing for the VM
object even if it contains no resident VM pages.
Matthew Dillon [Sat, 13 Feb 2010 07:57:53 +0000 (23:57 -0800)]
kernel - TMPFS - Bug fixing pass - vinitvmio(), umount, readdir
* Call vinitvmio() with a properly bufcache-aligned number of pages
* Do not call vinitvmio() for symlinks or directories (we don't use
the buffer cache for those vnode types).
* Adjust tmpfs_dir_attach() and tmpfs_dir_detach() so the detach
code can be called from umount, and call it from umount to fix
a panic.
* tmpfs_dir_getdotdotdent() needed to be adjusted to handle the
root vnode's NULL parent pointer. Fixed empty root directories
for the mount.
* Acquire TMPFS_NODE_LOCK() around opreations on dnode->tn_dir.tn_dirhead.
Matthew Dillon [Sat, 13 Feb 2010 06:45:23 +0000 (22:45 -0800)]
kernel - TMPFS - Bug fixing pass - fsync, vnode locks
* tmpfs_fsync() needs to have a couple of special cases to properly deal
with the backing store.
(1) When unmounting any vnode or recycling a dead vnode the backing
store can be destroyed.
(2) When recycling a live vnode the OS is trying to free the vnode,
meaning also free up the buffer cache for that vnode. tmpfs must
sync the data to swap backing store.
(3) Otherwise fsync can be ignored. We don't want to force data into
swap.
* The DragonFly kernel handles nearly all vnode and namespace locking
for VFSs. If tmpfs tries to do its own it will cause deadlocks.
At the moment we are not running MPSAFE but ultimately we will have
to do a pass to properly lock tmpfs_nodes during operations.
Matthew Dillon [Sat, 13 Feb 2010 06:16:35 +0000 (22:16 -0800)]
kernel - TMPFS - Bug fixing pass - directory hierarchy
* Adjust parent linkages for directories. The root node's parent
linkage is now set to NULL instead of a self-reference. The
root node is given just one extra link count to hold it instead
of two.
* List operations on tmpfs_mount->tn_entries are now protected
by TMPFS_LOCK.
* Hold a node locked when calling tmpfs_free_node(). The function
will eat the lock.
* Do a better job cleaning up dirent and node structures when freeing.
The ctor function is only called on backing store allocations, not
on frontend objcache allocations.
Misinitialized previously freed structures created some amount of
havoc.
* Remove unnecessary critical sections.
* Refactor the umount code to properly clean up all nodes, and in
the correct order. Remove tmpfs_free_node() hacks that tried
to allow out-of-order removal.
Matthew Dillon [Sat, 13 Feb 2010 06:06:06 +0000 (22:06 -0800)]
kernel - fix bug in objcache_destroy()
* objcache_destroy() calls mag_purge() which cycles the critical
section, except objecache_destroy() never entered into a critical
section so this panics instead.
Matthew Dillon [Sat, 13 Feb 2010 03:15:21 +0000 (19:15 -0800)]
kernel - TMPFS - Bug fixing pass
* TMPFS_ASSERT_ELOCKED() is called in numerous places where
tn_vnode is not necessarily assigned, for example during
tmpfs_nremove() after the directory entry has been cleaned out.
Remove the assertion that tn_vnode != NULL.
* Add tmpfs_mount->tm_flags and TMPFS_FLAG_UNMOUNTING, used during
unmounting to tell tmpfs_fsync() to throw away the contents of
the file (normally it ignores it). This fixes a panic on umount
when the main kernel checks that all dirty buffers have been
cleaned out.
* Fix two places where the wrong length for a string is
being kmalloc()'d. The softlink and the directory entry
string allocations were wrong and resulted in a string
terminator being stuffed beyond the end of the malloced
buffer.
* Do a safety-NULL-out of a few fields after kfree()ing them.
* Refactor tmpfs_dir_lookup() a little.
* Enhance tmpfs_reg_resize() to also resize the SWAP VM object.
Failing to do so can leave extranious swap assignments for
deleted areas of the file which become visible again (instead
of becoming zero-fill) if the file is then later ftruncate()d
larger.
Also fix the block size parameters to nvtruncbuf() and nvextendbuf().
It must match the block size used for the buffer cache.
* Temporarily turn off all the MPSAFE flags. Run under the BGL.
* The buffer offset (offset) in tmpfs_read() and tmpfs_write()
can be a size_t. It does not have to be off_t.
* tmpfs_write() was using getblk(). It actually has to use bread()
in order to ensure that the buffer contents is valid when potentially
doing a piecemeal write which does not cover the whole buffer.
* Refactor tmpfs_write() to leave the underlying VM pages dirty,
except in cases the system page daemon wants to flush pages to
clear space in ram (IO_SYNC, IO_ASYNC). Use buwrite() to do this.
* Fix an error path in tmpfs_strategy() which was not biodone()ing
the bio.
* tmpfs_remove() was making assumptions with regards to v->a_nch.ncp->nc_vp
which were not correct. The vp is not referenced and can get ripped
out from under the caller unless properly handled.
* Fix sequencing in tmpfs_inactive(). If tn_links is 0 and the node
is not in the middle of being allocated we can destroy it.
* Remove unnecessary vnode locks from tmpfs_reclaim(). There are also other
vnode locks scattered around that aren't needed (for another time).
* Implement vop_bmap(), it is basically a dummy.
Matthew Dillon [Sat, 13 Feb 2010 03:11:36 +0000 (19:11 -0800)]
kernel - TMPFS - Add infrastructure to main kernel to help support TMPFS
* Add buwrite(), similar to bdwrite() except it fakes the write,
marks the pages as valid and dirty, and returns them to the VM
system leaving the buffer cache buffer clean.
This is used by tmpfs in tmpfs_write() and allows the entire VM page
cache to be used to cache dirty tmpfs data instead of just the
buffer cache.
Also add vm_page_ste_validdirty() to suppor buwrite().
* Implement MNTK_SG_MPSAFE for future use by tmpfs.
* Fix a bug in swap_strategy(). When the entire block being
requested is sparse (has no swap assignments) the function
was not properly biodone()'ing the original bio after
zero-filling the space.
Matthew Dillon [Fri, 12 Feb 2010 21:46:28 +0000 (13:46 -0800)]
kernel - TMPFS - Initial port of NetBSD's tmpfs
* This is the initial pre-stabilization port of NetBSD's tmpfs,
by Naoya Sugioka.
Submitted-by: Naoya Sugioka <naoya.sugioka@gmail.com>
Matthew Dillon [Fri, 12 Feb 2010 21:35:18 +0000 (13:35 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Antonio Huete Jimenez [Fri, 12 Feb 2010 19:15:04 +0000 (20:15 +0100)]
hammer - Take in account edition preferences.
For viconfig directive, $EDITOR and/or $VISUAL were not
taken in account, forcing the editor to vi.
Joe Talbott [Fri, 12 Feb 2010 18:42:32 +0000 (13:42 -0500)]
VOP_CLOSE(9) - Remove ucred and proc arguments to VOP_CLOSE().
Matthew Dillon [Fri, 12 Feb 2010 04:54:05 +0000 (20:54 -0800)]
kernel - SWAP CACHE part 19/many - distinguish bulk data in HAMMER block dev
* Add buf->flags/B_NOTMETA, vm_page->flags/PG_NOTMETA. If set the pages
underlying the buffer will not be considered meta-data from the
point of view of the swapcache.
* HAMMER must sometimes access bulk data via the block device instead of
via a file vnode. For example, the reblocking and mirroring code.
We do not want this data to be misinterpreted as meta-data when
the meta-data-only swapcache is turned on, otherwise it will blow
out the actual meta-data in the swapcache.
HAMMER_RECTYPE_DATA and HAMMER_RECTYPE_DB are considered normal data.
All other record types (e.g. direntry, inode, etc) are meta-data.
Matthew Dillon [Fri, 12 Feb 2010 04:51:49 +0000 (20:51 -0800)]
utilities - Temporary map out libevtr, ktrdump, and evtranalyze from x86_64
* Temporary adjustments to unbreak buildworld
Matthew Dillon [Thu, 11 Feb 2010 20:45:39 +0000 (12:45 -0800)]
kernel - SWAP CACHE part 18/many - Minor enablement swapspace check
* The swapcache is considered disabled if no swap space has been
configured, even if the swapcache itself is enabled.
Matthew Dillon [Thu, 11 Feb 2010 20:44:21 +0000 (12:44 -0800)]
kernel NFS - Fix another deadlock in the readdirplus code
* Add vn_islocked_unlock() and vn_islocked_relock() to help NFS
temporarily unlock a possibly-locked directory vnode when
trying to instantiate readdirplus children under that directory.
* Fixes a deadlock in NFS.
Matthew Dillon [Thu, 11 Feb 2010 20:40:45 +0000 (12:40 -0800)]
kernel - Fix "cleaned vnode isn't" panic
* Fix the "cleaned vnode isn't" panic. This panic was occuring due to
vrecycle() not checking for a vgone*() recursion.
Adjust vrecycle() to check for the recursion. The recursion can be
detected by testing the VRECLAIMED flag.
* Under certain circumstances hammer_vop_inactive() was calling
vrecycle(). This could cause the underlying vnode to be modified
after it has been destroyed as the recursion returns.
* Add a KKASSERT() in vgone_vxlocked() to detect the condition
earlier if it occurs again.
Matthew Dillon [Thu, 11 Feb 2010 20:38:10 +0000 (12:38 -0800)]
kernel - sysref - Fix vnode interlock for 1->0 transition
* When the vnode refcount drops to 0 vnode_terminate() is called. This
function previously acquired the vx_lock() after the 1->0 transition.
Instead integrate the acquisition of the vx_lock() into the 1->0
transition to close a small MP race.
Matthew Dillon [Thu, 11 Feb 2010 17:24:12 +0000 (09:24 -0800)]
HAMMER Utility - cleanup
* Cleanup pass
Matthew Dillon [Thu, 11 Feb 2010 08:17:33 +0000 (00:17 -0800)]
HAMMER Utility - Clean up histogram code for mirror-stream, handle SKIPs
* Do a cleanup pass, fixing some of the verbose output
* Do not misinterpret SKIP records as REC records when estimating
the transfer size.
* Refactor the histogram array a bit (don't reverse the array).
Matthew Dillon [Thu, 11 Feb 2010 05:13:49 +0000 (21:13 -0800)]
HAMMER Utility - Refactor the histogram code for mirror-stream.
* Refactor the histogram code. This code is responsible for breaking
down a large initial mirroring stream into smaller chunks so the
transaction id can be synced more often. This way if the stream
is interrupted it can be restarted at a more recent point instead
of having to restart further back (or at the beginning).
* Add -S splitsize (default 100MB) to specify the desired breakdown
for the histogram.
Matthew Dillon [Thu, 11 Feb 2010 05:11:37 +0000 (21:11 -0800)]
HAMMER VFS - Feature add to HAMMER_IOC_MIRROR_READ
* Adds the HAMMER_IOC_MIRROR_NODATA flag to HAMMER_IOC_MIRROR_READ.
This flag requests that HAMMER not return the data associated with
b-tree records and may be used to quickly scan the b-tree.
Constantine A. Murenin [Thu, 11 Feb 2010 01:07:42 +0000 (20:07 -0500)]
acpi_thermal(4): temperature support updates
* reverting the last two commits for acpi_thermal.4, since now
complete acpi temperature support is available in sysctl(8)
Constantine A. Murenin [Thu, 11 Feb 2010 01:06:53 +0000 (20:06 -0500)]
sysctl(8): support setting acpi temperature in K, C and F
Obtained-from: FreeBSD (sysctl.c#rev1.94)
Constantine A. Murenin [Wed, 10 Feb 2010 22:45:41 +0000 (17:45 -0500)]
sysctl(8): acpi temperature support for hw.acpi.thermal
Matthew Dillon [Wed, 10 Feb 2010 18:35:32 +0000 (10:35 -0800)]
NTFS VFS - Fix dangling vnode panic on umount
* NTFS was using v_type = VNON for special extent vnodes. The mountlist
scan used by vflush() ignores VNON vnodes so they were left dangling
no matter how hard ntfs tried to flush them out.
* Add VINT to the enum and use that instead.
* Fix minor case/default issue in cd9660 related to the addition of VINT.
Reported-by: Rumko, Tim Bisson <tbisson@gmx.com>
Sascha Wildner [Wed, 10 Feb 2010 14:08:54 +0000 (15:08 +0100)]
fortune(6): fortunes-o is no longer generated. Remove it from CLEANFILES.
Matthew Dillon [Wed, 10 Feb 2010 08:54:00 +0000 (00:54 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 10 Feb 2010 08:45:02 +0000 (00:45 -0800)]
kernel - SMP - "Fix AP #%d (PHY# %d) failed" issues
Ok, here's what is going on. If an SMI interrupt occurs while
an AP is going through the INIT/STARTUP IPI sequence the AP will
brick, and nothing you do will resurrect it.
BIOSes typically set up SMI interrupts when emulating (for example)
a PS/2 keyboard with a USB keyboard, or even if just implementing
BIOS support for a USB keyboard. Even worse, the BIOS may set up
the interrupt to poll at 1000hz. And, EVEN WORSE, it can totally
depend on which USB port you've plugged your keyboard in. And, on top
of all of that, the SMI interrupt is not consistent.
The INIT/STARTUP code contains a 10ms delay (as per Intel spec) between
the INIT IPI and the STARTUP IPI. Well, you can do the math.
In order to reliably boot a SMP system where the BIOS has set up
SMI interrupts this patch uses a nifty bit of code to detect when
the SMI interrupt has occurred and tries to shift the INIT/STARTUP
sequence into a gap between SMI interrupts. If it has to it will
reduce the 10ms spec delay all the way down to 150us. In many
cases we really have no choice for reliable operation. Even a 300uS
delay is too much in the tests I performed on a Shuttle Phenom and
Phenom II cube. I don't honestly know if this will break other SMP
configurations, we'll have to see.
On the particular shuttle I tested on, one of the four USB connections
on the backpanel (the upper left when looking at it from the back)
seemed to cause the BIOS to set up SMI interrupts at a high rate and
caused kernel boots to fail. With this commit those boots now succeed.