dragonfly.git
3 years agore(4): fix re_setmulti(): PCIe mcast hash registers were swapped
Thomas Nikolajsen [Sun, 8 Aug 2010 07:41:05 +0000 (09:41 +0200)]
re(4): fix re_setmulti(): PCIe mcast hash registers were swapped

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1799>
Submitted-by: "Mitja Horvat <pinkfluid@>"
Obtained-from: FreeBSD

3 years agodaemon(8): add missing break
Thomas Nikolajsen [Sun, 8 Aug 2010 06:45:56 +0000 (08:45 +0200)]
daemon(8): add missing break

DragonFly-bug: <http://bugs.dragonflybsd.org/issue1800>
Submitted-by: "Mitja Horvat <pinkfluid@>"
3 years agoFix a panic in the varsym_get(2) syscall.
Sascha Wildner [Sun, 8 Aug 2010 18:13:07 +0000 (20:13 +0200)]
Fix a panic in the varsym_get(2) syscall.

In varsymfind(), release the lock only if vss != NULL. This could be
the case if garbage was passed in the mask.

3 years agoFix a panic in the __getcwd(2) syscall.
Sascha Wildner [Sun, 8 Aug 2010 09:19:09 +0000 (11:19 +0200)]
Fix a panic in the __getcwd(2) syscall.

buflen has to be unsigned so that large values do not become negative
and sneak past the MAXPATHLEN check.

3 years agoFix panics in two syscalls, caps_sys_get(2) and caps_sys_wait(2).
Sascha Wildner [Sun, 8 Aug 2010 08:43:08 +0000 (10:43 +0200)]
Fix panics in two syscalls, caps_sys_get(2) and caps_sys_wait(2).

Only call caps_drop() if caps != NULL.

3 years agoFix the VKERNEL build with KLD_DEBUG set.
Sascha Wildner [Mon, 2 Aug 2010 13:00:58 +0000 (15:00 +0200)]
Fix the VKERNEL build with KLD_DEBUG set.

Reported-by: lentferj
3 years agoFix typo in <sys/elf_common.h>: ET_LIPROC -> ET_LOPROC
Sascha Wildner [Wed, 28 Jul 2010 15:22:54 +0000 (17:22 +0200)]
Fix typo in <sys/elf_common.h>: ET_LIPROC -> ET_LOPROC

3 years agolibc - Return ENOSYS in both mlockall() / munlockall()
Antonio Huete Jimenez [Tue, 13 Apr 2010 09:57:51 +0000 (11:57 +0200)]
libc - Return ENOSYS in both mlockall() / munlockall()

Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1712>

3 years agoSync zoneinfo database with tzdata2010k from elsie.nci.nih.gov
Sascha Wildner [Mon, 26 Jul 2010 16:17:50 +0000 (18:17 +0200)]
Sync zoneinfo database with tzdata2010k from elsie.nci.nih.gov

africa:         8.26 -> 8.27
australasia:    8.17 -> 8.18
backward:       8.8  -> 8.9
europe:         8.26 -> 8.27
leapseconds:    8.9  -> 8.10
northamerica:   8.31 -> 8.34
zone.tab:       8.36 -> 8.37

* africa: DST will not be used in Egypt during Ramadan.

* australasia: Change Pacific/Truk to Pacific/Chuuk (with corresponding
    time zone abbreviation change) and change Pacific/Ponape to
    Pacific/Pohnpei (with thanks to Clint Adams).

* backward: Add Pacific/Truk and Pacific/Ponape links and adjust
    Pacific/Yap link.

* europe: Change Finland transition times in 1981 and 1982 (with thanks
    to Janne Snabb).

* leapseconds: Update comments with latest IERS leap second bulletin.

* northamerica: Correct instant of 2010 move between time zones in
    Bahia de Banderas. Add comments from Mark Brader on DST in Windsor.
    Add comments on Canadian DST in 1930 from the Journal of the Royal
    Astronomical Society of Canada.

* zone.tab: Change Pacific/Truk to Pacific/Chuuk and change Pacific/Ponape
    to Pacific/Pohnpei.

3 years ago/usr/Makefile: Adjust to our new handling of the pkgsrc GIT repository.
Sascha Wildner [Mon, 5 Jul 2010 12:42:03 +0000 (14:42 +0200)]
/usr/Makefile: Adjust to our new handling of the pkgsrc GIT repository.

3 years agoFix ACPI global lock acquisition in x86_64.
Sascha Wildner [Sat, 17 Apr 2010 10:43:24 +0000 (13:43 +0300)]
Fix ACPI global lock acquisition in x86_64.

