summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/io.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bcache: Use standard utility codeKent Overstreet2013-07-011-42/+22
| | | | | | | | | | | | | | | | 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>
* bcache: Fix/revamp tracepointsKent Overstreet2013-06-271-0/+2
| | | | | | | | | | | | | | | | 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>
* md: bcache: io.c: fix a potential NULL pointer dereferenceKumar Amit Mehta2013-06-271-0/+2
| | | | | | | | bio_alloc_bioset returns NULL on failure. This fix adds a missing check for potential NULL pointer dereferencing. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Kent Overstreet <koverstreet@google.com>
* bcache: Fix merge_bvec_fn usage for when it modifies the bvmKent Overstreet2013-04-221-9/+8
| | | | | | | | Stacked md devices reuse the bvm for the subordinate device, causing problems... Reported-by: Michael Balser <michael.balser@profitbricks.com> Signed-off-by: Kent Overstreet <koverstreet@google.com>
* bcache: Correctly check against BIO_MAX_PAGESKent Overstreet2013-04-211-5/+4
| | | | | | | bch_bio_max_sectors() was checking against BIO_MAX_PAGES as if the limit was for the total bytes in the bio, not the number of segments. Signed-off-by: Kent Overstreet <koverstreet@google.com>
* bcache: Hack around stuff that clones up to bi_max_vecsKent Overstreet2013-04-211-0/+9
| | | | Signed-off-by: Kent Overstreet <koverstreet@google.com>
* bcache: A block layer cacheKent Overstreet2013-03-241-0/+390
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>