1. 27 6月, 2013 3 次提交
    • K
      bcache: Refactor btree io · 57943511
      Kent Overstreet 提交于
      The most significant change is that btree reads are now done
      synchronously, instead of asynchronously and doing the post read stuff
      from a workqueue.
      
      This was originally done because we can't block on IO under
      generic_make_request(). But - we already have a mechanism to punt cache
      lookups to workqueue if needed, so if we just use that we don't have to
      deal with the complexity of doing things asynchronously.
      
      The main benefit is this makes the locking situation saner; we can hold
      our write lock on the btree node until we're finished reading it, and we
      don't need that btree_node_read_done() flag anymore.
      
      Also, for writes, btree_write() was broken out into btree_node_write()
      and btree_leaf_dirty() - the old code with the boolean argument was dumb
      and confusing.
      
      The prio_blocked mechanism was improved a bit too, now the only counter
      is in struct btree_write, we don't mess with transfering a count from
      struct btree anymore.
      
      This required changing garbage collection to block prios at the start
      and unblock when it finishes, which is cleaner than what it was doing
      anyways (the old code had mostly the same effect, but was doing it in a
      convoluted way)
      
      And the btree iter btree_node_read_done() uses was converted to a real
      mempool.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      57943511
    • K
      bcache: Convert allocator thread to kthread · 119ba0f8
      Kent Overstreet 提交于
      Using a workqueue when we just want a single thread is a bit silly.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      119ba0f8
    • G
  2. 15 5月, 2013 2 次提交
  3. 01 5月, 2013 1 次提交
  4. 25 4月, 2013 1 次提交
  5. 21 4月, 2013 2 次提交
  6. 09 4月, 2013 1 次提交
  7. 29 3月, 2013 1 次提交
  8. 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
  9. 24 3月, 2013 1 次提交