This fixes a number of grave issues on my Sony VAIO VGN-Z51XG, such as
messages about not being able to acquire the global lock, freezes when
ACPI was fully enabled and a panic at shutdown.

BTW, gcc had been warning us about it for a long time. :)

In-collaboration-with: aggelos

3 years agohangman(6): Ignore case in the word list.
Sascha Wildner [Thu, 24 Jun 2010 08:53:10 +0000 (10:53 +0200)]
hangman(6): Ignore case in the word list.

Reported-by: Tim Darby <t+dfbsd@timdarby.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1787>

3 years agovesa(4): Fix check for DPMS support.
Sascha Wildner [Mon, 21 Jun 2010 05:10:50 +0000 (07:10 +0200)]
vesa(4): Fix check for DPMS support.

Return 0 (no states) in case function 0x4f10 returns an error.

3 years agoaltq(4): Fix typo in a #define.
Sascha Wildner [Wed, 16 Jun 2010 15:30:12 +0000 (17:30 +0200)]
altq(4): Fix typo in a #define.

3 years agokern_shutdown.c: Add missing #include (for NGPIO).
Sascha Wildner [Wed, 16 Jun 2010 15:27:02 +0000 (17:27 +0200)]
kern_shutdown.c: Add missing #include (for NGPIO).

3 years agoiscsi - Fix bug in iscsi initiator driver
Matthew Dillon [Sat, 12 Jun 2010 16:29:17 +0000 (09:29 -0700)]
iscsi - Fix bug in iscsi initiator driver

* The iscsi initiator was trying to record the thread pointer for the
  original caller attaching the connection, but that caller is strictly
  temporary.

  Record the kernel thread created by the attachment instead of the
  caller's thread.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>:
3 years agotop - Fix seg-fault when window made very wide
Matthew Dillon [Sat, 12 Jun 2010 04:31:08 +0000 (21:31 -0700)]
top - Fix seg-fault when window made very wide

* Fix a static buffer overflow when the window is made very wide.

Taken-from: NetBSD
Submitted-by: Trevor Kendall
3 years agoRun makewhatis(8) after 'make upgrade' instead of after 'make installworld'.
Sascha Wildner [Sat, 12 Jun 2010 03:07:57 +0000 (05:07 +0200)]
Run makewhatis(8) after 'make upgrade' instead of after 'make installworld'.

'make upgrade' does (among other things) remove obsolete manual pages. If
makewhatis(8) is run after 'make installworld' (i.e. before upgrade), the
whatis database will still contain them. Therefore, run makewhatis(8)
after 'make upgrade' when the removals are done.

Pointed-out-by: tuxillo
While here, clean up the upgrade target in /usr/src/Makefile a little bit.

3 years agoFix -pg compiled programs on i386
Aggelos Economopoulos [Tue, 1 Jun 2010 20:07:52 +0000 (23:07 +0300)]
Fix -pg compiled programs on i386

mcount() is supposed to preserve all registers. Since it
clobbered ecx, this resulted in argc/argv always being 0.
It probably only ever worked because of some artifact of
code generation by older GCCs.

Reported-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Testing-by: swildner@
3 years agoacpica - Use tsleep() instead of DELAY() to avoid long delays at boot time.
Antonio Huete Jimenez [Thu, 27 May 2010 00:13:34 +0000 (02:13 +0200)]
acpica - Use tsleep() instead of DELAY() to avoid long delays at boot time.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1755>
Obtained-from: FreeBSD

3 years agolib/csu: Fix 'make clean'.
Sascha Wildner [Sat, 29 May 2010 00:01:53 +0000 (02:01 +0200)]
lib/csu: Fix 'make clean'.

3 years agoAdjust some comments/manpages regarding where profiling libs are.
Sascha Wildner [Fri, 28 May 2010 23:25:59 +0000 (01:25 +0200)]
Adjust some comments/manpages regarding where profiling libs are.

3 years agogcc(1): Fix compilation with "c++ -pg" (for CCVER=gcc41).
Sascha Wildner [Fri, 28 May 2010 22:38:34 +0000 (00:38 +0200)]
gcc(1): Fix compilation with "c++ -pg" (for CCVER=gcc41).

We don't install profiling libraries as /usr/lib/lib${LIB}_p.a anymore
since it was switched to /usr/lib/profile/lib${LIB}.a almost 5 years
ago (in c4c23d9061b6eb2a3456620a48b84583b00fe0ce).

Reported-by: Damian Weber <dweber@htw-saarland.de>
3 years agogcc(1): Fix typos in gcc41's spec so that profiling libraries are found.
Sascha Wildner [Fri, 28 May 2010 22:32:59 +0000 (00:32 +0200)]
gcc(1): Fix typos in gcc41's spec so that profiling libraries are found.

