History log of /drivers/md/bcache/util.h
Revision Date Author Comments
5b25abade29616d42d60f9bd5e6a5ad07f7314e3 17-Apr-2014 Surbhi Palande <sap@daterainc.com> bcache: Correct printing of btree_gc_max_duration_ms

time_stats::btree_gc_max_duration_mc is not bit shifted by 8

Fixes BUG #138

Change-Id: I44fc6e1d0579674016acc533f1a546b080e5371a
Signed-off-by: Surbhi Palande <sap@daterainc.com>
dc9d98d621bdce0552997200ce855659875a5c9f 18-Dec-2013 Kent Overstreet <kmo@daterainc.com> bcache: Convert debug code to btree_keys

More work to disentangle various code from struct btree

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
9a02b7eeeb446a0418ec83afc80eb38bc188f5c8 21-Dec-2013 Kent Overstreet <kmo@daterainc.com> bcache: Remove/fix some header dependencies

In the process of disentagling/libraryizing bset.c from the rest of the
bcache code.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
97d11a660fd906dbea3dccd2638495d8497c3c81 24-Oct-2013 Nicholas Swenson <nks@daterainc.com> bcache: Fix heap_peek() macro

Signed-off-by: Nicholas Swenson <nks@daterainc.com>
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
65d22e911bfc4f46cda4751f1b1926b43c316c14 31-Jul-2013 Kent Overstreet <kmo@daterainc.com> bcache: Move spinlock into struct time_stats

Minor cleanup.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
280481d06c8a683d9aaa26125476222e76b733c5 25-Oct-2013 Kent Overstreet <kmo@daterainc.com> bcache: Debug code improvements

Couple changes:
* Consolidate bch_check_keys() and bch_check_key_order(), and move the
checks that only check_key_order() could do to bch_btree_iter_next().

* Get rid of CONFIG_BCACHE_EDEBUG - now, all that code is compiled in
when CONFIG_BCACHE_DEBUG is enabled, and there's now a sysfs file to
flip on the EDEBUG checks at runtime.

* Dropped an old not terribly useful check in rw_unlock(), and
refactored/improved a some of the other debug code.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
81ab4190ac17df41686a37c97f701623276b652a 31-Oct-2013 Kent Overstreet <kmo@daterainc.com> bcache: Pull on disk data structures out into a separate header

Now, the on disk data structures are in a header that can be exported to
userspace - and having them all centralized is nice too.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
c2a4f3183a1248f615a695fbd8905da55ad11bba 24-Sep-2013 Kent Overstreet <kmo@daterainc.com> bcache: Fix a writeback performance regression

Background writeback works by scanning the btree for dirty data and
adding those keys into a fixed size buffer, then for each dirty key in
the keybuf writing it to the backing device.

When read_dirty() finishes and it's time to scan for more dirty data, we
need to wait for the outstanding writeback IO to finish - they still
take up slots in the keybuf (so that foreground writes can check for
them to avoid races) - without that wait, we'll continually rescan when
we'll be able to add at most a key or two to the keybuf, and that takes
locks that starves foreground IO. Doh.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8e51e414a3c6d92ef2cc41720c67342a8e2c0bf7 07-Jun-2013 Kent Overstreet <koverstreet@google.com> bcache: Use standard utility code

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: Kent Overstreet <koverstreet@google.com>
c37511b863f36c1cc6e18440717fd4cc0e881b8a 27-Apr-2013 Kent Overstreet <koverstreet@google.com> bcache: Fix/revamp tracepoints

The tracepoints were reworked to be more sensible, and fixed a null
pointer deref in one of the tracepoints.

Converted some of the pr_debug()s to tracepoints - this is partly a
performance optimization; it used to be that with DEBUG or
CONFIG_DYNAMIC_DEBUG pr_debug() was an empty macro; but at some point it
was changed to an empty inline function.

Some of the pr_debug() statements had rather expensive function calls as
part of the arguments, so this code was getting run unnecessarily even
on non debug kernels - in some fast paths, too.

Signed-off-by: Kent Overstreet <koverstreet@google.com>
169ef1cf6171d35550fef85645b83b960e241cff 28-Mar-2013 Kent Overstreet <koverstreet@google.com> bcache: Don't export utility code, prefix with bch_

Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: linux-bcache@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
cafe563591446cf80bfbc2fe3bc72a2e36cf1060 24-Mar-2013 Kent Overstreet <koverstreet@google.com> bcache: A block layer cache

Does writethrough and writeback caching, handles unclean shutdown, and
has a bunch of other nifty features motivated by real world usage.

See the wiki at http://bcache.evilpiepirate.org for more.

Signed-off-by: Kent Overstreet <koverstreet@google.com>