Commits on Apr 19, 2010
  1. HAMMER VFS - Fix probable corruption case when filesystem becomes nea…

    …rly 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
    * 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 <>, Jan Lentfer <>
    Matthew Dillon committed Apr 19, 2010
  2. 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
    Matthew Dillon committed Apr 17, 2010
  3. 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.
    Matthew Dillon committed Apr 16, 2010
  4. 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 <>
    Matthew Dillon committed Apr 14, 2010
Commits on Apr 13, 2010
  1. 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
    bwalex committed Apr 13, 2010
  2. ata - Fix dumping of old ata driver

    * While we still have ata(4) around, make addump work properly again
      with the new dumping infrastructure.
    bwalex committed Apr 13, 2010
Commits on Apr 10, 2010
  1. Fix LINT build.

    Sascha Wildner committed Apr 10, 2010

    It's incomplete and an undocumented option in acpiconf can trigger
    a kernel panic (only as root, though).
    YONETANI Tomokazu committed Apr 10, 2010
  3. Install the boot(8) manual page too during 64 bit install.

    Sascha Wildner committed Apr 10, 2010
Commits on Apr 9, 2010
  1. 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.
    bwalex committed Apr 9, 2010
  2. 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
    * This fixes Ant's directory scanner.
    Submitted-by: Johannes Hofmann
    bwalex committed Apr 9, 2010
Commits on Apr 8, 2010
  1. look(1): Fix my previous commit.

    I broke i386 behavior. Instead, take a nicer fix from NetBSD.
    Sascha Wildner committed Apr 8, 2010
  2. 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 <>
    Sascha Wildner committed Apr 8, 2010
Commits on Apr 7, 2010
  1. mqueues: selwakeup() needs the MP lock to be held

    Briefly-discussed-with: sjg@
    Stathis Kamperis committed Apr 6, 2010
Commits on Apr 5, 2010
  1. Sync zoneinfo database with tzdata2010h from

    africa:         8.23 -> 8.24
    asia:           8.58 -> 8.59
    Both Tunisia and Pakistan have decided to abandon DST.
    Sascha Wildner committed Apr 5, 2010
Commits on Apr 4, 2010
  1. nrelease: Remove unused variable.

    Sascha Wildner committed Apr 4, 2010
  2. 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.
    Matthew Dillon committed Apr 4, 2010
  3. nrelease: Add back the creation of the /usr/local hierarchy on the Li…

    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
    Sascha Wildner committed Apr 4, 2010
  4. 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.
    Sascha Wildner committed Apr 4, 2010
Commits on Apr 3, 2010
  1. include/Makefile: Add vers.txt to CLEANFILES.

    Sascha Wildner committed Apr 3, 2010
Commits on Apr 1, 2010
  1. 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 <>
    Matthew Dillon committed Apr 1, 2010
  2. 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)
    Matthew Dillon committed Apr 1, 2010
  3. 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 <>
    Matthew Dillon committed Apr 1, 2010
Commits on Mar 31, 2010
  1. 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//
    bwalex committed Mar 31, 2010
  2. 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.
    Matthew Dillon committed Mar 31, 2010
  3. 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.
    Matthew Dillon committed Mar 31, 2010
  4. 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
    bwalex committed Mar 31, 2010
  5. 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
    Matthew Dillon committed Mar 31, 2010
  6. kernel - lwbuf - Remove dead code

    * Remove dead code.  objcache_get() can't return NULL in this case.
    Submitted-by: sjg
    Matthew Dillon committed Mar 31, 2010
  7. 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.
    Matthew Dillon committed Mar 31, 2010
  8. kernel - lwbuf, don't rely on gcc auto-arrays

    thesjg committed with Matthew Dillon Mar 31, 2010
  9. 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.
    thesjg committed with Matthew Dillon Mar 31, 2010
  10. vkernel - Fix kernel build after recent lwbuf work.

    Reviewed-By: sjg
    Joe Talbott committed Mar 31, 2010
  11. Fix UP kernel build.

    Sascha Wildner committed Mar 31, 2010