3 years agosound: implement OSS_GETVERSION.
Alexander Polakov [Fri, 2 Apr 2010 20:23:00 +0000 (00:23 +0400)]
sound: implement OSS_GETVERSION.

 It's required by some software, emulators/qemu to mention.

 Obtained-from: FreeBSD

3 years agouuid_{name,addr}_lookup(3): Fix free() order.
Sascha Wildner [Wed, 19 May 2010 18:45:01 +0000 (20:45 +0200)]
uuid_{name,addr}_lookup(3): Fix free() order.

3 years agoscsi(4): Add a missing 'break'.
Sascha Wildner [Tue, 18 May 2010 19:56:31 +0000 (21:56 +0200)]
scsi(4): Add a missing 'break'.

3 years agosys/netinet/in_pcb.c: Fix a broken range check.
Sascha Wildner [Tue, 18 May 2010 10:15:40 +0000 (12:15 +0200)]
sys/netinet/in_pcb.c: Fix a broken range check.

Back in 2004, in commit 80dff869, RANGECHK() was changed from a macro
to an inline function. This broke the test since the passed 'var' could
not be changed by the inline unless a pointer was used.

Instead of changing to using pointers now (or adding a return value to
RANGECHK()), revert to using a macro again.

3 years agoAdd a missing break in the 64 bit vkernel, too.
Sascha Wildner [Sun, 16 May 2010 18:03:10 +0000 (20:03 +0200)]
Add a missing break in the 64 bit vkernel, too.

3 years agovkernel: To restart the scan, npv needs to be reset, not pv.
Sascha Wildner [Sun, 16 May 2010 17:41:01 +0000 (19:41 +0200)]
vkernel: To restart the scan, npv needs to be reset, not pv.

3 years agovkernel: Fix a wrong check of netif_set_tapflags()'s return value.
Sascha Wildner [Sun, 16 May 2010 17:26:16 +0000 (19:26 +0200)]
vkernel: Fix a wrong check of netif_set_tapflags()'s return value.

3 years agokx86_64_set_watch(): Add a missing 'break'.
Sascha Wildner [Sun, 16 May 2010 15:39:12 +0000 (17:39 +0200)]
kx86_64_set_watch(): Add a missing 'break'.

3 years agocxm(4) doesn't depend on smbus(4).
Sascha Wildner [Sun, 16 May 2010 01:46:31 +0000 (03:46 +0200)]
cxm(4) doesn't depend on smbus(4).

Reported-by: Thomas Klausner <wiz@netbsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1766>

3 years agoFix compiling iic(4) on x86_64 by adding <machine/iic.h>.
Sascha Wildner [Sun, 16 May 2010 01:45:42 +0000 (03:45 +0200)]
Fix compiling iic(4) on x86_64 by adding <machine/iic.h>.

Reported-by: Thomas Klausner <wiz@netbsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1766>

3 years agoFix the x86_64 kernel build with 'options BUS_DEBUG'.
Sascha Wildner [Fri, 14 May 2010 23:07:03 +0000 (01:07 +0200)]
Fix the x86_64 kernel build with 'options BUS_DEBUG'.

Reported-by: Thomas Klausner <wiz@netbsd.org>
3 years agoSync zoneinfo database with tzdata2010j from elsie.nci.nih.gov
Sascha Wildner [Tue, 11 May 2010 03:57:00 +0000 (05:57 +0200)]
Sync zoneinfo database with tzdata2010j from elsie.nci.nih.gov

northamerica:   8.30 -> 8.31
zone.tab:       8.35 -> 8.36

Bahia de Banderas (municipality in the Mexican state of Nayarit) changed
time zone from UTC-7 to UTC-6. This requires introducing a new zone
(America/Bahia_Banderas).

3 years agoACPI: Don't unlock in lock's error path
Stathis Kamperis [Sat, 10 Apr 2010 15:56:28 +0000 (18:56 +0300)]
ACPI: Don't unlock in lock's error path

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1647>

Submitted-by: Edward O'Callaghan
3 years agonrelease - MFC try to workaround a problem with ./bootstrap v2.6.3
Matthew Dillon [Fri, 30 Apr 2010 18:11:06 +0000 (11:11 -0700)]
nrelease - MFC try to workaround a problem with ./bootstrap

* setenv share_dir during the bootstrap build to try to work around a
  problem where recent changes in the build cause bmake to try to access
  the system mk files in /usr/share/mk.

3 years agokernel - Try to fix NULL pointer issue in syncache_timer_handler()
Matthew Dillon [Fri, 30 Apr 2010 18:08:14 +0000 (11:08 -0700)]
kernel - Try to fix NULL pointer issue in syncache_timer_handler()

