Skip to content
  1. Jul 12, 2013
    • Kent Overstreet's avatar
      bcache: Allocation kthread fixes · 79826c35
      Kent Overstreet authored
      
      
      The alloc kthread should've been using try_to_freeze() - and also there
      was the potential for the alloc kthread to get woken up after it had
      shut down, which would have been bad.
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      79826c35
    • Kent Overstreet's avatar
      bcache: Fix GC_SECTORS_USED() calculation · 29ebf465
      Kent Overstreet authored
      
      
      Part of the job of garbage collection is to add up however many sectors
      of live data it finds in each bucket, but that doesn't work very well if
      it doesn't reset GC_SECTORS_USED() when it starts. Whoops.
      
      This wouldn't have broken anything horribly, but allocation tries to
      preferentially reclaim buckets that are mostly empty and that's not
      gonna work with an incorrect GC_SECTORS_USED() value.
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      29ebf465
    • Kent Overstreet's avatar
      bcache: Journal replay fix · faa56736
      Kent Overstreet authored
      
      
      The journal replay code starts by finding something that looks like a
      valid journal entry, then it does a binary search over the unchecked
      region of the journal for the journal entries with the highest sequence
      numbers.
      
      Trouble is, the logic was wrong - journal_read_bucket() returns true if
      it found journal entries we need, but if the range of journal entries
      we're looking for loops around the end of the journal - in that case
      journal_read_bucket() could return true when it hadn't found the highest
      sequence number we'd seen yet, and in that case the binary search did
      the wrong thing. Whoops.
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      faa56736
    • Kent Overstreet's avatar
      bcache: Shutdown fix · 5caa52af
      Kent Overstreet authored
      
      
      Stopping a cache set is supposed to make it stop attached backing
      devices, but somewhere along the way that code got lost. Fixing this
      mainly has the effect of fixing our reboot notifier.
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      5caa52af
    • Kent Overstreet's avatar
      bcache: Fix a sysfs splat on shutdown · c9502ea4
      Kent Overstreet authored
      
      
      If we stopped a bcache device when we were already detaching (or
      something like that), bcache_device_unlink() would try to remove a
      symlink from sysfs that was already gone because the bcache dev kobject
      had already been removed from sysfs.
      
      So keep track of whether we've removed stuff from sysfs.
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      c9502ea4
    • Kent Overstreet's avatar
      bcache: Advertise that flushes are supported · 54d12f2b
      Kent Overstreet authored
      
      
      Whoops - bcache's flush/FUA was mostly correct, but flushes get filtered
      out unless we say we support them...
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      54d12f2b
    • Dan Carpenter's avatar
      bcache: check for allocation failures · d2a65ce2
      Dan Carpenter authored
      
      
      There is a missing NULL check after the kzalloc().
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      d2a65ce2
    • Kent Overstreet's avatar
      bcache: Fix a dumb race · 6aa8f1a6
      Kent Overstreet authored
      
      
      In the far-too-complicated closure code - closures can have destructors,
      for probably dubious reasons; they get run after the closure is no
      longer waiting on anything but before dropping the parent ref, intended
      just for freeing whatever memory the closure is embedded in.
      
      Trouble is, when remaining goes to 0 and we've got nothing more to run -
      we also have to unlock the closure, setting remaining to -1. If there's
      a destructor, that unlock isn't doing anything - nobody could be trying
      to lock it if we're about to free it - but if the unlock _is needed...
      that check for a destructor was racy. Argh.
      
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      6aa8f1a6
  2. Jul 01, 2013
  3. Jun 27, 2013
  4. Jun 18, 2013
  5. May 15, 2013
    • Kent Overstreet's avatar
      bcache: Fix error handling in init code · f59fce84
      Kent Overstreet authored
      
      
      This code appears to have rotted... fix various bugs and do some
      refactoring.
      
      Signed-off-by: default avatarKent Overstreet <koverstreet@google.com>
      f59fce84
    • Paul Bolle's avatar
      bcache: drop "select CLOSURES" · bbb1c3b5
      Paul Bolle authored
      
      
      The Kconfig entry for BCACHE selects CLOSURES. But there's no Kconfig
      symbol CLOSURES. That symbol was used in development versions of bcache,
      but was removed when the closures code was no longer provided as a
      kernel library. It can safely be dropped.
      
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      bbb1c3b5
    • Emil Goode's avatar
      bcache: Fix incompatible pointer type warning · 867e1162
      Emil Goode authored
      
      
      The function pointer release in struct block_device_operations
      should point to functions declared as void.
      
      Sparse warnings:
      
      drivers/md/bcache/super.c:656:27: warning:
      	incorrect type in initializer (different base types)
      	drivers/md/bcache/super.c:656:27:
      	expected void ( *release )( ... )
      	drivers/md/bcache/super.c:656:27:
      	got int ( static [toplevel] *<noident> )( ... )
      
      drivers/md/bcache/super.c:656:2: warning:
      	initialization from incompatible pointer type [enabled by default]
      
      drivers/md/bcache/super.c:656:2: warning:
      	(near initialization for ‘bcache_ops.release’) [enabled by default]
      
      Signed-off-by: default avatarEmil Goode <emilgoode@gmail.com>
      Signed-off-by: default avatarKent Overstreet <koverstreet@google.com>
      867e1162
  6. May 01, 2013
  7. Apr 24, 2013
  8. Apr 22, 2013
  9. Apr 21, 2013
  10. Apr 08, 2013
Loading