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

    Matthew Dillon
    Matthew Dillon committed Apr 19, 2010
    …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
      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>
Commits on Apr 18, 2010
  1. ath - Fix module loading.

    tuxillo committed Apr 18, 2010
    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. ips - Mark queue_lock as LK_CANRECURSE

    YONETANI Tomokazu
    YONETANI Tomokazu committed Apr 18, 2010
    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://crater.dragonflybsd.org/repository/git…

    Matthew Dillon
    Matthew Dillon committed Apr 17, 2010
    …/dragonfly
  2. HAMMER VFS - Fix assertion panic related to record flush state

    Matthew Dillon
    Matthew Dillon committed Apr 17, 2010
    * 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
    Alexander Polakov committed Apr 17, 2010
  4. Connect mptutil(8) to the build.

    Alexander Polakov
    Alexander Polakov committed Apr 16, 2010
  5. mptutil(8): fix build on DragonFly

    Alexander Polakov
    Alexander Polakov committed Apr 16, 2010
     * 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
    Alexander Polakov committed Apr 16, 2010
  7. sound: implement OSS_GETVERSION.

    Alexander Polakov
    Alexander Polakov committed Apr 2, 2010
     It's required by some software, emulators/qemu to mention.
    
     Obtained-from: FreeBSD
  8. dsched_fq - Overhaul locking

    bwalex committed Apr 17, 2010
    * 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
    Sascha Wildner committed Apr 17, 2010
    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. Add more __printflike()'s and fix resulting fallout.

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
  2. Move memmove(), strcasecmp() and strncasecmp() in !defined(KERNEL_VIR…

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
    …TUAL).
    
    This fixes the VKERNEL build.
  3. ifconfig(1) - fix autoloading of kernel module

    YONETANI Tomokazu
    YONETANI Tomokazu committed Apr 16, 2010
  4. mmc(4): Remove two unneeded .PATH lines in the Makefiles.

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
  5. Add a condvar(9) manual page (based on FreeBSD's).

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
    Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
  6. Bring in FreeBSD's MMC (MultiMediaCard) stack.

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
    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).
  7. <sys/kthread.h>: Add some __printflike()'s.

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
    This guards against wrong conversion from FreeBSD's kthread_create()
    which takes two additional parameters.
    
    Fix the resulting fallout in kern_sensors.c
  8. dsched: Fix x86_64 buildkernel.

    Sascha Wildner
    Sascha Wildner committed Apr 16, 2010
  9. HAMMER Util - Add 'checkmap', adjust hammer show

    Matthew Dillon
    Matthew Dillon committed Apr 16, 2010
    * 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. dsched - Change loader policy tunables (again)

    bwalex committed Apr 15, 2010
    * 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. dsched_fq - bump minor version

    bwalex committed Apr 14, 2010
  3. dsched_fq - Remove stale comment

    bwalex committed Apr 14, 2010
    * Remove a useless comment
  4. dsched - change loader tunables

    bwalex committed Apr 13, 2010
    * Change loader tunables to dsched_pol avoiding the '*' character as it
      isn't supported by the loader.
    
    Reported-by: Petr Janda
  5. dsched_fq - Avoid a rare div by 0

    bwalex committed Apr 13, 2010
    * 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. dsched_fq - Refactor fqp allocation/destruction

    bwalex committed Apr 13, 2010
    * 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
      refcounting.
    
    * 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. dsched_fq - Avoid int64 overflow on total_budget

    bwalex committed Apr 9, 2010
    * 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
      likely.
    
    * 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. dsched_fq - Fix some issues, sprinkle some asserts

    bwalex committed Apr 9, 2010
    * Add some strategic KKASSERT to catch negative values where they aren't
      allowed.
    
    * 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. dsched_fq - decentralize balancing code

    bwalex committed Apr 1, 2010
    * 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. dsched_fq - Refactor fq_balance_thread

    bwalex committed Apr 1, 2010
    * 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. dsched_fq - Finalize switch to new disk-busy calc

    bwalex committed Apr 1, 2010
    * 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. dsched_fq - Refactor and clean; handle flushes

    bwalex committed Apr 1, 2010
    * 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
      itself.