* There seems to be a case where a tcpcb's inp can be NULL when accessed
  from syncache_timer_handler().  Try to handle it.

3 years agokernel - Disallow dsioctl when no media is present
Matthew Dillon [Fri, 30 Apr 2010 18:06:56 +0000 (11:06 -0700)]
kernel - Disallow dsioctl when no media is present

* Attempt to fix a panic which can occur when attempts are made to
  call ioctl() via a slice/partition on removable drives with no media.

3 years agokernel - Fix resident_count problems with kernel_pmap & related crashes
Matthew Dillon [Fri, 30 Apr 2010 02:48:58 +0000 (19:48 -0700)]
kernel - Fix resident_count problems with kernel_pmap & related crashes

* kernel_pmap.pm_stats.resident_count could get out of sync due to the
  lwbuf code calling kmem_free() on KVM with pages that were entered
  via pmap_kenter().  Delete the pages before calling kmem_free().

  This in turn caused various failures and kernel panics due to conditionals
  based on resident_count == 0.  Heavy sendfile() activity could trigger
  the bug but it was taking a few days for the resident_count to decrement
  to zero.

* Fix a similar issue in zdestroy() on ZONE_INTERRUPT zones.  Nothing calls
  this routine so it was not a vector for crashes.

* Document the case.

3 years agokernel - mmap offset is invalid for MAP_ANON
Samuel J. Greear [Fri, 30 Apr 2010 04:30:05 +0000 (22:30 -0600)]
kernel - mmap offset is invalid for MAP_ANON

Submitted-by: Venkatesh Srinivas
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1723>

3 years agobpf(4): Fix the division by zero check in bpf_validate().
Sascha Wildner [Fri, 30 Apr 2010 10:03:52 +0000 (12:03 +0200)]
bpf(4): Fix the division by zero check in bpf_validate().

BPF_RVAL() was being used where BPF_SRC() would have been correct.

Reported-by: Guy Harris <guy@alum.mit.edu>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1748>

3 years agokernel - make sysent update
Matthew Dillon [Mon, 26 Apr 2010 16:05:52 +0000 (09:05 -0700)]
kernel - make sysent update

* Update for changes in the extattr family of system calls.

3 years agokernel - Update extattr infrastructure
Matthew Dillon [Mon, 26 Apr 2010 16:03:04 +0000 (09:03 -0700)]
kernel - Update extattr infrastructure

* Update the extattr infrastructure to match FreeBSD.  Numerous arguments
  have changed in the system calls and created an issue with libarchive.

3 years agoFix kthread_create() in kern_sensors.c.
Sascha Wildner [Thu, 22 Apr 2010 10:23:56 +0000 (12:23 +0200)]
Fix kthread_create() in kern_sensors.c.

3 years agowindow(1): Perform NULL check before strcmp() rather than after.
YONETANI Tomokazu [Sat, 10 Apr 2010 01:47:16 +0000 (10:47 +0900)]
window(1): Perform NULL check before strcmp() rather than after.

Fixes segfault upon TERM=cons25.

3 years agohammer volume-add / volume-del: Keep bigblock stats correct
Michael Neumann [Tue, 6 Apr 2010 18:18:47 +0000 (20:18 +0200)]
hammer volume-add / volume-del: Keep bigblock stats correct

3 years agoSync zoneinfo database with tzdata2010i from elsie.nci.nih.gov
Sascha Wildner [Wed, 21 Apr 2010 14:12:10 +0000 (16:12 +0200)]
Sync zoneinfo database with tzdata2010i from elsie.nci.nih.gov

africa:         8.24 -> 8.26
asia:           8.59 -> 8.60
southamerica:   8.43 -> 8.44

* Morocco will have DST in 2010 from May 2 to Aug 22.

* Taiwan had DST in 1979, not in 1980.

* San Luis, Argentina, is on "permanent" DST as of 2010.

4 years agoHAMMER VFS - Fix probable corruption case when filesystem becomes nearly full v2.6.2
Matthew Dillon [Mon, 19 Apr 2010 05:36:14 +0000 (22:36 -0700)]
HAMMER VFS - Fix probable corruption case when filesystem becomes nearly full

* The reblocking code was incorrectly assuming the cursor would be pointing
  at a valid node element after an unlock/relock sequence, when it could
  actually be pointing at the EOF of a node.  This case can occur when
  the filesystem is nearly full (possibly due to the reblocking operation
  itself), when the filesystem is also under load from unrelated
  operations.

* This can result in the creation of a corrupted B-Tree leaf node or
  data record.

