1. 17 12月, 2013 1 次提交
    • K
      bcache: Fix dirty_data accounting · d24a6e10
      Kent Overstreet 提交于
      Dirty data accounting wasn't quite right - firstly, we were adding the key we're
      inserting after it could have merged with another dirty key already in the
      btree, and secondly we could sometimes pass the wrong offset to
      bcache_dev_sectors_dirty_add() for dirty data we were overwriting - which is
      important when tracking dirty data by stripe.
      
      NOTE FOR BACKPORTERS: For 3.10 (and 3.11?) there's other accounting fixes
      necessary that got squashed in with other patches; the full patch against 3.10
      is 408cc2f47eeac93a, available at:
        git://evilpiepirate.org/~kent/linux-bcache.git bcache-3.10-writeback-fixes
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      
      diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
      index 2a46036..4a12b2f 100644
      --- a/drivers/md/bcache/btree.c
      +++ b/drivers/md/bcache/btree.c
      @@ -1817,7 +1817,8 @@ static bool fix_overlapping_extents(struct btree *b, struct bkey *insert,
       			if (KEY_START(k) > KEY_START(insert) + sectors_found)
       				goto check_failed;
      
      -			if (KEY_PTRS(replace_key) != KEY_PTRS(k))
      +			if (KEY_PTRS(k) != KEY_PTRS(replace_key) ||
      +			    KEY_DIRTY(k) != KEY_DIRTY(replace_key))
       				goto check_failed;
      
       			/* skip past gen */
      d24a6e10
  2. 29 11月, 2013 1 次提交
  3. 11 11月, 2013 33 次提交
  4. 25 9月, 2013 2 次提交
  5. 11 9月, 2013 1 次提交
    • D
      drivers: convert shrinkers to new count/scan API · 7dc19d5a
      Dave Chinner 提交于
      Convert the driver shrinkers to the new API.  Most changes are compile
      tested only because I either don't have the hardware or it's staging
      stuff.
      
      FWIW, the md and android code is pretty good, but the rest of it makes me
      want to claw my eyes out.  The amount of broken code I just encountered is
      mind boggling.  I've added comments explaining what is broken, but I fear
      that some of the code would be best dealt with by being dragged behind the
      bike shed, burying in mud up to it's neck and then run over repeatedly
      with a blunt lawn mower.
      
      Special mention goes to the zcache/zcache2 drivers.  They can't co-exist
      in the build at the same time, they are under different menu options in
      menuconfig, they only show up when you've got the right set of mm
      subsystem options configured and so even compile testing is an exercise in
      pulling teeth.  And that doesn't even take into account the horrible,
      broken code...
      
      [glommer@openvz.org: fixes for i915, android lowmem, zcache, bcache]
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NGlauber Costa <glommer@openvz.org>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Carlos Maiolino <cmaiolino@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: J. Bruce Fields <bfields@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7dc19d5a
  6. 12 7月, 2013 1 次提交
    • K
      bcache: Fix GC_SECTORS_USED() calculation · 29ebf465
      Kent Overstreet 提交于
      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: NKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      29ebf465
  7. 02 7月, 2013 1 次提交
    • K
      bcache: Use standard utility code · 8e51e414
      Kent Overstreet 提交于
      Some of bcache's utility code has made it into the rest of the kernel,
      so drop the bcache versions.
      
      Bcache used to have a workaround for allocating from a bio set under
      generic_make_request() (if you allocated more than once, the bios you
      already allocated would get stuck on current->bio_list when you
      submitted, and you'd risk deadlock) - bcache would mask out __GFP_WAIT
      when allocating bios under generic_make_request() so that allocation
      could fail and it could retry from workqueue. But bio_alloc_bioset() has
      a workaround now, so we can drop this hack and the associated error
      handling.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      8e51e414