Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

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

    Matthew Dillon authored
    …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 <>
Commits on Apr 18, 2010
  1. @tuxillo

    ath - Fix module loading.

    tuxillo authored
    This registers the modules ath_hal and ath_rate,
    so they are properly handled.
    Both are now a dependency for if_ath to provide
    automatic loading upon if_ath load.
    Also 'if_ath_load=YES' on /boot/loader.conf is
    fixed with this commit.
  2. @tuxillo
  3. ips - Mark queue_lock as LK_CANRECURSE

    YONETANI Tomokazu authored
    Originally queue_lock was an LWKT reader-writer locks, which permitted
    multiple locks by the same thread, and in fact there are few code paths
    where such multiple locking is used.  Doing the similar thing with lockmgr
    lock without either LK_NOWAIT or LK_CANRECURSE triggers a panic.
Commits on Apr 17, 2010
  1. Merge branch 'master' of ssh://…

    Matthew Dillon authored
  2. HAMMER VFS - Fix assertion panic related to record flush state

    Matthew Dillon authored
    * 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
  3. Fix LINT kernel build.

    Alexander Polakov authored
  4. Connect mptutil(8) to the build.

    Alexander Polakov authored
  5. mptutil(8): fix build on DragonFly

    Alexander Polakov authored
     * fix header paths
     * define SPECNAMELEN
     * use scsci_read_capacity_data_16 for scsi_read_capacity_data_long
  6. Import mptutil(8) from FreeBSD unmodified.

    Alexander Polakov authored
  7. sound: implement OSS_GETVERSION.

    Alexander Polakov authored
     It's required by some software, emulators/qemu to mention.
     Obtained-from: FreeBSD
  8. @bwalex

    dsched_fq - Overhaul locking

    bwalex authored
    * use lockmgr lock for FQP lock, as some strategy ops can sleep while
      acquiring another lock (CAM SIM lock, for example).
    * reduce overall locking when it isn't really required, mainly during
      deallocation (losing last ref) of objects. The locking is only
      explicitly required to protect the internal TAILQs.
    * NOTE: this is an _attempt_ to fix some unidentified deadlocks that have
      been reported occasionally. While it shouldn't happen, be aware that
      this might explode.
    Reported-by: Antonio Huete, Jan Lentfer
  9. Fix ACPI global lock acquisition in x86_64.

    Sascha Wildner authored
    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
Commits on Apr 16, 2010
  1. @tuxillo
  2. Add more __printflike()'s and fix resulting fallout.

    Sascha Wildner authored
  3. Move memmove(), strcasecmp() and strncasecmp() in !defined(KERNEL_VIR…

    Sascha Wildner authored
    This fixes the VKERNEL build.
  4. ifconfig(1) - fix autoloading of kernel module

    YONETANI Tomokazu authored
  5. mmc(4): Remove two unneeded .PATH lines in the Makefiles.

    Sascha Wildner authored
  6. Add a condvar(9) manual page (based on FreeBSD's).

    Sascha Wildner authored
    Submitted-by: Venkatesh Srinivas <>
  7. Bring in FreeBSD's MMC (MultiMediaCard) stack.

    Sascha Wildner authored
    mmc(4)   - The MMC bus
    sdhci(4) - Host controller driver
    mmcsd(4) - Memory card disk device driver
    SD, SDHC and MMC cards should be supported (tested with an SDHC card).
  8. <sys/kthread.h>: Add some __printflike()'s.

    Sascha Wildner authored
    This guards against wrong conversion from FreeBSD's kthread_create()
    which takes two additional parameters.
    Fix the resulting fallout in kern_sensors.c
  9. dsched: Fix x86_64 buildkernel.

    Sascha Wildner authored
  10. HAMMER Util - Add 'checkmap', adjust hammer show

    Matthew Dillon authored
    * 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.
Commits on Apr 15, 2010
  1. @bwalex

    dsched - Change loader policy tunables (again)

    bwalex authored
    * Change them to follow the standard, dotted, format. Now the three
      types are:
        - kern.dsched.policy.da0
        - kern.dsched.policy.da
        - kern.dsched.policy.default
    Suggested-by: Sascha Wildner
  2. @bwalex

    dsched_fq - bump minor version

    bwalex authored
  3. @bwalex

    dsched_fq - Remove stale comment

    bwalex authored
    * Remove a useless comment
  4. @bwalex

    dsched - change loader tunables

    bwalex authored
    * Change loader tunables to dsched_pol avoiding the '*' character as it
      isn't supported by the loader.
    Reported-by: Petr Janda
  5. @bwalex

    dsched_fq - Avoid a rare div by 0

    bwalex authored
    * Avoid a rare division by 0 when calculating how busy the disk has
      been. It seems that sometimes the total disk time is 0, so when this
      happens, just assume that at least 1 us has passed.
  6. @bwalex

    dsched_fq - Refactor fqp allocation/destruction

    bwalex authored
    * Accept another argument for fqp allocation which is the corresponding
      fqmp. This is internally stored for proper self-removal out of the
      fqmp list on destruction.
    * This parameter is also used to link the fqp into the fqmp list
      automatically on creation, avoiding code duplication and deadlocking.
    * Changed the destruction refcount to -0x400 instead of -3 to make
      tracking of these cases simpler and not confuse them with bad
    * NOTE: this also fixes the longstanding issue of an eventual panic
      after a number of policy switches to/from fq.
    Reported-by: Antonio Huete (tuxillo@)
  7. @bwalex

    dsched_fq - Avoid int64 overflow on total_budget

    bwalex authored
    * Avoid an int64 overflow when calculating the total disk budget by
      losing bits of precision if needed.
    * Note that this might not quite fix the issue yet, as there is one
      other place where the int64 overflow can happen, although it is less
    * While here, make the rebalancing happen every 0.5s instead of every
      1s, effectively reducing the chance of int64 overflows.
    Reported-by: Antonio Huete (tuxillo@)
  8. @bwalex

    dsched_fq - Fix some issues, sprinkle some asserts

    bwalex authored
    * Add some strategic KKASSERT to catch negative values where they aren't
    * Avoid certain race conditions by using a local variable instead of
      using the generally accessible one (budget vs dpriv->budgetpb). Only
      set the final value once we are ready.
  9. @bwalex

    dsched_fq - decentralize balancing code

    bwalex authored
    * Move the balancing code out of the fq_balance_thread into
      fq_balance_Self, which should be called from dispatchers.
    * This essentially offloads the heavy processing onto (mostly) the
      processes/threads that do the I/O themselves.
  10. @bwalex

    dsched_fq - Refactor fq_balance_thread

    bwalex authored
    * Refactor fq_balance_thread to be an LWKT instead of callout.
    * Also make sure fqp->transactions, fqp->avg_latency don't change while
      we use them.
  11. @bwalex

    dsched_fq - Finalize switch to new disk-busy calc

    bwalex authored
    * Don't take the time since the last balancing run as a fixed value,
      instead calculate it.
    * Remove extraneous craft that suggested a disk is only busy if it also
      has many incomplete requests.
  12. @bwalex

    dsched_fq - Refactor and clean; handle flushes

    bwalex authored
    * Factor out an fq_drain which will either cancel or dispatch all the
      bios we have currently in all our fqp queues.
    * Clean out old comments and code.
    * Deal with flushes by not queuing them but rather letting dsched handle
      them. By returning EINVAL, dsched_queue will dispatch the flush
Something went wrong with that request. Please try again.