* Corruption can be checked with hammer checkmap and hammer show
  (as of this rev):

  hammer -f device checkmap

Should output no B-Tree node records or free space mismatches.
You will still get the initial volume summary.

  hammer -f device show | egrep '^B' | egrep -v '^BM'

Should output no records.

* Currently the only recourse if corruption is found is to copy off the
  filesystem, newfs_hammer, and copy it back.

  Full history and snapshots can be retained by using 'hammer -B mirror-read'
  to copy off the filesystem and mirror-write to copy it back.  However,
  pleaes remember you must do this for each PFS individually.  Make sure
  you have a viable backup before newfsing anything.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>, Jan Lentfer <Jan.Lentfer@web.de>
4 years agoHAMMER VFS - Fix assertion panic related to record flush state
Matthew Dillon [Sat, 17 Apr 2010 18:12:02 +0000 (11:12 -0700)]
HAMMER VFS - Fix assertion panic related to record flush state

* This assertion can occur under certain circumstances if a rename
  operation moves a file or directory to a parent directory, due to
  a circular loop in the dependency chain.

* Fix the problem by allowing the case.

Reported-by: Sascha Wildner, Alex Hornung, Venkatesh Srinivas, others
4 years agoHAMMER Util - Add 'checkmap', adjust hammer show
Matthew Dillon [Fri, 16 Apr 2010 03:41:18 +0000 (20:41 -0700)]
HAMMER Util - Add 'checkmap', adjust hammer show

* Add a checkmap function which scans the B-Tree, collects byte usage,
  and checks it against the blockmap.  This is still experimental.

* Adjust hammer show to flag zone mismatches instead of asserting.

4 years agoHAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails
Matthew Dillon [Wed, 14 Apr 2010 04:27:49 +0000 (21:27 -0700)]
HAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails

* REDO recovery failed to release a buffer in its error path, resulting
  in a panic later on.  This patch adds the proper release.

Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>
4 years agonata - Drop pending requests on dump
Alex Hornung [Tue, 13 Apr 2010 16:32:08 +0000 (16:32 +0000)]
nata - Drop pending requests on dump

* Drop all pending requests in the ata queue when we are about to dump.

* This should solve issues that have been appearing lately causing a
  TAILQ_NEXT panic on dumps with nata under heavy I/O.

Reported-by: Jan Lentfer (lentferj@), Antonio Huete (tuxillo@)
Obtained-from: FreeBSD

4 years agoata - Fix dumping of old ata driver
Alex Hornung [Tue, 13 Apr 2010 16:29:47 +0000 (16:29 +0000)]
ata - Fix dumping of old ata driver

* While we still have ata(4) around, make addump work properly again
  with the new dumping infrastructure.

4 years agoFix LINT build.
Sascha Wildner [Sat, 10 Apr 2010 22:17:32 +0000 (00:17 +0200)]
Fix LINT build.

4 years agoACPI - disable ACPIIO_ACKSLPSTATE
YONETANI Tomokazu [Sat, 10 Apr 2010 07:24:28 +0000 (16:24 +0900)]
ACPI - disable ACPIIO_ACKSLPSTATE

It's incomplete and an undocumented option in acpiconf can trigger
a kernel panic (only as root, though).

4 years agoInstall the boot(8) manual page too during 64 bit install.
Sascha Wildner [Sat, 10 Apr 2010 06:09:06 +0000 (08:09 +0200)]
Install the boot(8) manual page too during 64 bit install.

4 years agolinux emu - Refactor open code
Alex Hornung [Fri, 9 Apr 2010 07:24:53 +0000 (07:24 +0000)]
linux emu - Refactor open code

* Factor out a linux_open_common that both open() and openat() use.

* While here, also use CACHE_*MPLOCK*, as is done in vfs_syscalls.c.

4 years agolinux emu - support O_DIRECTORY for open syscall
Alex Hornung [Fri, 9 Apr 2010 06:49:06 +0000 (06:49 +0000)]
linux emu - support O_DIRECTORY for open syscall

* Linux opendir seems to rely on O_DIRECTORY to avoid certain race
  conditions, so introduce O_DIRECTORY support which just returns
  ENOTDIR even if the open is successful, if the opened path is not a
  directory.

* This fixes Ant's directory scanner.

Submitted-by: Johannes Hofmann
4 years agolook(1): Fix my previous commit.
Sascha Wildner [Thu, 8 Apr 2010 14:17:05 +0000 (16:17 +0200)]
look(1): Fix my previous commit.

I broke i386 behavior. Instead, take a nicer fix from NetBSD.

4 years agoFix look(1) on x86_64.
Sascha Wildner [Thu, 8 Apr 2010 13:09:21 +0000 (15:09 +0200)]
Fix look(1) on x86_64.

