1. 26 Sep, 2013 1 commit
  2. 25 Sep, 2013 35 commits
  3. 24 Sep, 2013 4 commits
    • Linus Torvalds's avatar
      Merge branch 'bcache' (bcache fixes from Kent Overstreet) · e288e931
      Linus Torvalds authored
      Merge bcache fixes from Kent Overstreet:
       "There's fixes for _three_ different data corruption bugs, all of which
        were found by users hitting them in the wild.
      
        The first one isn't bcache specific - in 3.11 bcache was switched to
        the bio_copy_data in fs/bio.c, and that's when the bug in that code
        was discovered, but it's also used by raid1 and pktcdvd.  (That was my
        code too, so the bug's doubly embarassing given that it was or
        should've been just a cut and paste from bcache code.  Dunno what
        happened there).
      
        Most of these (all the non data corruption bugs, actually) were ready
        before the merge window and have been sitting in Jens' tree, but I
        don't know what's been up with him lately..."
      
      * emailed patches from Kent Overstreet <kmo@daterainc.com>:
        bcache: Fix flushes in writeback mode
        bcache: Fix for handling overlapping extents when reading in a btree node
        bcache: Fix a shrinker deadlock
        bcache: Fix a dumb CPU spinning bug in writeback
        bcache: Fix a flush/fua performance bug
        bcache: Fix a writeback performance regression
        bcache: Correct printf()-style format length modifier
        bcache: Fix for when no journal entries are found
        bcache: Strip endline when writing the label through sysfs
        bcache: Fix a dumb journal discard bug
        block: Fix bio_copy_data()
      e288e931
    • Kent Overstreet's avatar
      bcache: Fix flushes in writeback mode · c0f04d88
      Kent Overstreet authored
      In writeback mode, when we get a cache flush we need to make sure we
      issue a flush to the backing device.
      
      The code for sending down an extra flush was wrong - by cloning the bio
      we were probably getting flags that didn't make sense for a bare flush,
      and also the old code was firing for FUA bios, for which we don't need
      to send a flush to the backing device.
      
      This was causing data corruption somehow - the mechanism was never
      determined, but this patch fixes it for the users that were seeing it.
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c0f04d88
    • Kent Overstreet's avatar
      bcache: Fix for handling overlapping extents when reading in a btree node · 84786438
      Kent Overstreet authored
      btree_sort_fixup() was overly clever, because it was trying to avoid
      pulling a key off the btree iterator in more than one place.
      
      This led to a really obscure bug where we'd break early from the loop in
      btree_sort_fixup() if the current key overlapped with keys in more than
      one older set, and the next key it overlapped with was zero size.
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      84786438
    • Kent Overstreet's avatar
      bcache: Fix a shrinker deadlock · a698e08c
      Kent Overstreet authored
      GFP_NOIO means we could be getting called recursively - mca_alloc() ->
      mca_data_alloc() - definitely can't use mutex_lock(bucket_lock) then.
      Whoops.
      Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a698e08c