Jan Lentfer [Sun, 17 Jan 2010 13:21:39 +0000 (14:21 +0100)]
BIND: enable DNSSEC support for named and related tools by default.
* This adds -DOPENSSL and -lcrypto to effected Makefiles
* This patch also introduces NO_BIND_DNSSEC for make.conf
to disable build of DNSSEC with BIND.
Stathis Kamperis [Sun, 17 Jan 2010 06:44:05 +0000 (08:44 +0200)]
mqueues: Reduce diffs with NetBSD.
No functional change.
Stathis Kamperis [Sat, 16 Jan 2010 21:18:37 +0000 (23:18 +0200)]
mqueues: Fix deadlock situation.
tsleep() doesn't release the per-mqueue exclusive lockmgr lock before sleeping.
We need lksleep() instead.
Reported-by: swildner@
Matthew Dillon [Sat, 16 Jan 2010 20:46:50 +0000 (12:46 -0800)]
kernel - improve panic message on syscall MP mismatch
* Print the callp pointer so we can more easily discern which system
call has MP mismatches when the system asserts.
Matthew Dillon [Sat, 16 Jan 2010 20:42:04 +0000 (12:42 -0800)]
kernel - fix MP lock mismatch in sys_lwp_rtprio()
* sys_lwp_rtprio() was returning in certain cases without releasing
the MP lock.
Reported-by: Sascha Wildner <swildner@crater.dragonflybsd.org>
Peter Avalos [Sat, 16 Jan 2010 06:09:49 +0000 (20:09 -1000)]
Add the HPN patch for OpenSSH.
This provides dynamic windows and the ability to switch to a NONE
encryption cipher after authentication.
This does not include the multi-threaded AES-CTR cipher due to
unresolved problems causing it to hang.
For more details: http://www.psc.edu/networking/projects/hpn-ssh/
Requested-by: Michael Neumann <mneumann@ntecs.de>
Sascha Wildner [Sat, 16 Jan 2010 09:34:09 +0000 (10:34 +0100)]
openssh/auth2.c: Add a missing include (canohost.h).
canohost.h has the prototypes for get_canonical_hostname() and
get_remote_ipaddr(), which are used in auth2.c and which both return
const char * (64 bits on x86_64). Without the prototypes, int is
assumed (32 bits).
This caused sshd(8) to crash on x86_64 (i386 isn't affected due to the
char pointer and int having the same width there).
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1649>
Pointed-out-by: dillon
Sascha Wildner [Sat, 16 Jan 2010 02:32:26 +0000 (03:32 +0100)]
sys_linux_socketcall(): Add missing return() (fixes LINT).
Matthew Dillon [Sat, 16 Jan 2010 01:57:55 +0000 (17:57 -0800)]
kernel - fix sctp build (LINT)
* malloc_init() needs a pre-initialized ks_magic
* Remove unused variables.
Reported-by: Peter Avalos <pavalos@theshell.com>
Matthew Dillon [Sat, 16 Jan 2010 01:50:13 +0000 (17:50 -0800)]
kernel - add UP version for spin_trylock_wr()
* UP version is a degenerate case, used by kern_lock.o
Reported-by: Antonio Huete Jimenez <tuxillo@crater.dragonflybsd.org>
Matthew Dillon [Fri, 15 Jan 2010 23:20:41 +0000 (15:20 -0800)]
HAMMER VFS - Fix umount panic related to volume flush
* A volume undergoing I/O as-of the time of a umount can recurse within
hammer_io_release() due to improper ref-count handling.
* Properly reference and flus hthe volume during umount instead of
trying to call hammer_io_release() directly.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Antonio Huete Jimenez [Fri, 15 Jan 2010 23:10:03 +0000 (00:10 +0100)]
kmalloc(9) - Document M_INTWAIT flag.
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue925>
Reported-by: Michael Neumann <mneumann@ntecs.de>
Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
Stathis Kamperis [Fri, 15 Jan 2010 20:14:26 +0000 (22:14 +0200)]
mqueues: Partially sync with NetBSD.
This fixes the following critical issues:
* An invalid signal number passed to mq_notify() could crash the kernel
upon the signal delivery.
* mq_send() to a full queue could crash the kernel due to NULL pointer
dereference in timeout calculation.
* Likewise for mq_receive() from an empty queue.
Thanks to swildner@ for bringing this into my attention.
Matthew Dillon [Fri, 15 Jan 2010 19:19:29 +0000 (11:19 -0800)]
kernel - linux emulation - fix linux socketcall MP mismatch
* Fix get_mplock()/rel_mplock() mismatch
Reported-by: Rumko
Matthew Dillon [Fri, 15 Jan 2010 19:09:19 +0000 (11:09 -0800)]
kernel - Replace zalloc zones with kmalloc for PCBs
* Use kmalloc to allocate PCBs instead of zalloc. This removes over
100MB of KVA reservation, particularly from inp_tcp.
* Solves an issue with maxfiles where too much KVA was being reserved
by the network for PCBs.
* Replace all SCTP zalloc zones with kmalloc.
Reported-bu: Rumko, Peter Avalos <pavalos@theshell.com>
Antonio Huete Jimenez [Fri, 15 Jan 2010 12:27:57 +0000 (13:27 +0100)]
hammer - A small set of adjustments to the info directive.
* Rename some field's name.
* Add percent to space details.
* Fix line lenght to match style(9) and other minor changes.
Antonio Huete Jimenez [Fri, 15 Jan 2010 10:48:21 +0000 (11:48 +0100)]
hammer.8 - Adjust info section to match current hammer(8) output.
Submitted-by: Sascha Wildner <saw@online.de>
Matthew Dillon [Fri, 15 Jan 2010 05:51:45 +0000 (21:51 -0800)]
kernel - Fix not-quite-nonblocking VX lock in allocfreevnode()
* Introduce LK_NOSPINWAIT to tell lockmgr() to not even spin on the
spinlock if it can't get it immediately.
* There is a lock order reversal between vfs_spin and vp->v_spinlock
where vx_lock_nonblock() can deadlock in allocfreevnode(). Normally
I'd vhold() the vnode but the freelist code is rather fragile and I
don't want to have to vdrop() later on. So instead use LK_NOSPINWAIT
to avoid the situation.
* This is a hack.
Matthew Dillon [Fri, 15 Jan 2010 04:06:31 +0000 (20:06 -0800)]
HAMMER Utility - enhance show-undo
* Print more of the REDO headers in show-undo now that they have been
revamped.
Matthew Dillon [Fri, 15 Jan 2010 04:01:54 +0000 (20:01 -0800)]
HAMMER VFS - hammer_inode / vp races
* The hammer_inode must be locked when clearing the vp during a reclaim
to interlock with a concurrent reclaim.
* hammer_get_vnode() must hold the vp while holding the hammer_inode locked
to prevent destruction when racing against drops or reclaims.
* Remove the HAMMER_INODE_VHELD flag. Backend truncations and the
last inode release should acquire the vnode properly now in
hammer_inode_unloadable_check().
Matthew Dillon [Fri, 15 Jan 2010 04:00:23 +0000 (20:00 -0800)]
kernel - Fix mislocated __vbusy()
* __vbusy(vp) must be called while the vfs_spin lock is held and
atomic with the acquisition of a vnode from the freelist.
* Document the hell out of vfs_lock.c
Matthew Dillon [Fri, 15 Jan 2010 03:59:09 +0000 (19:59 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 15 Jan 2010 03:55:29 +0000 (19:55 -0800)]
kernel - Increase default kern.maxfiles from (maxproc * 2) to (maxproc * 16).
* Increases maxfiles from approximately ~12K to around ~100K on
systems with moderate amounts of memory.
Reported-by: Peter Avalos <pavalos@theshell.com>
Matthew Dillon [Fri, 15 Jan 2010 03:45:18 +0000 (19:45 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 15 Jan 2010 03:40:14 +0000 (19:40 -0800)]
kernel - Improve VM fault performance for sequential access
* VM fault I/O pipelining was not working properly.
* Temporarily fix pipelining by introducing PG_RAM, A read-ahead mark
for vm_page_t, and adjust vm_fault to pass VM pages through to
getpages calls if PG_RAM is set, even if they are fully valid.
* Remove code in vnode_pager_generic_getpages() which shortcutted
the operation when the requested page was fully valid. This
prevented read-aheads from being issued.
* A more permanent solution is in the works (basically getting rid of
the whole VM read-ahead/read-behind array entirely, just passing
a single page through to vnode_pager_generic_getpages(), and
letting the filesystem handle the read-ahead in a more efficient
fashion.
Reported-by: "Mikhail T." <mi+thun@aldan.algebra.com>
Matthew Dillon [Fri, 15 Jan 2010 03:43:38 +0000 (19:43 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 15 Jan 2010 03:40:14 +0000 (19:40 -0800)]
kernel - Improve VM fault performance for sequential access
* VM fault I/O pipelining was not working properly.
* Temporarily fix pipelining by introducing PG_RAM, A read-ahead mark
for vm_page_t, and adjust vm_fault to pass VM pages through to
getpages calls if PG_RAM is set, even if they are fully valid.
* Remove code in vnode_pager_generic_getpages() which shortcutted
the operation when the requested page was fully valid. This
prevented read-aheads from being issued.
* A more permanent solution is in the works (basically getting rid of
the whole VM read-ahead/read-behind array entirely, just passing
a single page through to vnode_pager_generic_getpages(), and
letting the filesystem handle the read-ahead in a more efficient
fashion.
Reported-by: "Mikhail T." <mi+thun@aldan.algebra.com>
Stathis Kamperis [Thu, 14 Jan 2010 21:27:24 +0000 (23:27 +0200)]
mqueues: Remove duplicate code.
A note that missed from my previous commit:
In issue 6, mq_timed{send, receive}() were optionally expected to return
EINVAL upon an invalid timeout request, if the calling process|thread would
have blocked.
In issue 7 this is now mandatory.
Original-bug-reported-by: swildner@
Stathis Kamperis [Thu, 14 Jan 2010 20:06:03 +0000 (22:06 +0200)]
mqueues: Return EINVAL upon invalid timeout request.
Matthew Dillon [Thu, 14 Jan 2010 17:27:39 +0000 (09:27 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Sascha Wildner [Thu, 14 Jan 2010 05:21:20 +0000 (06:21 +0100)]
librt: Add missing MLINKS.
Matthew Dillon [Wed, 13 Jan 2010 18:58:50 +0000 (10:58 -0800)]
kernel - fifofs - Fix missing token releases
* Forgot to release the vfs_token in several places.
Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Matthew Dillon [Wed, 13 Jan 2010 18:58:50 +0000 (10:58 -0800)]
kernel - fifofs - Fix missing token releases
* Forgot to release the vfs_token in several places.
Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Matthew Dillon [Wed, 13 Jan 2010 00:01:00 +0000 (16:01 -0800)]
HAMMER VFS - REDO implementation base code part 4/many
* Wait for BIOs to finish before issuing the media sync. Previously we
were issuing the media sync concurrently which worked only because
the operation was serialized by the disk driver.
This change has no effect on performance.
* For fsync mode 3 wait for BIOs to finish so the data is guaranteed
to at least be in the drive cache.
* Collapse hammer_io_wait_firm() into hammer_io_wait_all()
* Pipeline hammer_io_wait_all(). Instead of waiting for the running_io
count to hit 0, which can cause us to wait longer then necessary when
multiple entities are dirtying buffers, we now place all running I/Os
on a list along with a dummy entry for the waiter. When the dummy entry
becomes the head of the list the waiter returns.
This way new I/O's initiated during the wait do not contribute to
the wait.
In particular this will improve fsync() operations which can flush the
UNDO/REDO FIFO in parallel with a full meta-data flush.
Matthew Dillon [Tue, 12 Jan 2010 22:55:41 +0000 (14:55 -0800)]
HAMMER VFS - REDO implementation base code part 3/many (addendum2)
* I/O interlock required when flushing UNDOs because REDOs can now
be entered without holding the sync_lock.
* We have to cache the UNDO/REDO FIFO's next index before flushing
in case additional entries are created while we are finishing up
the flush.
Reported-by: Jan Lentfer <lentferj@crater.dragonflybsd.org>
Matthew Dillon [Tue, 12 Jan 2010 20:04:21 +0000 (12:04 -0800)]
HAMMER VFS - REDO implementation base code part 3/many (addendum)
* Add missing B_VFSFLAG1 to sys/buf.h
Matthew Dillon [Tue, 12 Jan 2010 04:46:08 +0000 (20:46 -0800)]
HAMMER VFS - REDO implementation base code part 3/many
* Track the oldest potentially uncommitted UNDO/REDO FIFO offset
on an inode-by-inode basis and use a red-black tree to find
the aggregate oldest offset.
* If REDOs are present generate a REDO SYNC entry in the UNDO/REDO FIFO
within the recovery span which indicates to the recovery code how
far out of the span it must go to process REDOs.
* Fix a bug in hammer_generate_redo() where the REDO would not be
generated if the data length was 0 (SYNC records use a data length
of 0 as a degenerate case).
* Print the REDO SYNC entries on the console if bit 2 is set in
vfs.hammer.debug_io (0x04).
* NOTE: The recovery code does not yet process REDOs.
Matthew Dillon [Tue, 12 Jan 2010 00:09:51 +0000 (16:09 -0800)]
HAMMER VFS - REDO implementation base code part 2/many
* Move hammer_generate_redo() to its own source file, hammer_redo.c
* Fix bug in the REDO generation. The tail type was not set the same
as the head type and caused recoveries to fail.
* Flesh out the REDO sequencing by adding REDO_TERM_* records during the
meta-data flush, allowing REDO_WRITEs and REDO_TRUNCs to be matched
against REDO_TERM_WRITEs and REDO_TERM_TRUNCs.
* Interlock the writing of the root volume in the flusher. Frontend
code modifies the root volume when generating REDO records and
can collide with the flusher.
Matthew Dillon [Mon, 11 Jan 2010 23:53:32 +0000 (15:53 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Jan Lentfer [Mon, 11 Jan 2010 19:20:07 +0000 (20:20 +0100)]
uchcom: Fix panic when accessing a ucom device based on uchcom
The panic was due to uchcom_param arg being always NULL,
since ucom->sc_parent wasn't initialized properly.
All other usb serial drivers also seem to do it this way.
Sascha Wildner [Mon, 11 Jan 2010 15:56:27 +0000 (16:56 +0100)]
Fix kernel build without INET6.
With the addition of -Werror, some minor issues crept up.
The only issue left is that building with 'options SCTP' and without
'options INET6' is broken still (and was before -Werror), since our
SCTP code doesn't #ifdef out enough. But as our SCTP support is quite
old and has never been updated (and I don't plan to do so), I'll leave
it at that.
Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1646>
Matthew Dillon [Mon, 11 Jan 2010 00:19:56 +0000 (16:19 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 11 Jan 2010 00:17:47 +0000 (16:17 -0800)]
HAMMER utility - Fix bug in hammer cleanup which causes the utility to exit
* Remove debugging code which exit()ed when unable to delete a snapshot
softlink. This caused 'hammer cleanup' to potentially not process all
available HAMMER filesystems, amoung other things.
* Rework the snapshot deletion code to skip any snapshots that cannot be
deleted.
Matthew Dillon [Mon, 11 Jan 2010 00:17:47 +0000 (16:17 -0800)]
HAMMER utility - Fix bug in hammer cleanup which causes the utility to exit
* Remove debugging code which exit()ed when unable to delete a snapshot
softlink. This caused 'hammer cleanup' to potentially not process all
available HAMMER filesystems, amoung other things.
* Rework the snapshot deletion code to skip any snapshots that cannot be
deleted.
Matthew Dillon [Mon, 11 Jan 2010 00:17:39 +0000 (16:17 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 11 Jan 2010 00:15:45 +0000 (16:15 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 11 Jan 2010 00:02:58 +0000 (16:02 -0800)]
HAMMER VFS - Add workaround to HAMMERIOC_GET_SNAPSHOT for bad conversions
* When hammer cleanup converts to a hammer v3 snapshot a bad record
can sometimes be created. This record is not harmful in anyway.
* However when listing available snapshots correct the tid field in the
bad record so it can be deleted.
Matthew Dillon [Mon, 11 Jan 2010 00:02:58 +0000 (16:02 -0800)]
HAMMER VFS - Add workaround to HAMMERIOC_GET_SNAPSHOT for bad conversions
* When hammer cleanup converts to a hammer v3 snapshot a bad record
can sometimes be created. This record is not harmful in anyway.
* However when listing available snapshots correct the tid field in the
bad record so it can be deleted.
Matthew Dillon [Mon, 11 Jan 2010 00:02:16 +0000 (16:02 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Sascha Wildner [Sun, 10 Jan 2010 19:07:51 +0000 (20:07 +0100)]
nrelease: fsck the root filesystem on our USB images.
/ is mounted r/w for USB images, hence we need to fsck to prevent
accidental foot shooting in case some doesn't shutdown cleanly.
Reported-by: Emmanuel De Paepe <emmanuel_depaepe@yahoo.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1637>
Peter Avalos [Sun, 10 Jan 2010 05:46:44 +0000 (05:46 +0000)]
Change Makefiles for OpenSSH to more closely match the distro.
This makes it slightly easier for updates.
This also fixes buildworld.
Peter Avalos [Sun, 10 Jan 2010 05:15:44 +0000 (05:15 +0000)]
Merge branch 'vendor/OPENSSH'
Peter Avalos [Sun, 10 Jan 2010 03:48:12 +0000 (03:48 +0000)]
Add some more missing files from OpenBSD upgrades.
Matthew Dillon [Sun, 10 Jan 2010 04:03:06 +0000 (20:03 -0800)]
HAMMER VFS - REDO implementation base code part 1/many
* Implement basic REDO record writing and fsync heuristic in order to
test operation and performance. Note that the recovery code is not
implemented as of this commit and additional REDO records will probably
have to be written to manage the span.
There was no easy way to place all REDOs in a single UNDO/REDO FIFO span
because the span is not known until the inode's meta-data is actually
flushed. We can control the flush to ensure that all required REDOs
are present in the UNDO/REDO FIFO. So what we will likely do is track
the span with additional REDO records.
* Redo vfs.hammmer.fsync_mode:
0 REDO disabled, synchronous fsync semantics (default)
1 REDO disabled, asynchronous fsync semantics
2 REDO enabled, synchronous (uses disk sync command)
3 REDO enabled, asynchronous (no disk sync command)
4 fsync is ignored
* Refactor hammer_flusher_flush_undos()
* Default operation is to disable the new features as they are not
finished yet.
Peter Avalos [Sun, 10 Jan 2010 03:21:34 +0000 (03:21 +0000)]
Merge branch 'vendor/OPENSSH'
Peter Avalos [Sun, 10 Jan 2010 03:15:55 +0000 (03:15 +0000)]
Add a EVP wrapper for SHA256.
This got skipped on one of our OpenSSH upgrades a few years ago.
Matthew Dillon [Sun, 10 Jan 2010 01:37:51 +0000 (17:37 -0800)]
HAMMER VFS - Add debugging for write I/O
* vfs.hammer.debug_io=2 will kprintf() each write I/O
Matthew Dillon [Sun, 10 Jan 2010 01:03:23 +0000 (17:03 -0800)]
HAMMER VFS - REDO/fsync precursor work
* Adjust hammer_fifo_redo structure (not yet used), add a mtime
field so the mtime can be restored from the REDO records.
* Move the undo buffer flush code into its own procedure,
hammer_flusher_flush_undos().
* Implement hammer_generate_redo() to generate file write operation
REDOs.
* Implement sysctls statistics and limits for redo, vfs.hammer.limit_redo
and vfs.hammer.stats_redo.
Sascha Wildner [Sun, 25 Oct 2009 16:26:38 +0000 (17:26 +0100)]
telldir()'s argument is not supposed to be const.
Sascha Wildner [Sat, 9 Jan 2010 23:32:31 +0000 (00:32 +0100)]
games: Massive style(9) cleanup commit. Reduces differences to NetBSD.
Submitted-by: Ulrich Spoerlein <uqs@spoerlein.net>
Peter Avalos [Sat, 9 Jan 2010 22:17:04 +0000 (12:17 -1000)]
Merge branch 'vendor/OPENSSH'
Peter Avalos [Sat, 9 Jan 2010 22:06:31 +0000 (12:06 -1000)]
Upgrade to OpenSSH-5.3p1.
General Bugfixes:
* Do not limit home directory paths to 256 characters. bz#1615
* Several minor documentation and correctness fixes.
Portable OpenSSH Bugfixes:
* Move the deletion of PAM credentials on logout to after the
session close. bz#1534
* Accept ENOSYS as a fallback error when attempting
atomic rename(). bz#1535
* Fix detection of krb5-config. bz#1639
* Fix test for server-assigned remote forwarding port for
non-root users. bz#1578
Stathis Kamperis [Fri, 8 Jan 2010 18:04:44 +0000 (20:04 +0200)]
nice(3): Return EPERM if increment is negative.
Mandated by POSIX.
Stathis Kamperis [Thu, 7 Jan 2010 17:11:42 +0000 (19:11 +0200)]
mqueues: Garbage collect dead function prototype.
Antonio Huete Jimenez [Wed, 6 Jan 2010 23:12:59 +0000 (00:12 +0100)]
gdtoa - Allocate more entries on freelist to better handle large fields.
http://www.securityfocus.com/bid/35510
Taken-from: NetBSD
Reported-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
Matthew Dillon [Wed, 6 Jan 2010 03:28:12 +0000 (19:28 -0800)]
kernel - poll - Fix MP races
* Some of the poll code had been taken out from under the MP lock too
early, creating races. Put it back under the MP lock until the whole
mess can be rewritten using kqueue.
Reported-by: Rumko
Matthew Dillon [Tue, 5 Jan 2010 22:29:02 +0000 (14:29 -0800)]
debug - Add kmapinfo to dump the kernel_map
* kmapinfo is a program to dump the kernel_map, giving us an idea with
regards to how much KVM is being used. Also works on core dumps.
Sascha Wildner [Tue, 5 Jan 2010 21:18:23 +0000 (22:18 +0100)]
Fix a panic during snd_uaudio(4) attach.
If mixer_ioctl() is called without process context, don't call
vchanvolume().
In-discussion-with: corecode
Matthew Dillon [Tue, 5 Jan 2010 21:01:43 +0000 (13:01 -0800)]
HAMMER VFS - Fix volume ref count leak in fhtovp code.
* The transaction is left dangling open if the inode could not be found
in a fhtovp operation, leaking refs on the root volume. Fix by properly
closing the transaction.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Matthew Dillon [Tue, 5 Jan 2010 19:36:56 +0000 (11:36 -0800)]
HAMMER VFS - Fix serious bug when downgrading (and later upgrading) a PFS
* When downgrading a PFS master to a slave the sync-end-tid (in the
pfs-status) is not updated. This will cause the data to become
inaccessible.
Then, when upgrading back to a master the original stale sync-end-tid
is used to rollback the PFS, effectively destroying its contents.
* We now properly update sync-end-tid when downgrading a PFS. This
makes the data accessible in slave mode and prevents the rollback
when re-upgrading the PFS from destroying any of the master's original
data.
* Why is a rollback used at all when upgrading you ask? When a PFS is
operating as a slave mirroring operations can be interrupted, leaving
a lot of partially updated records. Since sync-end-tid is not updated
until the mirroring operation completes (when in slave mode), these
partially mirrored records are not visible.
However, if the slave is upgraded to a master any records from
incomplete mirroring operations must be destroyed. Hence the rollback
during an upgrade is a necessary feature under normal operation.
Reported-by: Thomas Nikolajsen
Matthew Dillon [Tue, 5 Jan 2010 02:35:13 +0000 (18:35 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 5 Jan 2010 00:40:36 +0000 (16:40 -0800)]
network - VR driver - increase RX ring descriptors
* Increase the number of RX descriptors from 64 to 256 to reduce
occurrences of RX FIFO overflows, particularly on EPIA systems
which tend to have horrible main-memory bandwidth.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Sascha Wildner [Mon, 4 Jan 2010 08:34:00 +0000 (09:34 +0100)]
Unbreak LINT (tick() -> ustick()).
Sascha Wildner [Sun, 3 Jan 2010 22:37:36 +0000 (23:37 +0100)]
testing
Sascha Wildner [Sun, 3 Jan 2010 14:43:05 +0000 (15:43 +0100)]
vfs_conf.c: Fix a warning and remove 'nowerror'.
Sascha Wildner [Sun, 3 Jan 2010 13:25:32 +0000 (14:25 +0100)]
Unbreak buildworld.
The inclusion of <sys/eventvar.h> in <sys/proc.h> in commit
a591f597ce2a2a0d1c8edc23e0445acfbd8a0852 broke some things
in userland.
<kinfo.h> defines _KERNEL_STRUCTURES. If, however, some file included
before <kinfo.h> has code under _KERNEL_STRUCTURES that is needed by
files which come _after_ _KERNEL_STRUCTURES is defined by <kinfo.h>,
we break.
In netstat(1), the solution is to remove the inclusion of <sys/protosw.h>
(which comes in again via <net/netmsg.h> later after <kinfo.h> is
included) in route.c.
In sockstat(1), in lieu of a better solution, we just define
_KERNEL_STRUCTURES early for now.
Reported-by: lentferj
Matthew Dillon [Sun, 3 Jan 2010 06:00:30 +0000 (22:00 -0800)]
kernel - kqueue - fix bug in marker handling
* Fix a double-remove in the list marker used by kevent()
Matthew Dillon [Sun, 3 Jan 2010 05:02:02 +0000 (21:02 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 3 Jan 2010 04:54:57 +0000 (20:54 -0800)]
kernel - poll/select - temporary fix for stalls
* Switch around a conditional to test LWP_SELECT first before attempting
to make the process runnable. This seems to fix the race causing
reported stalls.
Matthew Dillon [Sun, 3 Jan 2010 04:54:57 +0000 (20:54 -0800)]
kernel - poll/select - temporary fix for stalls
* Switch around a conditional to test LWP_SELECT first before attempting
to make the process runnable. This seems to fix the race causing
reported stalls.
Matthew Dillon [Sun, 3 Jan 2010 03:41:06 +0000 (19:41 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 3 Jan 2010 03:40:15 +0000 (19:40 -0800)]
kernel - kqueue - refactor kqueue_scan(), rename tick to ustick
* Refactor kqueue_scan() so it can be called stand-alone.
* Rename tick to ustick (microseconds per tick), and add nstick
(nanoseconds per tick).
Sascha Wildner [Sun, 3 Jan 2010 03:01:00 +0000 (04:01 +0100)]
iso639: Sync with Library of Congress list.
Sascha Wildner [Sun, 3 Jan 2010 03:00:23 +0000 (04:00 +0100)]
bsd-family-tree: Sync with FreeBSD (FreeBSD 8.0 and OpenBSD 4.6).
Matthew Dillon [Sun, 3 Jan 2010 02:54:07 +0000 (18:54 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 3 Jan 2010 00:50:49 +0000 (16:50 -0800)]
kernel - kqueue - major refactoring
* Move filedesc->fd_knhashmask/kn_knhash to kqueue->kq_knhashmask/kq_knhash.
* Remove filedesc->fd_knlistsize/fd_knlist, replace with a per file pointer
list.
* Partition the kqueue code such that independent kqueues can be created
without being associated with a file pointer or descriptor.
Sascha Wildner [Sat, 2 Jan 2010 22:39:04 +0000 (23:39 +0100)]
kprintf(9): Add 'h' and 'hh' modifiers (ACPI debug output needs 'h').
Taken-from: FreeBSD
Jan Lentfer [Sat, 2 Jan 2010 22:25:37 +0000 (23:25 +0100)]
openssl - enable cryptodev support.
Matthew Dillon [Sat, 2 Jan 2010 21:59:47 +0000 (13:59 -0800)]
kernel - kqueue - move kq_kev out of struct kqueue
* Move kqueue->kq_kev from the kqueue structure to the stack.
Matthew Dillon [Sat, 2 Jan 2010 02:07:40 +0000 (18:07 -0800)]
kernel - pmap (i386) - fix bugs in gd_GDMAP1 and gd_GDADDR1 initialization
* I was using the wrong index variable to initialize the per-cpu
gd_GDMAP1 and gd_GDADDR1 fields. This caused the cpu mask for
the alt page table mapping to not work properly.
Sascha Wildner [Sat, 2 Jan 2010 01:41:31 +0000 (02:41 +0100)]
Add some missing ACPI source files to 'files' (for LINT).
Sascha Wildner [Sat, 2 Jan 2010 00:47:21 +0000 (01:47 +0100)]
acpi(4): Fix some x86_64 warnings.
Stathis Kamperis [Fri, 1 Jan 2010 23:36:34 +0000 (01:36 +0200)]
realpath(1): Fix style(9) violation from previous.
Sorry for the noise.
Sascha Wildner [Fri, 1 Jan 2010 21:54:02 +0000 (22:54 +0100)]
Enable the machdep.disable_rtc_set sysctl on x86_64.
This makes adjkerntz(8) work for me (instead of giving an error because
the sysctl couldn't be found).
Stathis Kamperis [Fri, 1 Jan 2010 13:55:34 +0000 (15:55 +0200)]
realpath(1): Return ENOENT if filename is empty string.
Mandated by POSIX.
Linux, NetBSD and OpenSolaris do the same, so we are on
the safe side.
Shortly-discussed-with: aggelos@
Matthew Dillon [Fri, 1 Jan 2010 03:25:25 +0000 (19:25 -0800)]
kernel - adjust vnode reclamation
* Do a pre-check for auxillary refs and do not reclaim a vnode through
standard recyclement if auxillary refs are present.
Recyclement can still occur under other circumstances. Auxillary
refs nominally just prevent the vnode from being completely destroyed
or reused.
This is a bit experimental.
Matthew Dillon [Fri, 1 Jan 2010 03:08:48 +0000 (19:08 -0800)]
kernel - namecache - fix deadlock
* cache_drop() can be called in numerous situations where unrelated
vnode or namecache locks are held, particularly in the
allocfreevnode() path when it calls cache_inval_vp_nonblock().
* If cache_drop() is transitioning a nc_refs from 1 to 0 it will call
cache_zap() to free the (now untracked) ncp. Adjust cache_zap() to
leave the namecache entry alone if a lock on ncp->nc_parent
cannot be acquired, instead of blocking (and potentially deadlocking).
* Add _cache_cleandefered() (part of cache_hysteresis()) to handle
any buildup. It is expensive but the race occurs at a low rate
under moderate load so it should hardly ever have to be run.
Sascha Wildner [Fri, 1 Jan 2010 03:03:51 +0000 (04:03 +0100)]
md.4: Adjust SYNOPSIS a bit.
Sascha Wildner [Tue, 29 Dec 2009 22:33:43 +0000 (23:33 +0100)]
development.7: Remove blank line.
Matthew Dillon [Fri, 1 Jan 2010 02:52:55 +0000 (18:52 -0800)]
kernel - pmap - more invltlb stuff
* Make sure pmap->pm_cache is cleared when a pmap gets reused,
fixing an issue where the pmap subsystem wasn't properly
invltlb'ing the recycled pmap due to stale cpu cache bits.
* Add sysctl vm.dreadful_invltlb (default to off) as a debugging aid.
Turning this on disables pmap->pm_cache and does an unconditional
invltlb on every pmap operation.