SIZE_T_MAX, being ULONG_MAX, was -1 when cast to off_t (int64_t).

Reported-by: Urmas Reinsalu <urki@klaasikoda.ee>
4 years agomqueues: selwakeup() needs the MP lock to be held
Stathis Kamperis [Tue, 6 Apr 2010 19:17:35 +0000 (22:17 +0300)]
mqueues: selwakeup() needs the MP lock to be held

Briefly-discussed-with: sjg@

4 years agoSync zoneinfo database with tzdata2010h from elsie.nci.nih.gov
Sascha Wildner [Mon, 5 Apr 2010 15:29:00 +0000 (17:29 +0200)]
Sync zoneinfo database with tzdata2010h from elsie.nci.nih.gov

africa:         8.23 -> 8.24
asia:           8.58 -> 8.59

Both Tunisia and Pakistan have decided to abandon DST.

4 years agonrelease: Remove unused variable. v2.6.1
Sascha Wildner [Sun, 4 Apr 2010 17:29:04 +0000 (19:29 +0200)]
nrelease: Remove unused variable.

4 years agoHAMMER Utility - Change default split size from 100MB to 4G
Matthew Dillon [Sun, 4 Apr 2010 16:23:19 +0000 (09:23 -0700)]
HAMMER Utility - Change default split size from 100MB to 4G

* Change the default split size for mirroring from 100MB to 4G.  For very
  large filesystems a small split size can result in very high meta-data
  overheads with very little actual incremental data.

* Adjust the manual page for the split changes.

* Adjust the manual page to clarify limitations of the bandwidth option.

4 years agonrelease: Add back the creation of the /usr/local hierarchy on the LiveCD.
Sascha Wildner [Sun, 4 Apr 2010 16:06:42 +0000 (18:06 +0200)]
nrelease: Add back the creation of the /usr/local hierarchy on the LiveCD.

Even though nothing in base uses it, it's more convenient to have the
hierarchy already in place in case the user wants to install some stuff
the traditional way.

While doing this, remove the documentation of the 'fetch' target from
release.7 since this target no longer exists now that cvsup has been
removed from the LiveCD.

In-discussion-with: dillon

4 years agoinstaller: Fix the LiveCD's /etc/fstab regarding /usr/local.
Sascha Wildner [Sun, 4 Apr 2010 15:21:57 +0000 (17:21 +0200)]
installer: Fix the LiveCD's /etc/fstab regarding /usr/local.

/usr/local/etc was mounted read/write (a remnant from the FreeBSD ports
era). Instead, mount /usr/pkg/etc in order to give the user a chance to
tweak the settings of the packages which come on the LiveCD.

4 years agosystat - Fix a deja vu in a header file.
Antonio Huete Jimenez [Sun, 4 Apr 2010 00:20:12 +0000 (02:20 +0200)]
systat - Fix a deja vu in a header file.

4 years agoinclude/Makefile: Add vers.txt to CLEANFILES.
Sascha Wildner [Sat, 3 Apr 2010 13:37:20 +0000 (15:37 +0200)]
include/Makefile: Add vers.txt to CLEANFILES.

4 years agokernel - Address excessive stall in pageout during deadlock avoidance
Matthew Dillon [Thu, 1 Apr 2010 18:06:07 +0000 (11:06 -0700)]
kernel - Address excessive stall in pageout during deadlock avoidance

* The pageout daemon uses LK_TIMELOCK to avoid deadlocking on a vnode
  that might be held locked during a pfault, which waits up to 1/10 of
  a second.

  If the vnode has a large number of pageable pages each page may go
  through the timeout.  This can result in the pageout daemon stalling
  for an excessive amount of time.

  Reduce instances of the problem by remembering the last vnode which
  failed its timelock and using LK_NOWAIT for later pages.  A single
  vnode is remembered for now.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
4 years agodevfs - Fix incorrect st_size reporting
Matthew Dillon [Thu, 1 Apr 2010 16:16:23 +0000 (09:16 -0700)]
devfs - Fix incorrect st_size reporting

* The default reported st_size should be 0 and not sizeof(devfs_node).

* Fixes incorrect reporting for /dev/null and other devices.

Reported-by: marino2, numerous others (it slipped through the cracks)
4 years agoHAMMER VFS - Fix insufficient cursor change test
Matthew Dillon [Thu, 1 Apr 2010 16:15:17 +0000 (09:15 -0700)]
HAMMER VFS - Fix insufficient cursor change test

