Skip to content
  1. Nov 12, 2013
    • Joe Thornber's avatar
      dm cache: add cache block invalidation support · 65790ff9
      Joe Thornber authored
      
      
      Cache block invalidation is removing an entry from the cache without
      writing it back.  Cache blocks can be invalidated via the
      'invalidate_cblocks' message, which takes an arbitrary number of cblock
      ranges:
         invalidate_cblocks [<cblock>|<cblock begin>-<cblock end>]*
      
      E.g.
         dmsetup message my_cache 0 invalidate_cblocks 2345 3456-4567 5678-6789
      
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      65790ff9
    • Joe Thornber's avatar
      dm cache: add remove_cblock method to policy interface · 532906aa
      Joe Thornber authored
      
      
      Implement policy_remove_cblock() and add remove_cblock method to the mq
      policy.  These methods will be used by the following cache block
      invalidation patch which adds the 'invalidate_cblocks' message to the
      cache core.
      
      Also, update some comments in dm-cache-policy.h
      
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      532906aa
    • Joe Thornber's avatar
      dm cache policy mq: reduce memory requirements · 633618e3
      Joe Thornber authored
      
      
      Rather than storing the cblock in each cache entry, we allocate all
      entries in an array and infer the cblock from the entry position.
      
      Saves 4 bytes of memory per cache block.  In addition, this gives us an
      easy way of looking up cache entries by cblock.
      
      We no longer need to keep an explicit bitset to track which cblocks
      have been allocated.  And no searching is needed to find free cblocks.
      
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      633618e3
    • Joe Thornber's avatar
      dm cache metadata: check the metadata version when reading the superblock · 53d49819
      Joe Thornber authored
      
      
      Need to check the version to verify on-disk metadata is supported.
      
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      53d49819
    • Joe Thornber's avatar
      dm cache: add passthrough mode · 2ee57d58
      Joe Thornber authored
      "Passthrough" is a dm-cache operating mode (like writethrough or
      writeback) which is intended to be used when the cache contents are not
      known to be coherent with the origin device.  It behaves as follows:
      
      * All reads are served from the origin device (all reads miss the cache)
      * All writes are forwarded to the origin device; additionally, write
        hits cause cache block invalidates
      
      This mode decouples cache coherency checks from cache device creation,
      largely to avoid having to perform coherency checks while booting.  Boot
      scripts can create cache devices in passthrough mode and put them into
      service (mount cached filesystems, for example) without having to worry
      about coherency.  Coherency that exists is maintained, although the
      cache will gradually cool as writes take place.
      
      Later, applications can perform coherency checks, the nature of which
      will depend on the type of the underlying storage.  If coherency can be
      verified, the cache device can be transitioned to writet...
      2ee57d58
    • Joe Thornber's avatar
      dm cache: cache shrinking support · f494a9c6
      Joe Thornber authored
      
      
      Allow a cache to shrink if the blocks being removed from the cache are
      not dirty.
      
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      f494a9c6
  2. Nov 10, 2013
  3. Nov 06, 2013
    • Joe Thornber's avatar
      dm array: fix bug in growing array · 9c1d4de5
      Joe Thornber authored
      
      
      Entries would be lost if the old tail block was partially filled.
      
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # 3.9+
      9c1d4de5
    • Hannes Reinecke's avatar
      dm mpath: requeue I/O during pg_init · b63349a7
      Hannes Reinecke authored
      
      
      When pg_init is running no I/O can be submitted to the underlying
      devices, as the path priority etc might change.  When using queue_io for
      this, requests will be piling up within multipath as the block I/O
      scheduler just sees a _very fast_ device.  All of this queued I/O has to
      be resubmitted from within multipathing once pg_init is done.
      
      This approach has the problem that it's virtually impossible to
      abort I/O when pg_init is running, and we're adding heavy load
      to the devices after pg_init since all of the queued I/O needs to be
      resubmitted _before_ any requests can be pulled off of the request queue
      and normal operation continues.
      
      This patch will requeue the I/O that triggers the pg_init call, and
      return 'busy' when pg_init is in progress.  With these changes the block
      I/O scheduler will stop submitting I/O during pg_init, resulting in a
      quicker path switch and less I/O pressure (and memory consumption) after
      pg_init.
      
      Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
      [patch header edited for clarity and typos by Mike Snitzer]
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      b63349a7
  4. Nov 01, 2013
    • Shiva Krishna Merla's avatar
      dm mpath: fix race condition between multipath_dtr and pg_init_done · 954a73d5
      Shiva Krishna Merla authored
      
      
      Whenever multipath_dtr() is happening we must prevent queueing any
      further path activation work.  Implement this by adding a new
      'pg_init_disabled' flag to the multipath structure that denotes future
      path activation work should be skipped if it is set.  By disabling
      pg_init and then re-enabling in flush_multipath_work() we also avoid the
      potential for pg_init to be initiated while suspending an mpath device.
      
      Without this patch a race condition exists that may result in a kernel
      panic:
      
      1) If after pg_init_done() decrements pg_init_in_progress to 0, a call
         to wait_for_pg_init_completion() assumes there are no more pending path
         management commands.
      2) If pg_init_required is set by pg_init_done(), due to retryable
         mode_select errors, then process_queued_ios() will again queue the
         path activation work.
      3) If free_multipath() completes before activate_path() work is called a
         NULL pointer dereference like the following can be seen when
         accessing members of the recently destructed multipath:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000090
      RIP: 0010:[<ffffffffa003db1b>]  [<ffffffffa003db1b>] activate_path+0x1b/0x30 [dm_multipath]
      [<ffffffff81090ac0>] worker_thread+0x170/0x2a0
      [<ffffffff81096c80>] ? autoremove_wake_function+0x0/0x40
      
      [switch to disabling pg_init in flush_multipath_work & header edits by Mike Snitzer]
      Signed-off-by: default avatarShiva Krishna Merla <shivakrishna.merla@netapp.com>
      Reviewed-by: default avatarKrishnasamy Somasundaram <somasundaram.krishnasamy@netapp.com>
      Tested-by: default avatarSpeagle Andy <Andy.Speagle@netapp.com>
      Acked-by: default avatarJunichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      954a73d5
    • Mikulas Patocka's avatar
      dm: allocate buffer for messages with small number of arguments using GFP_NOIO · f36afb39
      Mikulas Patocka authored
      
      
      dm-mpath and dm-thin must process messages even if some device is
      suspended, so we allocate argv buffer with GFP_NOIO. These messages have
      a small fixed number of arguments.
      
      On the other hand, dm-switch needs to process bulk data using messages
      so excessive use of GFP_NOIO could cause trouble.
      
      The patch also lowers the default number of arguments from 64 to 8, so
      that there is smaller load on GFP_NOIO allocations.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarAlasdair G Kergon <agk@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      f36afb39
  5. Oct 14, 2013
    • Linus Torvalds's avatar
      Linux 3.12-rc5 · 61e6cfa8
      Linus Torvalds authored
      v3.12-rc5
      61e6cfa8
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · 73cac03d
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
       "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the
        kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver"
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: sunxi: Fix section mismatch
        watchdog: kempld_wdt: Fix bit mask definition
        watchdog: ts72xx_wdt: locking bug in ioctl
      73cac03d
    • Maxime Ripard's avatar
      watchdog: sunxi: Fix section mismatch · 1d5898b4
      Maxime Ripard authored
      
      
      This driver has a section mismatch, for probe and remove functions,
      leading to the following warning during the compilation.
      
      WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in
      reference from the variable sunxi_wdt_driver to the function
      .init.text:sunxi_wdt_probe()
      The variable sunxi_wdt_driver references
      the function __init sunxi_wdt_probe()
      
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      1d5898b4
    • Jingoo Han's avatar
      watchdog: kempld_wdt: Fix bit mask definition · 4c4e4566
      Jingoo Han authored
      
      
      STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
      handles [9:8] bits. Thus, it should be fixed in order to handle
      [5:4] bits.
      
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      4c4e4566
    • Dan Carpenter's avatar
      watchdog: ts72xx_wdt: locking bug in ioctl · 8612ed0d
      Dan Carpenter authored
      
      
      Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
      interruptible deadlock.
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      8612ed0d
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 3552570a
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A small batch of fixes this week, mostly OMAP related.  Nothing stands
        out as particularly controversial.
      
        Also a fix for a 3.12-rc1 timer regression for Exynos platforms,
        including the Chromebooks"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: exynos: dts: Update 5250 arch timer node with clock frequency
        ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
        ARM: mach-omap2: board-generic: fix undefined symbol
        ARM: dts: Fix pinctrl mask for omap3
        ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
        ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
      3552570a
    • Yuvaraj Kumar C D's avatar
      ARM: exynos: dts: Update 5250 arch timer node with clock frequency · 4d594dd3
      Yuvaraj Kumar C D authored
      
      
      Without the "clock-frequency" property in arch timer node, could able
      to see the below crash dump.
      
      [<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
      [<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
      [<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
      [<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74)
      [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c)
      [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134)
      [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c)
      [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58)
      [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c)
      [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
      
      THis is because the Exynos u-boot, for example on the Chromebooks, doesn't set
      up the CNTFRQ register as expected by arch_timer. Instead, we have to specify
      the frequency in the device tree like this.
      
      Signed-off-by: default avatarYuvaraj Kumar C D <yuvaraj.cd@samsung.com>
      [olof: Changed subject, added comment, elaborated on commit message]
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      4d594dd3
    • Olof Johansson's avatar
      Merge tag 'fixes-against-v3.12-rc3-take2' of... · 98ead6e0
      Olof Johansson authored
      
      Merge tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      
      Few fixes for omap3 related hangs and errors that people have
      noticed now that people are actually using the device tree
      based booting for omap3.
      
      Also one regression fix for timer compile for dra7xx when
      omap5 is not selected, and a LED regression fix for n900.
      
      * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
        ARM: mach-omap2: board-generic: fix undefined symbol
        ARM: dts: Fix pinctrl mask for omap3
        ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
        ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      98ead6e0
    • Linus Torvalds's avatar
      Merge branch 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 2d4712b7
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "This patchset includes a bugfix to prevent a kernel crash when memory
        in page zero is accessed by the kernel itself, e.g.  via
        probe_kernel_read().
      
        Furthermore we now export flush_cache_page() which is needed
        (indirectly) by the lustre filesystem.  The other patches remove
        unused functions and optimizes the page fault handler to only evaluate
        variables if needed, which again protects against possible kernel
        crashes"
      
      * 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: let probe_kernel_read() capture access to page zero
        parisc: optimize variable initialization in do_page_fault
        parisc: fix interruption handler to respect pagefault_disable()
        parisc: mark parisc_terminate() noreturn and cold.
        parisc: remove unused syscall_ipi() function.
        parisc: kill SMP single function call interrupt
        parisc: Export flush_cache_page() (needed by lustre)
      2d4712b7