1. 11 11月, 2013 5 次提交
    • K
      bcache: Kill op->cl · b54d6934
      Kent Overstreet 提交于
      This isn't used for waiting asynchronously anymore - so this is a fairly
      trivial refactoring.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      b54d6934
    • K
      bcache: Prune struct btree_op · c18536a7
      Kent Overstreet 提交于
      Eventual goal is for struct btree_op to contain only what is necessary
      for traversing the btree.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      c18536a7
    • K
      bcache: Add btree_map() functions · 48dad8ba
      Kent Overstreet 提交于
      Lots of stuff has been open coding its own btree traversal - which is
      generally pretty simple code, but there are a few subtleties.
      
      This adds new new functions, bch_btree_map_nodes() and
      bch_btree_map_keys(), which do the traversal for you. Everything that's
      open coding btree traversal now (with the exception of garbage
      collection) is slowly going to be converted to these two functions;
      being able to write other code at a higher level of abstraction  is a
      big improvement w.r.t. overall code quality.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      48dad8ba
    • K
      bcache: Clean up keylist code · c2f95ae2
      Kent Overstreet 提交于
      More random refactoring.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      c2f95ae2
    • K
      bcache: Add btree_insert_node() · 26c949f8
      Kent Overstreet 提交于
      The flow of control in the old btree insertion code was rather -
      backwards; we'd recurse down the btree (in btree_insert_recurse()), and
      then if we needed to split the keys to be inserted into the parent node
      would be effectively returned up to btree_insert_recurse(), which would
      notice there was more work to do and finish the insertion.
      
      The main problem with this was that the full logic for btree insertion
      could only be used by calling btree_insert_recurse; if you'd gotten to a
      btree leaf some other way and had a key to insert, if it turned out that
      node needed to be split you were SOL.
      
      This inverts the flow of control so btree_insert_node() does _full_
      btree insertion, including splitting - and takes a (leaf) btree node to
      insert into as a parameter.
      
      This means we can now _correctly_ handle cache misses - for cache
      misses, we need to insert a fake "check" key into the btree when we
      discover we have a cache miss - while we still have the btree locked.
      Previously, if the btree node was full inserting a cache miss would just
      fail.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      26c949f8
  2. 25 9月, 2013 1 次提交
  3. 27 6月, 2013 2 次提交
  4. 18 6月, 2013 1 次提交
  5. 09 4月, 2013 2 次提交
  6. 29 3月, 2013 1 次提交
  7. 26 3月, 2013 2 次提交
    • K
      bcache: Style/checkpatch fixes · b1a67b0f
      Kent Overstreet 提交于
      Took out some nested functions, and fixed some more checkpatch
      complaints.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      Cc: linux-bcache@vger.kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b1a67b0f
    • K
      bcache: Build fixes from test robot · 07e86ccb
      Kent Overstreet 提交于
      config: make ARCH=i386 allmodconfig
      
      All error/warnings:
      
         drivers/md/bcache/bset.c: In function 'bch_ptr_bad':
      >> drivers/md/bcache/bset.c:164:2: warning: format '%li' expects argument of type 'long int', but argument 4 has type 'size_t' [-Wformat]
      --
         drivers/md/bcache/debug.c: In function 'bch_pbtree':
      >> drivers/md/bcache/debug.c:86:4: warning: format '%li' expects argument of type 'long int', but argument 4 has type 'size_t' [-Wformat]
      --
         drivers/md/bcache/btree.c: In function 'bch_btree_read_done':
      >> drivers/md/bcache/btree.c:245:8: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat]
      --
         drivers/md/bcache/closure.o: In function `closure_debug_init':
      >> (.init.text+0x0): multiple definition of `init_module'
      >> drivers/md/bcache/super.o:super.c:(.init.text+0x0): first defined here
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: linux-bcache@vger.kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      07e86ccb
  8. 24 3月, 2013 1 次提交