* The reblocking code tests whether a cursor has changed after being
  unlocked.  This test was insufficient and resulted in an assertion
  panic.  Beef up the test.

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
4 years agovinum - change drive parsing
Alex Hornung [Wed, 31 Mar 2010 21:18:40 +0000 (21:18 +0000)]
vinum - change drive parsing

* When calling init_drive() from read_drive_label() change the static 0
  with the verbose var that is passed to read_drive_label().

* Changed the way the drives are parsed in vinum_scandisk() and removed
  the second iteration of detecting vinum partitions

Submitted-by: Rumko
Dragonfly-bug: http//bugs.dragonflybsd.org/issue1565

4 years agoman - Add .Dx entries for 2.6 and 2.7
Matthew Dillon [Wed, 31 Mar 2010 20:39:36 +0000 (13:39 -0700)]
man - Add .Dx entries for 2.6 and 2.7

* Add .Dx entries for 2.6 and 2.7 so nroff -mandoc doesn't complain.

4 years agoHAMMER - Adjust documentation and change default fsync_mode to 3
Matthew Dillon [Wed, 31 Mar 2010 20:36:34 +0000 (13:36 -0700)]
HAMMER - Adjust documentation and change default fsync_mode to 3

* The default fsync_mode is 3 (REDO heuristic with no disk flush).
  This mode is contemporary with what a UFS fsync() does.

4 years agodevfs - remove obsolete KKASSERT
Alex Hornung [Wed, 31 Mar 2010 19:12:08 +0000 (19:12 +0000)]
devfs - remove obsolete KKASSERT

* remove an obsolete KKASSERT checking namlen in allocp, as one was able
  to trigger it from userland by adding a sufficiently large link rule.

Reported-by: Sascha Wildner
4 years agovkernel - remove stale lwbuf fields in globaldata
Matthew Dillon [Wed, 31 Mar 2010 17:44:42 +0000 (10:44 -0700)]
vkernel - remove stale lwbuf fields in globaldata

* Remove stale lwbuf fields that are no longer used from the
  vkernel's globaldata.

* Remove a now-unnecessary #include line from globaldata.h

4 years agokernel - lwbuf - Remove dead code
Matthew Dillon [Wed, 31 Mar 2010 16:25:55 +0000 (09:25 -0700)]
kernel - lwbuf - Remove dead code

* Remove dead code.  objcache_get() can't return NULL in this case.

Submitted-by: sjg
4 years agokernel - more lwbuf followup work
Matthew Dillon [Wed, 31 Mar 2010 16:14:28 +0000 (09:14 -0700)]
kernel - more lwbuf followup work

* Make lwbuf objcache only, removing all the manual per-cpu allocation
  tracking.  Keep the cpumask stuff.  We will deal with the KVM
  fragmentation issue inside objcache later on.

* This basically takes us back to Sam's original objcache implementation.

* Remove unnecessary assembly symbols (assembly didn't use those globaldata
  fields).  Remove related globaldata fields now that we are back to the
  objcache-only implementation.

4 years agokernel - lwbuf, don't rely on gcc auto-arrays
Samuel J. Greear [Wed, 31 Mar 2010 09:28:11 +0000 (03:28 -0600)]
kernel - lwbuf, don't rely on gcc auto-arrays

4 years agokernel - make lwbuf use objcache for ephemeral mappings
Samuel J. Greear [Wed, 31 Mar 2010 08:17:39 +0000 (02:17 -0600)]
kernel - make lwbuf use objcache for ephemeral mappings

* Introduce ephemeral-tagged mappings to lwbuf, these are serviced directly
from objcache.

* Add kern.ipc.lwbuf_reserve, a boot-time tuneable that controls the number
of per-cpu lwbuf's reserved by the subsystem.

* Add kern.ipw.lwbuf_count, which prints the per-cpu number of lwbufs
available for allocation.

4 years agovkernel - Fix kernel build after recent lwbuf work.
Joe Talbott [Wed, 31 Mar 2010 14:02:40 +0000 (10:02 -0400)]
vkernel - Fix kernel build after recent lwbuf work.

Reviewed-By: sjg
4 years agoFix UP kernel build.
Sascha Wildner [Wed, 31 Mar 2010 13:22:42 +0000 (15:22 +0200)]
Fix UP kernel build.

4 years agoMerge branch 'DragonFly_RELEASE_2_6' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Wed, 31 Mar 2010 07:06:29 +0000 (00:06 -0700)]
Merge branch 'DragonFly_RELEASE_2_6' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_2_6

4 years agokernel - Fix lwbuf leak for i386
Matthew Dillon [Wed, 31 Mar 2010 06:45:52 +0000 (23:45 -0700)]
kernel - Fix lwbuf leak for i386

* lwbufs were not being freed back to the originating cpu, creating a
  situation where an infinite number of lwbufs could be allocated.

* Refactor the lwbuf code for i386.  Track the cpu in the lwbuf, remove
  lwbuf_free_kvp, track the number of lwbufs on the free list for each
  cpu.

  Free a lwbuf back to the cpu it was originally created on.

  Destroy lwbufs and related kmem if the number of free lwbufs on a cpu
  exceeds 256.

* This is a temporary fix until the i386 code can be adjusted to use the
  objcache again.

4 years agoRaise default .Os value for the manual pages to 2.6 on 2.6.
Sascha Wildner [Tue, 30 Mar 2010 22:02:17 +0000 (00:02 +0200)]
Raise default .Os value for the manual pages to 2.6 on 2.6.

4 years agoBIND: Update master to v9.5.2-P3
Jan Lentfer [Mon, 29 Mar 2010 09:03:06 +0000 (11:03 +0200)]
BIND: Update master to v9.5.2-P3

4 years agovendor/BIND: Update to 9.5.2-P3
Jan Lentfer [Mon, 29 Mar 2010 08:23:56 +0000 (10:23 +0200)]
vendor/BIND: Update to 9.5.2-P3

4 years agoMove SHOW_BUSYBUFS to the platform independent kernel options file.
Sascha Wildner [Tue, 30 Mar 2010 16:14:23 +0000 (18:14 +0200)]
Move SHOW_BUSYBUFS to the platform independent kernel options file.

Submitted-by: Sylvestre Gallon <ccna.syl@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1702>

4 years agovadvise depend of COMPAT_43.
Sylvestre Gallon [Tue, 30 Mar 2010 15:00:51 +0000 (17:00 +0200)]
vadvise depend of COMPAT_43.
Now the kernel compile without COMPAT_43 option.

4 years agoAllow nfe and xl to compile without DEVICE_POLLING.
Sylvestre Gallon [Wed, 24 Mar 2010 12:45:32 +0000 (13:45 +0100)]
Allow nfe and xl to compile without DEVICE_POLLING.

4 years agoUFS code is dependant of FFS code. It does not compile without FFS option GENERIC.
Sylvestre Gallon [Wed, 24 Mar 2010 12:41:32 +0000 (13:41 +0100)]
UFS code is dependant of FFS code. It does not compile without FFS option GENERIC.

4 years agoAllow kernel to be compile without _KPOSIX_PRIORITY_SCHEDULING.
Sylvestre Gallon [Wed, 24 Mar 2010 11:53:43 +0000 (12:53 +0100)]
Allow kernel to be compile without _KPOSIX_PRIORITY_SCHEDULING.

4 years agoAllow kernel to be compile without SYSV[SHM|MSG|SEM]
Sylvestre Gallon [Wed, 24 Mar 2010 11:54:52 +0000 (12:54 +0100)]
Allow kernel to be compile without SYSV[SHM|MSG|SEM]

4 years agoAllow the kernel to be compile without KTRACE option.
Sylvestre Gallon [Wed, 24 Mar 2010 11:52:22 +0000 (12:52 +0100)]
Allow the kernel to be compile without KTRACE option.

4 years agomandoc(1): Update to 1.9.20.
Sascha Wildner [Tue, 30 Mar 2010 13:31:19 +0000 (15:31 +0200)]
mandoc(1): Update to 1.9.20.

For a full list of changes, see <http://mdocml.bsd.lv/ChangeLog.html>.

Thanks-to: Kristaps Dzonsons

4 years agohammer(8): adjust markup & improve wording
Thomas Nikolajsen [Mon, 29 Mar 2010 23:49:02 +0000 (01:49 +0200)]
hammer(8): adjust markup & improve wording

4 years agosystat: update vmstat & improve man page
Thomas Nikolajsen [Mon, 29 Mar 2010 23:28:19 +0000 (01:28 +0200)]
systat: update vmstat & improve man page

 * vmstat display:
 *   change disk stat legend to use `/s' for (r)ead & (w)rite
 *   adjust `%slo-z' to show advertized value; was inverse
 *   rename `ofod' to `ozfod' to follow sysctl
 * man page:
 *   include legend for more fields: easier to follow & search
 *   include description for extended VM stat

4 years agovknet(1)/vknetd(8): improve markup, sync SYNOPSIS/usage() & update description
Thomas Nikolajsen [Mon, 29 Mar 2010 23:26:32 +0000 (01:26 +0200)]
vknet(1)/vknetd(8): improve markup, sync SYNOPSIS/usage() & update description

Default vknet socket path is /var/run/vknet;
it was updated from /dev/vknet after devfs(5) entered.